Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot perform minimal update on drugbank #111

Open
danielwalke opened this issue Feb 2, 2024 · 2 comments
Open

Cannot perform minimal update on drugbank #111

danielwalke opened this issue Feb 2, 2024 · 2 comments

Comments

@danielwalke
Copy link

Describe the bug
Cannot perform minimal update after reading the docs

To Reproduce
Steps to reproduce the behavior:

  1. Install Neo4j desktop
  2. Add dump from https://data.mendeley.com/datasets/mrcf7f4tc2/3 in neo4j
  3. Setup database from dump with Neo4j version 4.2.3
  4. Clone repo via git clone
  5. Unzip data.zip from https://data.mendeley.com/datasets/mrcf7f4tc2/3 in "CKG\data"
  6. Add DrugBase Full Database "full database.xml" in "CKG\data\databases\DrugBank"
  7. Change connector configs (username and password)
  8. Create conda environment
  9. python setup.py install
  10. Navigate into CKG\ckg\graphdb_builder\builder
  11. python builder.py -b minimal -u username -n 1

Expected behavior
Creation of drug nodes and links in the database

Results*
Errors like:
Connection error:{code: Neo.ClientError.Schema.EquivalentSchemaRuleAlreadyExists} {message: An equivalent constraint already exists, 'Constraint( id=2, name='constraint_6f637020', type='UNIQUENESS', schema=(:Disease {id}), ownedIndex=1 )'.}.
(<class 'neo4j.exceptions.ClientError'>, ClientError("An equivalent constraint already exists, 'Constraint( id=2, name='constraint_6f637020', type='UNIQUENESS', schema=(:Disease {id}), ownedIndex=1 )'."), <traceback object at 0x000001A202313D48>), file: connector.py,line: 99
Connection error:{code: Neo.ClientError.Schema.EquivalentSchemaRuleAlreadyExists} {message: An equivalent index already exists, 'Index( id=3, name='index_662b2000', type='GENERAL BTREE', schema=(:Disease {name}), indexProvider='native-btree-1.0' )'.}.
(<class 'neo4j.exceptions.ClientError'>, ClientError("An equivalent index already exists, 'Index( id=3, name='index_662b2000', type='GENERAL BTREE', schema=(:Disease {name}), indexProvider='native-btree-1.0' )'."), <traceback object at 0x000001A202430688>), file: connector.py,line: 99
Connection error:{code: Neo.ClientError.Schema.EquivalentSchemaRuleAlreadyExists} {message: An equivalent constraint already exists, 'Constraint( id=5, name='constraint_80dda1d2', type='UNIQUENESS', schema=(:Tissue {id}), ownedIndex=4 )'.}.
(<class 'neo4j.exceptions.ClientError'>, ClientError("An equivalent constraint already exists, 'Constraint( id=5, name='constraint_80dda1d2', type='UNIQUENESS', schema=(:Tissue {id}), ownedIndex=4 )'."), <traceback object at 0x000001A202366708>), file: connector.py,line: 99
Connection error:{code: Neo.ClientError.Schema.EquivalentSchemaRuleAlreadyExists} {message: An equivalent index already exists, 'Index( id=6, name='index_846155cf', type='GENERAL BTREE', schema=(:Tissue {name}), indexProvider='native-btree-1.0' )'.}.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows10
@bolak92
Copy link

bolak92 commented Apr 3, 2024

I get the same error.
But I think it builds normally (I can see the drug nodes in the graph after the minimal update)
at some point neo4j changed dealing with the constraint uniqueness. I believe this is the cause of the warning message but I am not fully sure.

@danielwalke
Copy link
Author

Thanks, I found the error and i added on all occurrences the "IF NOT EXISTS" to index and constraint creations. Nevertheless, the underyling issue why drugs were not updated were due to the fact that my neo4j db did not allow updates from resources outside of the "import" directory, which I already fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants