Skip to content

The GraphRelationshipsLoader class is usable from Python code, and the command line interface.

Usage in Different Contexts

Available Relationships

  • Assay_Compound
  • Assay_Gene
  • Gene_Protein
  • Compound_Gene
  • Compound_Similarity
  • Compound_Compound_Cooccurrence
  • Compound_Gene_Cooccurrence
  • Compound_Gene_Interaction
  • Compound_Transformation

1. Python Code

from chemgraphbuilder.graph_relationships_loader import GraphRelationshipsLoader

uri = "bolt://localhost:7687"
username = "neo4j"
password = "password"

loader = GraphRelationshipsLoader(uri, username, password)
loader.add_relationships("Assay_Gene")
loader.close()

2. Command Line

After installing the package using pip install . or pip install chemgraphbuilder, you can use the command-line interface:

load-graph_relationships --uri bolt://localhost:7687 --username neo4j --password password --relationship_type Assay_Gene