API Reference¶
Complete API reference for the biodbs package.
Modules¶
biodbs.fetch¶
Data fetching from biological databases.
Fetcher Classes
UniProt_Fetcher- Fetch protein data from UniProt REST APIPubChem_Fetcher- Fetch chemical data from PubChem PUG REST/View APIsEnsembl_Fetcher- Fetch genomic data from Ensembl REST APIBioMart_Fetcher- Query Ensembl BioMart for gene annotationsKEGG_Fetcher- Fetch pathway and gene data from KEGG APIChEMBL_Fetcher- Fetch bioactivity data from ChEMBL APIQuickGO_Fetcher- Fetch GO annotations from QuickGO APIHPA_Fetcher- Fetch protein expression from Human Protein AtlasNCBI_Fetcher- Fetch gene data from NCBI EntrezFDA_Fetcher- Fetch drug/device data from openFDAReactome_Fetcher- Fetch pathway data from ReactomeDO_Fetcher- Fetch disease terms from Disease OntologyEnrichR_Fetcher- Perform gene set enrichment via EnrichRHGNC_Fetcher- Fetch gene nomenclature from HGNCClinVar_Fetcher- Fetch clinical variant data from ClinVar
Key Functions
uniprot_get_entry- Get a UniProt entry by accessionuniprot_search- Search UniProtKB with querypubchem_get_compound- Get compound by CIDensembl_lookup- Lookup entity by Ensembl IDkegg_get- Get KEGG entry by IDkegg_link- Get cross-references between databaseshgnc_fetch_by_symbol- Fetch gene by approved symbolhgnc_search_symbol- Wildcard search on gene symbolsclinvar_search_gene- Search and fetch variants for a geneclinvar_fetch_by_id- Fetch variant summaries by variation UID
biodbs.translate¶
ID translation between biological databases.
Enums
GeneIDType- Universal gene ID type aliases (resolved per backend)TranslationDatabase- Available translation backends
Gene Translation
translate_gene_ids- Translate gene IDs between databasestranslate_gene_ids_kegg- Translate gene IDs using KEGG API
Protein Translation
translate_protein_ids- Translate protein IDs via UniProt ID mappingtranslate_gene_to_uniprot- Map gene symbols to UniProt accessionstranslate_uniprot_to_gene- Map UniProt accessions to gene symbolstranslate_uniprot_to_pdb- Map UniProt accessions to PDB IDstranslate_uniprot_to_ensembl- Map UniProt accessions to Ensembl gene IDs
Chemical Translation
translate_chemical_ids- Translate chemical IDs via PubChemtranslate_chembl_to_pubchem- Map ChEMBL IDs to PubChem CIDstranslate_pubchem_to_chembl- Map PubChem CIDs to ChEMBL IDs
biodbs.analysis¶
Statistical analysis and enrichment functions.
Classes
ORAResult- Container for over-representation analysis resultsORATermResult- Single term result from ORAPathway- Represents a biological pathway with gene sets
Enums
Species- Supported species for ORAGOAspect- Gene Ontology aspects (BP, MF, CC)CorrectionMethod- Multiple testing correction methodsTranslationDatabase- Backends for automatic ID translation in ORAPathwayDatabase- Pathway database sources
ORA Functions
ora- Generic ORA against any gene sets or GMT fileora_kegg- ORA against KEGG pathwaysora_go- ORA against Gene Ontology termsora_reactome- ORA against Reactome pathways (API)ora_reactome_local- ORA against Reactome pathways (local)ora_enrichr- ORA via EnrichR web service
GMT Functions
load_gmt- Load a GMT file into Pathway objectssave_gmt- Write Pathway objects to a GMT filefetch_gmt- Fetch gene sets from KEGG or EnrichR as GMT
Utility Functions
hypergeometric_test- Compute hypergeometric p-valuemultiple_test_correction- Apply multiple testing correction
biodbs.graph¶
Knowledge graph building and analysis.
Classes
KnowledgeGraph- Container for nodes and edges with graph operationsNode- Represents a biological entityEdge- Represents a relationship between nodes
Enums
NodeType- Types of nodes (GENE, PROTEIN, DISEASE, etc.)EdgeType- Types of edges (IS_A, PART_OF, etc.)DataSource- Data sources (DISEASE_ONTOLOGY, GENE_ONTOLOGY, etc.)
Builder Functions
build_graph- Build graph from nodes and edgesbuild_disease_graph- Build graph from Disease Ontology databuild_go_graph- Build graph from QuickGO databuild_reactome_graph- Build graph from Reactome databuild_kegg_graph- Build graph from KEGG datamerge_graphs- Merge multiple graphs
Export Functions
to_networkx- Export to NetworkX DiGraphto_json_ld- Export to JSON-LD for KG-RAGto_rdf- Export to RDF formatto_neo4j_csv- Export to Neo4j CSV formatto_cypher- Generate Cypher queries
Utility Functions
find_shortest_path- Find shortest path between nodesfind_all_paths- Find all paths between nodesget_neighborhood- Get nodes within N hopsfind_hub_nodes- Find highly connected nodesget_graph_statistics- Get graph statistics