CKG
CKG copied to clipboard
Cannot perform minimal update on drugbank
Describe the bug Cannot perform minimal update after reading the docs
To Reproduce Steps to reproduce the behavior:
- Install Neo4j desktop
- Add dump from https://data.mendeley.com/datasets/mrcf7f4tc2/3 in neo4j
- Setup database from dump with Neo4j version 4.2.3
- Clone repo via git clone
- Unzip data.zip from https://data.mendeley.com/datasets/mrcf7f4tc2/3 in "CKG\data"
- Add DrugBase Full Database "full database.xml" in "CKG\data\databases\DrugBank"
- Change connector configs (username and password)
- Create conda environment
- python setup.py install
- Navigate into CKG\ckg\graphdb_builder\builder
- 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
Desktop (please complete the following information):
- OS: Windows10
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.
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