Python package for access to online biomedical resources,
usually via REST APIs. Modules generally include
Client.py
for command-line use and Utils.py
for
integration into other code. With the advent of HTTP web services,
first SOAP/XML and then mostly REST/JSON, many online APIs
require very similar methods for data search, requests
and transforms into usable formats, often TSV.
Releases at https://pypi.org/project/BioClients/.
pip3 install BioClients
However, current development snapshot may included additional functionality.
Source at https://github.com/jeremyjyang/BioClients
(First download or clone.)
Install build
package.
python3 -m pip install --upgrade build
Install using build
. This supercedes the deprecated setup.py install
and easy_install
methods.
cd BioClients
python3 -m build
- Python 3.10+
- Python packages:
pandas
,requests
,yaml
,psycopg2
,tqdm
, etc. (See conda/environment.yml).
Allen • AMP-T2D • Badapple • BindingDb • BioGrid • BiomarkerKB • Bioregistry • BRENDA • CAS • CDC • CFDE • Chem2Bio2RDF • ChEBI • ChEMBL • ChemIdPlus • ClinicalTrials.gov • Disease Ontology • DisGeNet • DNorm • DrugCentral • EMBL-EBI • EnsEMBL • Entrez • FDA • Gene Ontology • GTEx • GWAS Catalog • HUGO • HumanBase • iCite • IDG • JensenLab • LINCS • MaayanLab • Medline • MeSH • MONARCH • MyGene • NCBO • NCATS • OMIM • OncoTree • Open Targets • Panther • PDB • PubChem • PubMed • PubTator • Reactome • RXNorm • STRINGDB • TCGA • UBKG • UMLS • UniProt • Wikidata • WikiPathways
Miscellaneous utilities: UTIL
python3 -m BioClients.pubchem.Client -h
Generally each module includes command-line app Client.py
which calls
functions in a corresponding Utils.py
, providing all capabilities
by import of the module. Command-line apps not API clients are generally
named App.py
. Functions can write to an output file
or return a Pandas dataframe (if output file unspecified).
BioClients is designed to be simple and practical, and XML, JSON and TSV are likewise simple in many respects, yet a great deal of conceptual and technological progress is reflected. XML and JSON can represent arbitrarily complex data objects, comprised of nested lists, dictionaries, and trees of primary types. TSV represents tables of rows and columns, related by common keys, reflecting the development of SQL and relational databases. Transforming JSON to TSV, as these clients generally do, projects data objects to tables useful for many applications (e.g. machine learning).
BioClients depends on numerous Python packages. (See conda/environment.yml).
The following commands create and activate a Conda environment bioclients
:
$ conda env create -f conda/environment.yml
If that fails, try:
$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib
then:
$ conda activate bioclients
(bioclients) $ pip install BioClients
and install additional packages as needed via pip
, e.g.:
(bioclients) $ pip install sqlalchemy
(bioclients) $ pip install pyquery
(bioclients) $ pip install mygene
(bioclients) $ pip install click
(bioclients) $ pip install PyMuPDF
(bioclients) $ pip install py2neo
It may not be necessary or advantageous to configure an environment for all of BioClients functionality. Specific modules may be supported with venv
environments with required dependencies. Module documentation should indicate needed package dependencies.