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 genebdp query "gene:BRCA1 -> diseases" # Find drugs targeting a genebdp query "gene:TP53 -> drugs" # Find phenotypes for a diseasebdp query "disease:MONDO:0007254 -> phenotypes" # Find pathways containing a proteinbdp query "protein:P04637 -> pathways"Output Format#
Results are printed as a table by default. Use --format for structured output:
bash
# JSON outputbdp query "gene:EGFR -> drugs" --format json # TSV for downstream processingbdp query "gene:EGFR -> drugs" --format tsv > egfr_drugs.tsvTraversal Depth#
Control how many hops to follow in the graph:
bash
# Two hops: gene → disease → phenotypebdp query "gene:BRCA1 -> diseases -> phenotypes" --depth 2Related#
For AI-agent access to the knowledge graph, see the MCP Server documentation.