Biology APIs
This library contains abstractions to interact with public biology databases that have HTTP APIs. It uses rigid data structures for requests and responses, and enums where possible to constrain API options.
APIs supported
- RCSB (Protein data bank)
- PubChem
- PDBe
- DrugBank
- NCBI BLAST
- Rhea
- UniProt
- ChEBI
- LMSD
- Mol2, FRCMOD, and Lib data for Amber Geostd organic molecules
Example functionality:
- Download molecule data in various formats (e.g. mmCIF, SDF)
- Open your default web browser to a molecule's overview page, 3D structure etc
- Search APIs for molecule data, or filter and return a list of IDs.
- Load information on a protein from the RCSB data API or UniProt
- Load electron density data for a protein
- Query reactions on Rhea, and load associated enzymes and small molecules
- Download a molecule based on its identifier
Example of various API functionality:
let data = get_all_data?;
let data = find_mols.unwrap;
let cif_text = load_cif.unwrap;
let sdf_data = load_sdf.unwrap;
let sdf_data = load_sdf.unwrap;
let mol2_data = load_mol2.unwrap;
let protein = load_protein.unwrap;
let seq = protein.seq_aa;
let structures = protein.pdb_ids;
// A predicted structure, for proteins the PDB has no experimental one for.
let cif_text = load_alphafold_cif.unwrap;
open_overview;
We support flexible queries of the Pubchem URL-based API using the pubchem::url_api_query() function. Parameters
are passed as enums to pull various data from this flexble API. Example:
let resp = url_api_query?;
This returns a string, which can be further parsed based on the nature of the data. For example, parsing into a structure or array using Serde, depending on the shape of the output for a given query.
See the API docs for functionality.