| Crates.io | bio_apis |
| lib.rs | bio_apis |
| version | 0.2.4 |
| created_at | 2025-05-14 16:51:04.049846+00 |
| updated_at | 2026-01-15 23:31:07.058076+00 |
| description | DNA and RNA sequence types and functions |
| homepage | |
| repository | https://github.com/David-OConnor/bio_apis |
| max_upload_size | |
| id | 1673693 |
| size | 93,661 |
This library contains abstractions to interact with the public biology databases that hav HTTP APIs. It uses rigid data structures for requests and responses, and enums where possible to constrain API options.
Example of various API functionality:
let data = bio_apis::rcsb::get_all_data("1ba3")?;
let data = amber_geostd::find_mols(&lig.common.ident).unwrap();
let cif_text = rcsb::load_cif(ident).unwrap();
let sdf_data = drugbank::load_sdf(ident).unwrap();
let sdf_data = pubchem::load_sdf(ident).unwrap();
let mol2_data = amber_geostd::load_mol2(ident).unwrap();
pubchem::open_overview(ident);
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(
Domain::Compound,
Namespace::Compound(NamespaceCompound::FastSearch((
FastSearchCat::FastSimilarity3d,
StructureSearchNamespace::Cid,
))),
&[cid.to_string()],
OperationSpecification::Compound(OpSpecCompound::Cids),
)?;
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.
WIP: Many features unsupported. Implementing as used by Daedelus and PlasCAD.
See the API docs for functionality.