Skip to content

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

Usage in Different Contexts

Available Nodes

  • Compound
  • BioAssay
  • Gene
  • Protein

1. Python Code

from chemgraphbuilder.graph_nodes_loader import GraphNodesLoader

# User-provided connection details and label
uri = "bolt://localhost:7687"
username = "neo4j"
password = "password"
label = "Compound"  # you can add other labels such as (BioAssay, Gene, Protein)

graph_nodes_loader = GraphNodesLoader(uri, username, password)
graph_nodes_loader.load_data_for_node_type(label)

2. Command Line

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

load-graph-nodes --uri bolt://localhost:7687 --username neo4j --password password --label Compound