Documentation

Query#

bdp query runs structured queries against the BDP knowledge graph, allowing you to explore relationships between genes, diseases, drugs, pathways, and more.

Usage#

bash
bdp query <expression>

Examples#

bash
# Find all diseases associated with a gene
bdp query "gene:BRCA1 -> diseases"
# Find drugs targeting a gene
bdp query "gene:TP53 -> drugs"
# Find phenotypes for a disease
bdp query "disease:MONDO:0007254 -> phenotypes"
# Find pathways containing a protein
bdp query "protein:P04637 -> pathways"

Output Format#

Results are printed as a table by default. Use --format for structured output:

bash
# JSON output
bdp query "gene:EGFR -> drugs" --format json
# TSV for downstream processing
bdp query "gene:EGFR -> drugs" --format tsv > egfr_drugs.tsv

Traversal Depth#

Control how many hops to follow in the graph:

bash
# Two hops: gene → disease → phenotype
bdp query "gene:BRCA1 -> diseases -> phenotypes" --depth 2

For AI-agent access to the knowledge graph, see the MCP Server documentation.