BioClients 0.2.20__tar.gz → 0.2.33__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {BioClients-0.2.20 → bioclients-0.2.33}/PKG-INFO +36 -19
- BioClients-0.2.20/BioClients.egg-info/PKG-INFO → bioclients-0.2.33/README.md +32 -29
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chebi/Client.py +35 -11
- BioClients-0.2.20/BioClients/chebi/Utils.py → bioclients-0.2.33/bioclients/chebi/Client_SOAP.py +68 -3
- bioclients-0.2.33/bioclients/chebi/Utils.py +170 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chembl/Utils.py +16 -6
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/drugcentral/Client.py +4 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/drugcentral/Utils.py +39 -0
- bioclients-0.2.33/bioclients/fda/aer/Client.py +69 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/fda/aer/Utils.py +78 -54
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gwascatalog/Client.py +39 -8
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gwascatalog/Utils.py +211 -21
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/icite/Utils.py +3 -3
- bioclients-0.2.33/bioclients/ncats/__init__.py +2 -0
- bioclients-0.2.33/bioclients/ncats/stitcher/Client.py +72 -0
- bioclients-0.2.33/bioclients/ncats/stitcher/Utils.py +94 -0
- bioclients-0.2.33/bioclients/tinx/Client.py +85 -0
- bioclients-0.2.33/bioclients/tinx/Utils.py +180 -0
- bioclients-0.2.33/bioclients/umls/CPTClient.py +144 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/umls/Utils.py +0 -74
- bioclients-0.2.33/bioclients/uniprot/Client.py +70 -0
- bioclients-0.2.33/bioclients/uniprot/Utils.py +191 -0
- bioclients-0.2.33/bioclients/util/owl/App.py +110 -0
- bioclients-0.2.33/bioclients/util/owl/Utils.py +163 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/pandas/App.py +29 -19
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/rdf/Utils.py +2 -3
- bioclients-0.2.33/bioclients/who/__init__.py +1 -0
- bioclients-0.2.33/bioclients/who/atc/Client.py +54 -0
- bioclients-0.2.33/bioclients/who/atc/Utils.py +45 -0
- bioclients-0.2.33/bioclients/who/atc/__init__.py +1 -0
- bioclients-0.2.33/bioclients/wikidata/__init__.py +1 -0
- bioclients-0.2.33/bioclients/wikipathways/__init__.py +1 -0
- BioClients-0.2.20/README.md → bioclients-0.2.33/bioclients.egg-info/PKG-INFO +46 -11
- bioclients-0.2.33/bioclients.egg-info/SOURCES.txt +300 -0
- bioclients-0.2.33/bioclients.egg-info/top_level.txt +1 -0
- {BioClients-0.2.20 → bioclients-0.2.33}/setup.py +4 -4
- BioClients-0.2.20/BioClients/fda/aer/Client.py +0 -81
- BioClients-0.2.20/BioClients/ncats/__init__.py +0 -1
- BioClients-0.2.20/BioClients/uniprot/Client.py +0 -61
- BioClients-0.2.20/BioClients/uniprot/Utils.py +0 -43
- BioClients-0.2.20/BioClients/util/owl/App.py +0 -31
- BioClients-0.2.20/BioClients/util/owl/Utils.py +0 -34
- BioClients-0.2.20/BioClients.egg-info/SOURCES.txt +0 -288
- BioClients-0.2.20/BioClients.egg-info/top_level.txt +0 -1
- {BioClients-0.2.20 → bioclients-0.2.33}/LICENSE +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/allen/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/allen/brain/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/allen/brain/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/allen/brain/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/amp/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/amp/t2d/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/amp/t2d/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/amp/t2d/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/badapple/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/badapple/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/badapple/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bindingdb/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bindingdb/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bindingdb/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biogrid/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biogrid/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biogrid/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biomarkerkb/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biomarkerkb/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/biomarkerkb/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bioregistry/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bioregistry/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/bioregistry/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/brenda/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/brenda/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/brenda/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cas/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cas/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cas/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cdc/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cdc/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cdc/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cfde/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cfde/cfchemdb/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cfde/cfchemdb/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/cfde/cfchemdb/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chebi/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/slap/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/slap/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chem2bio2rdf/slap/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chembl/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chembl/FetchByID.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chembl/UnichemClient.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chembl/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chemidplus/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chemidplus/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/chemidplus/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/clinicaltrials/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/clinicaltrials/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/clinicaltrials/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/disgenet/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/disgenet/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/disgenet/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/dnorm/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/dnorm/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/drugcentral/Test.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/drugcentral/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/identifiers/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/identifiers/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/identifiers/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/unichem/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/unichem/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/emblebi/unichem/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/biomart/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/biomart/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ensembl/biomart/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/entrez/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/entrez/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/entrez/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/fda/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/fda/aer/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/geneontology/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/geneontology/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/geneontology/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/glygen/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/glygen/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/glygen/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gtex/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gtex/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gtex/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/gwascatalog/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hubmap/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hubmap/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hubmap/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hugo/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hugo/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/hugo/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/humanbase/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/humanbase/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/icite/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/icite/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/pharos/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/pharos/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/pharos/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/rss/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/rss/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/rss/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tcrd/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tcrd/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tcrd/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tiga/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tiga/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tiga/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tinx/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tinx/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/idg/tinx/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/iuphar/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/iuphar/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/iuphar/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/jensenlab/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/jensenlab/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/jensenlab/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/Client_lincscloud.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/sigcom/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/sigcom/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/lincs/sigcom/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/archs4/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/archs4/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/archs4/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/harmonizome/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/harmonizome/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/maayanlab/harmonizome/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/connect/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/connect/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/connect/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/genetics/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/genetics/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/medline/genetics/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mesh/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mesh/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mesh/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/monarch/Biolink.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/monarch/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/monarch/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/monarch/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mygene/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mygene/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/mygene/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ncats/gsrs/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ncats/gsrs/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ncats/gsrs/__init__.py +0 -0
- {BioClients-0.2.20/BioClients/ncbo → bioclients-0.2.33/bioclients/ncats/stitcher}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ncbo/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ncbo/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/oncotree → bioclients-0.2.33/bioclients/ncbo}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/omim/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/omim/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/oncotree/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/oncotree/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/openphacts → bioclients-0.2.33/bioclients/oncotree}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/openphacts/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/openphacts/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/opentargets → bioclients-0.2.33/bioclients/openphacts}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/opentargets/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/opentargets/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/pdb → bioclients-0.2.33/bioclients/opentargets}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/panther/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/panther/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pdb/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pdb/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/pubchem/ftp → bioclients-0.2.33/bioclients/pdb}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/pubchem/soap → bioclients-0.2.33/bioclients/pubchem/ftp}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_actives.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_assay_fetch.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_assay_results.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_assay_search.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_assaysim.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_compound_assaystats.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/ftp/pubchem_ftp_gini_index.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/rdf/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/rdf/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/soap/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/soap/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/pubtator → bioclients-0.2.33/bioclients/pubchem/soap}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/soap/pug_aids2assays.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/soap/pug_ids2mols.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubchem/soap/pug_substance_search.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubmed/App_XML.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubmed/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubmed/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubmed/Utils_XML.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubmed/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubtator/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/pubtator/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/rxnorm → bioclients-0.2.33/bioclients/pubtator}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/reactome/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/reactome/SMBL_utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/reactome/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/reactome/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/rxnorm/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/rxnorm/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/stringdb → bioclients-0.2.33/bioclients/rxnorm}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/stringdb/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/stringdb/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/tcga → bioclients-0.2.33/bioclients/stringdb}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/tcga/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/tcga/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/ubkg → bioclients-0.2.33/bioclients/tcga}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients/umls → bioclients-0.2.33/bioclients/tinx}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ubkg/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/ubkg/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/uniprot → bioclients-0.2.33/bioclients/ubkg}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/umls/Client.py +0 -0
- {BioClients-0.2.20/BioClients/util/db → bioclients-0.2.33/bioclients/umls}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients/util/graphql → bioclients-0.2.33/bioclients/uniprot}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/db/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/hdf → bioclients-0.2.33/bioclients/util/db}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/graphql/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/igraph → bioclients-0.2.33/bioclients/util/graphql}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/hdf/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/neo4j → bioclients-0.2.33/bioclients/util/hdf}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/igraph/App.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/igraph/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/obo → bioclients-0.2.33/bioclients/util/igraph}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/neo4j/App.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/neo4j/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/owl → bioclients-0.2.33/bioclients/util/neo4j}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/obo/App.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/obo/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/pandas → bioclients-0.2.33/bioclients/util/obo}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients/util/rdf → bioclients-0.2.33/bioclients/util/owl}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/pandas/Csv2Html.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/pandas/Csv2Markdown.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/pandas/Csv2Sql.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/pandas/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/rest → bioclients-0.2.33/bioclients/util/pandas}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/rdf/App.py +0 -0
- {BioClients-0.2.20/BioClients/util/sparql → bioclients-0.2.33/bioclients/util/rdf}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/rest/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/xml → bioclients-0.2.33/bioclients/util/rest}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/sparql/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/sparql/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/util/yaml → bioclients-0.2.33/bioclients/util/sparql}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/xml/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/wikidata → bioclients-0.2.33/bioclients/util/xml}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/util/yaml/Utils.py +0 -0
- {BioClients-0.2.20/BioClients/wikipathways → bioclients-0.2.33/bioclients/util/yaml}/__init__.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/wikidata/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/wikidata/Utils.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/wikipathways/Client.py +0 -0
- {BioClients-0.2.20/BioClients → bioclients-0.2.33/bioclients}/wikipathways/Utils.py +0 -0
- {BioClients-0.2.20/BioClients.egg-info → bioclients-0.2.33/bioclients.egg-info}/dependency_links.txt +0 -0
- {BioClients-0.2.20 → bioclients-0.2.33}/setup.cfg +0 -0
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: Clients for online biomedical resources, usually via REST APIs.
|
|
5
|
-
Home-page: https://github.com/jeremyjyang/
|
|
2
|
+
Name: bioclients
|
|
3
|
+
Version: 0.2.33
|
|
4
|
+
Summary: Clients and tools for online biomedical resources, usually via REST APIs.
|
|
5
|
+
Home-page: https://github.com/jeremyjyang/bioclients
|
|
6
6
|
Author: Jeremy Yang
|
|
7
7
|
Author-email: jeremyjyang@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
8
|
Classifier: Programming Language :: Python :: 3
|
|
11
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
10
|
Classifier: Operating System :: OS Independent
|
|
@@ -14,7 +12,7 @@ Requires-Python: >=3.10
|
|
|
14
12
|
Description-Content-Type: text/markdown
|
|
15
13
|
License-File: LICENSE
|
|
16
14
|
|
|
17
|
-
# `
|
|
15
|
+
# `bioclients` <img align="right" src="doc/images/bioclients.png" height="120" alt="bioclients logo">
|
|
18
16
|
|
|
19
17
|
Python package for access to online biomedical resources,
|
|
20
18
|
usually via REST APIs. Modules generally include
|
|
@@ -26,18 +24,33 @@ and transforms into usable formats, often TSV.
|
|
|
26
24
|
|
|
27
25
|
## Availability and installation
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
### Installing from PyPI
|
|
28
|
+
|
|
29
|
+
Releases at <https://pypi.org/project/bioclients/>.
|
|
31
30
|
|
|
32
31
|
```
|
|
33
|
-
pip3 install
|
|
32
|
+
pip3 install bioclients
|
|
34
33
|
```
|
|
35
34
|
However, current development snapshot may included additional functionality.
|
|
36
35
|
|
|
36
|
+
### Installing from source
|
|
37
|
+
|
|
38
|
+
Source at <https://github.com/jeremyjyang/bioclients>
|
|
39
|
+
|
|
37
40
|
___(First download or clone.)___
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Install `build` package.
|
|
44
|
+
|
|
38
45
|
```
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
python3 -m pip install --upgrade build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Install using `build`. This supercedes the deprecated `setup.py install` and `easy_install` methods.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
cd bioclients
|
|
53
|
+
python3 -m build
|
|
41
54
|
```
|
|
42
55
|
|
|
43
56
|
## Dependencies
|
|
@@ -47,14 +60,14 @@ python3 setup.py install
|
|
|
47
60
|
|
|
48
61
|
## Modules
|
|
49
62
|
|
|
50
|
-
[__Allen__](doc/allen.md) • [__AMP-T2D__](doc/amp__t2d.md) • [__Badapple__](doc/badapple.md) • [__BindingDb__](doc/bindingdb.md) • [__BioGrid__](doc/biogrid.md) • [__BiomarkerKB__](doc/biomarkerkb.md) • [__Bioregistry__](doc/bioregistry.md) • [__BRENDA__](doc/brenda.md) • [__CAS__](doc/cas.md) • [__CDC__](doc/cdc.md) • [__CFDE__](doc/cfde.md) • [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) • [__ChEBI__](doc/chebi.md) • [__ChEMBL__](doc/chembl.md) • [__ChemIdPlus__](doc/chemidplus.md) • [__ClinicalTrials.gov__](doc/clinicaltrials.md) • [__Disease Ontology__](doc/diseaseontology.md) • [__DisGeNet__](doc/disgenet.md) • [__DNorm__](doc/dnorm.md) • [__DrugCentral__](doc/drugcentral.md) • [__EMBL-EBI__](doc/emblebi.md) • [__EnsEMBL__](doc/ensembl.md) • [__Entrez__](doc/entrez.md) • [__FDA__](doc/fda.md) • [__Gene Ontology__](doc/geneontology.md) • [__GTEx__](doc/gtex.md) • [__GWAS Catalog__](doc/gwascatalog.md) • [__HUGO__](doc/hugo.md) • [__HumanBase__](doc/humanbase.md) • [__iCite__](doc/icite.md) • [__IDG__](doc/idg.md) • [__JensenLab__](doc/jensenlab.md) • [__LINCS__](doc/lincs.md) • [__MaayanLab__](doc/maayanlab.md) • [__Medline__](doc/medline.md) • [__MeSH__](doc/mesh.md) • [__MONARCH__](doc/monarch.md) • [__MyGene__](doc/mygene.md) • [__NCBO__](doc/ncbo.md) • [__NCATS__](doc/ncats.md) • [__OMIM__](doc/omim.md) • [__OncoTree__](doc/oncotree.md) • [__Open Targets__](doc/opentargets.md) • [__Panther__](doc/panther.md) • [__PDB__](doc/pdb.md) • [__PubChem__](doc/pubchem.md) • [__PubMed__](doc/pubmed.md) • [__PubTator__](doc/pubtator.md) • [__Reactome__](doc/reactome.md) • [__RXNorm__](doc/rxnorm.md) • [__STRINGDB__](doc/stringdb.md) • [__TCGA__](doc/tcga.md) • [__UBKG__](doc/ubkg.md) • [__UMLS__](doc/umls.md) • [__UniProt__](doc/uniprot.md) • [__Wikidata__](doc/wikidata.md) • [__WikiPathways__](doc/wikipathways.md)
|
|
63
|
+
[__Allen__](doc/allen.md) • [__AMP-T2D__](doc/amp__t2d.md) • [__Badapple__](doc/badapple.md) • [__BindingDb__](doc/bindingdb.md) • [__BioGrid__](doc/biogrid.md) • [__BiomarkerKB__](doc/biomarkerkb.md) • [__Bioregistry__](doc/bioregistry.md) • [__BRENDA__](doc/brenda.md) • [__CAS__](doc/cas.md) • [__CDC__](doc/cdc.md) • [__CFDE__](doc/cfde.md) • [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) • [__ChEBI__](doc/chebi.md) • [__ChEMBL__](doc/chembl.md) • [__ChemIdPlus__](doc/chemidplus.md) • [__ClinicalTrials.gov__](doc/clinicaltrials.md) • [__Disease Ontology__](doc/diseaseontology.md) • [__DisGeNet__](doc/disgenet.md) • [__DNorm__](doc/dnorm.md) • [__DrugCentral__](doc/drugcentral.md) • [__EMBL-EBI__](doc/emblebi.md) • [__EnsEMBL__](doc/ensembl.md) • [__Entrez__](doc/entrez.md) • [__FDA__](doc/fda.md) • [__Gene Ontology__](doc/geneontology.md) • [__GTEx__](doc/gtex.md) • [__GWAS Catalog__](doc/gwascatalog.md) • [__HUGO__](doc/hugo.md) • [__HumanBase__](doc/humanbase.md) • [__iCite__](doc/icite.md) • [__IDG__](doc/idg.md) • [__JensenLab__](doc/jensenlab.md) • [__LINCS__](doc/lincs.md) • [__MaayanLab__](doc/maayanlab.md) • [__Medline__](doc/medline.md) • [__MeSH__](doc/mesh.md) • [__MONARCH__](doc/monarch.md) • [__MyGene__](doc/mygene.md) • [__NCBO__](doc/ncbo.md) • [__NCATS__](doc/ncats.md) • [__OMIM__](doc/omim.md) • [__OncoTree__](doc/oncotree.md) • [__Open Targets__](doc/opentargets.md) • [__Panther__](doc/panther.md) • [__PDB__](doc/pdb.md) • [__PubChem__](doc/pubchem.md) • [__PubMed__](doc/pubmed.md) • [__PubTator__](doc/pubtator.md) • [__Reactome__](doc/reactome.md) • [__RXNorm__](doc/rxnorm.md) • [__STRINGDB__](doc/stringdb.md) • [__TCGA__](doc/tcga.md) • [__TINX__](doc/tinx.md) • [__UBKG__](doc/ubkg.md) • [__UMLS__](doc/umls.md) • [__UniProt__](doc/uniprot.md) • [__Wikidata__](doc/wikidata.md) • [__WikiPathways__](doc/wikipathways.md)
|
|
51
64
|
|
|
52
65
|
Miscellaneous utilities: [__UTIL__](doc/util.md)
|
|
53
66
|
|
|
54
67
|
## Usage Example
|
|
55
68
|
|
|
56
69
|
```
|
|
57
|
-
python3 -m
|
|
70
|
+
python3 -m bioclients.pubchem.Client -h
|
|
58
71
|
```
|
|
59
72
|
|
|
60
73
|
## Design pattern
|
|
@@ -67,7 +80,7 @@ or return a Pandas dataframe (if output file unspecified).
|
|
|
67
80
|
|
|
68
81
|
## Data structures and formats, XML, JSON, and TSV
|
|
69
82
|
|
|
70
|
-
|
|
83
|
+
bioclients is designed to be simple and practical, and XML, JSON
|
|
71
84
|
and TSV are likewise simple in many respects, yet a great deal
|
|
72
85
|
of conceptual and technological progress is reflected. XML and JSON
|
|
73
86
|
can represent arbitrarily complex data objects, comprised of nested lists,
|
|
@@ -79,7 +92,7 @@ applications (e.g. machine learning).
|
|
|
79
92
|
|
|
80
93
|
## Conda environment
|
|
81
94
|
|
|
82
|
-
|
|
95
|
+
bioclients depends on numerous Python packages. (See [conda/environment.yml](conda/environment.yml)).
|
|
83
96
|
The following commands create and activate a Conda environment `bioclients`:
|
|
84
97
|
|
|
85
98
|
```
|
|
@@ -87,19 +100,23 @@ $ conda env create -f conda/environment.yml
|
|
|
87
100
|
```
|
|
88
101
|
If that fails, try:
|
|
89
102
|
```
|
|
90
|
-
$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib
|
|
103
|
+
$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib
|
|
91
104
|
```
|
|
92
105
|
then:
|
|
93
106
|
```
|
|
94
107
|
$ conda activate bioclients
|
|
108
|
+
(bioclients) $ pip install bioclients
|
|
95
109
|
```
|
|
96
110
|
and install additional packages as needed via `pip`, e.g.:
|
|
97
111
|
```
|
|
98
112
|
(bioclients) $ pip install sqlalchemy
|
|
99
113
|
(bioclients) $ pip install pyquery
|
|
100
114
|
(bioclients) $ pip install mygene
|
|
115
|
+
(bioclients) $ pip install click
|
|
116
|
+
(bioclients) $ pip install PyMuPDF
|
|
117
|
+
(bioclients) $ pip install py2neo
|
|
101
118
|
```
|
|
102
119
|
|
|
120
|
+
## Venv, etc.
|
|
103
121
|
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
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.
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Name: BioClients
|
|
3
|
-
Version: 0.2.20
|
|
4
|
-
Summary: Clients for online biomedical resources, usually via REST APIs.
|
|
5
|
-
Home-page: https://github.com/jeremyjyang/BioClients
|
|
6
|
-
Author: Jeremy Yang
|
|
7
|
-
Author-email: jeremyjyang@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.10
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE
|
|
16
|
-
|
|
17
|
-
# `BioClients` <img align="right" src="doc/images/BioClients_logo.png" height="120" alt="BioClients logo">
|
|
1
|
+
# `bioclients` <img align="right" src="doc/images/bioclients.png" height="120" alt="bioclients logo">
|
|
18
2
|
|
|
19
3
|
Python package for access to online biomedical resources,
|
|
20
4
|
usually via REST APIs. Modules generally include
|
|
@@ -26,18 +10,33 @@ and transforms into usable formats, often TSV.
|
|
|
26
10
|
|
|
27
11
|
## Availability and installation
|
|
28
12
|
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
### Installing from PyPI
|
|
14
|
+
|
|
15
|
+
Releases at <https://pypi.org/project/bioclients/>.
|
|
31
16
|
|
|
32
17
|
```
|
|
33
|
-
pip3 install
|
|
18
|
+
pip3 install bioclients
|
|
34
19
|
```
|
|
35
20
|
However, current development snapshot may included additional functionality.
|
|
36
21
|
|
|
22
|
+
### Installing from source
|
|
23
|
+
|
|
24
|
+
Source at <https://github.com/jeremyjyang/bioclients>
|
|
25
|
+
|
|
37
26
|
___(First download or clone.)___
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Install `build` package.
|
|
30
|
+
|
|
38
31
|
```
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
python3 -m pip install --upgrade build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Install using `build`. This supercedes the deprecated `setup.py install` and `easy_install` methods.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
cd bioclients
|
|
39
|
+
python3 -m build
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
## Dependencies
|
|
@@ -47,14 +46,14 @@ python3 setup.py install
|
|
|
47
46
|
|
|
48
47
|
## Modules
|
|
49
48
|
|
|
50
|
-
[__Allen__](doc/allen.md) • [__AMP-T2D__](doc/amp__t2d.md) • [__Badapple__](doc/badapple.md) • [__BindingDb__](doc/bindingdb.md) • [__BioGrid__](doc/biogrid.md) • [__BiomarkerKB__](doc/biomarkerkb.md) • [__Bioregistry__](doc/bioregistry.md) • [__BRENDA__](doc/brenda.md) • [__CAS__](doc/cas.md) • [__CDC__](doc/cdc.md) • [__CFDE__](doc/cfde.md) • [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) • [__ChEBI__](doc/chebi.md) • [__ChEMBL__](doc/chembl.md) • [__ChemIdPlus__](doc/chemidplus.md) • [__ClinicalTrials.gov__](doc/clinicaltrials.md) • [__Disease Ontology__](doc/diseaseontology.md) • [__DisGeNet__](doc/disgenet.md) • [__DNorm__](doc/dnorm.md) • [__DrugCentral__](doc/drugcentral.md) • [__EMBL-EBI__](doc/emblebi.md) • [__EnsEMBL__](doc/ensembl.md) • [__Entrez__](doc/entrez.md) • [__FDA__](doc/fda.md) • [__Gene Ontology__](doc/geneontology.md) • [__GTEx__](doc/gtex.md) • [__GWAS Catalog__](doc/gwascatalog.md) • [__HUGO__](doc/hugo.md) • [__HumanBase__](doc/humanbase.md) • [__iCite__](doc/icite.md) • [__IDG__](doc/idg.md) • [__JensenLab__](doc/jensenlab.md) • [__LINCS__](doc/lincs.md) • [__MaayanLab__](doc/maayanlab.md) • [__Medline__](doc/medline.md) • [__MeSH__](doc/mesh.md) • [__MONARCH__](doc/monarch.md) • [__MyGene__](doc/mygene.md) • [__NCBO__](doc/ncbo.md) • [__NCATS__](doc/ncats.md) • [__OMIM__](doc/omim.md) • [__OncoTree__](doc/oncotree.md) • [__Open Targets__](doc/opentargets.md) • [__Panther__](doc/panther.md) • [__PDB__](doc/pdb.md) • [__PubChem__](doc/pubchem.md) • [__PubMed__](doc/pubmed.md) • [__PubTator__](doc/pubtator.md) • [__Reactome__](doc/reactome.md) • [__RXNorm__](doc/rxnorm.md) • [__STRINGDB__](doc/stringdb.md) • [__TCGA__](doc/tcga.md) • [__UBKG__](doc/ubkg.md) • [__UMLS__](doc/umls.md) • [__UniProt__](doc/uniprot.md) • [__Wikidata__](doc/wikidata.md) • [__WikiPathways__](doc/wikipathways.md)
|
|
49
|
+
[__Allen__](doc/allen.md) • [__AMP-T2D__](doc/amp__t2d.md) • [__Badapple__](doc/badapple.md) • [__BindingDb__](doc/bindingdb.md) • [__BioGrid__](doc/biogrid.md) • [__BiomarkerKB__](doc/biomarkerkb.md) • [__Bioregistry__](doc/bioregistry.md) • [__BRENDA__](doc/brenda.md) • [__CAS__](doc/cas.md) • [__CDC__](doc/cdc.md) • [__CFDE__](doc/cfde.md) • [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) • [__ChEBI__](doc/chebi.md) • [__ChEMBL__](doc/chembl.md) • [__ChemIdPlus__](doc/chemidplus.md) • [__ClinicalTrials.gov__](doc/clinicaltrials.md) • [__Disease Ontology__](doc/diseaseontology.md) • [__DisGeNet__](doc/disgenet.md) • [__DNorm__](doc/dnorm.md) • [__DrugCentral__](doc/drugcentral.md) • [__EMBL-EBI__](doc/emblebi.md) • [__EnsEMBL__](doc/ensembl.md) • [__Entrez__](doc/entrez.md) • [__FDA__](doc/fda.md) • [__Gene Ontology__](doc/geneontology.md) • [__GTEx__](doc/gtex.md) • [__GWAS Catalog__](doc/gwascatalog.md) • [__HUGO__](doc/hugo.md) • [__HumanBase__](doc/humanbase.md) • [__iCite__](doc/icite.md) • [__IDG__](doc/idg.md) • [__JensenLab__](doc/jensenlab.md) • [__LINCS__](doc/lincs.md) • [__MaayanLab__](doc/maayanlab.md) • [__Medline__](doc/medline.md) • [__MeSH__](doc/mesh.md) • [__MONARCH__](doc/monarch.md) • [__MyGene__](doc/mygene.md) • [__NCBO__](doc/ncbo.md) • [__NCATS__](doc/ncats.md) • [__OMIM__](doc/omim.md) • [__OncoTree__](doc/oncotree.md) • [__Open Targets__](doc/opentargets.md) • [__Panther__](doc/panther.md) • [__PDB__](doc/pdb.md) • [__PubChem__](doc/pubchem.md) • [__PubMed__](doc/pubmed.md) • [__PubTator__](doc/pubtator.md) • [__Reactome__](doc/reactome.md) • [__RXNorm__](doc/rxnorm.md) • [__STRINGDB__](doc/stringdb.md) • [__TCGA__](doc/tcga.md) • [__TINX__](doc/tinx.md) • [__UBKG__](doc/ubkg.md) • [__UMLS__](doc/umls.md) • [__UniProt__](doc/uniprot.md) • [__Wikidata__](doc/wikidata.md) • [__WikiPathways__](doc/wikipathways.md)
|
|
51
50
|
|
|
52
51
|
Miscellaneous utilities: [__UTIL__](doc/util.md)
|
|
53
52
|
|
|
54
53
|
## Usage Example
|
|
55
54
|
|
|
56
55
|
```
|
|
57
|
-
python3 -m
|
|
56
|
+
python3 -m bioclients.pubchem.Client -h
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
## Design pattern
|
|
@@ -67,7 +66,7 @@ or return a Pandas dataframe (if output file unspecified).
|
|
|
67
66
|
|
|
68
67
|
## Data structures and formats, XML, JSON, and TSV
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
bioclients is designed to be simple and practical, and XML, JSON
|
|
71
70
|
and TSV are likewise simple in many respects, yet a great deal
|
|
72
71
|
of conceptual and technological progress is reflected. XML and JSON
|
|
73
72
|
can represent arbitrarily complex data objects, comprised of nested lists,
|
|
@@ -79,7 +78,7 @@ applications (e.g. machine learning).
|
|
|
79
78
|
|
|
80
79
|
## Conda environment
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
bioclients depends on numerous Python packages. (See [conda/environment.yml](conda/environment.yml)).
|
|
83
82
|
The following commands create and activate a Conda environment `bioclients`:
|
|
84
83
|
|
|
85
84
|
```
|
|
@@ -87,19 +86,23 @@ $ conda env create -f conda/environment.yml
|
|
|
87
86
|
```
|
|
88
87
|
If that fails, try:
|
|
89
88
|
```
|
|
90
|
-
$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib
|
|
89
|
+
$ conda create -n bioclients -c conda-forge pandas readline requests pyyaml tqdm psycopg2 numpy scipy scikit-learn matplotlib
|
|
91
90
|
```
|
|
92
91
|
then:
|
|
93
92
|
```
|
|
94
93
|
$ conda activate bioclients
|
|
94
|
+
(bioclients) $ pip install bioclients
|
|
95
95
|
```
|
|
96
96
|
and install additional packages as needed via `pip`, e.g.:
|
|
97
97
|
```
|
|
98
98
|
(bioclients) $ pip install sqlalchemy
|
|
99
99
|
(bioclients) $ pip install pyquery
|
|
100
100
|
(bioclients) $ pip install mygene
|
|
101
|
+
(bioclients) $ pip install click
|
|
102
|
+
(bioclients) $ pip install PyMuPDF
|
|
103
|
+
(bioclients) $ pip install py2neo
|
|
101
104
|
```
|
|
102
105
|
|
|
106
|
+
## Venv, etc.
|
|
103
107
|
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
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.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Utility for ChEBI
|
|
3
|
+
Utility for ChEBI REST API.
|
|
4
4
|
|
|
5
|
-
* https://www.ebi.ac.uk/chebi/
|
|
5
|
+
* https://www.ebi.ac.uk/chebi/
|
|
6
|
+
* https://www.ebi.ac.uk/chebi/backend/api/docs/
|
|
6
7
|
"""
|
|
7
8
|
###
|
|
8
9
|
import sys,os,re,json,argparse,time,logging
|
|
@@ -12,19 +13,28 @@ from .. import chebi
|
|
|
12
13
|
#
|
|
13
14
|
##############################################################################
|
|
14
15
|
if __name__=='__main__':
|
|
15
|
-
epilog="
|
|
16
|
-
|
|
16
|
+
epilog="""\
|
|
17
|
+
Note that database accessions include citations.
|
|
18
|
+
Example entity IDs: 16737, 30273,33246,24433\
|
|
19
|
+
"""
|
|
20
|
+
parser = argparse.ArgumentParser(description='ChEBI REST API client', epilog=epilog)
|
|
17
21
|
ops = [
|
|
22
|
+
"list_sources",
|
|
18
23
|
"get_entity",
|
|
24
|
+
"get_entity_names",
|
|
25
|
+
"get_entity_secondary_ids",
|
|
26
|
+
"get_entity_database_accessions",
|
|
19
27
|
"get_entity_children",
|
|
20
28
|
"get_entity_parents",
|
|
29
|
+
"get_entity_origins",
|
|
30
|
+
"get_compound_data",
|
|
21
31
|
"search"
|
|
22
32
|
]
|
|
23
33
|
parser.add_argument("op", choices=ops, help='OPERATION (select one)')
|
|
24
34
|
parser.add_argument("--ids", help="input IDs")
|
|
25
35
|
parser.add_argument("--i", dest="ifile", help="input file, IDs")
|
|
26
36
|
parser.add_argument("--o", dest="ofile", help="output (TSV)")
|
|
27
|
-
parser.add_argument("--query", help="search query (
|
|
37
|
+
parser.add_argument("--query", help="search query (Elastic search)")
|
|
28
38
|
parser.add_argument("--skip", type=int, default=0)
|
|
29
39
|
parser.add_argument("--nmax", type=int, default=None)
|
|
30
40
|
parser.add_argument("--api_host", default=chebi.API_HOST)
|
|
@@ -54,17 +64,31 @@ if __name__=='__main__':
|
|
|
54
64
|
parser.error(f"--i or --ids required for operation {args.op}.")
|
|
55
65
|
|
|
56
66
|
if args.op == "get_entity":
|
|
57
|
-
chebi.GetEntity(ids, base_url, fout)
|
|
67
|
+
chebi.GetEntity(ids, False, False, base_url, fout)
|
|
68
|
+
|
|
69
|
+
elif args.op == "get_entity_parents":
|
|
70
|
+
chebi.GetEntity(ids, True, False, base_url, fout)
|
|
58
71
|
|
|
59
72
|
elif args.op == "get_entity_children":
|
|
60
|
-
chebi.
|
|
73
|
+
chebi.GetEntity(ids, False, True, base_url, fout)
|
|
61
74
|
|
|
62
|
-
elif args.op == "
|
|
63
|
-
chebi.
|
|
75
|
+
elif args.op == "get_entity_database_accessions":
|
|
76
|
+
chebi.GetEntityDatabaseAccessions(ids, base_url, fout)
|
|
77
|
+
|
|
78
|
+
elif args.op == "get_entity_names":
|
|
79
|
+
chebi.GetEntityNames(ids, base_url, fout)
|
|
80
|
+
|
|
81
|
+
elif args.op == "get_compound_data":
|
|
82
|
+
chebi.GetCompoundData(ids, base_url, fout)
|
|
83
|
+
|
|
84
|
+
elif args.op == "list_sources":
|
|
85
|
+
chebi.ListSources(base_url, fout)
|
|
64
86
|
|
|
65
87
|
elif args.op == "search":
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
if not args.query:
|
|
89
|
+
parser.error(f'--query QUERY required for operation: {args.op}')
|
|
90
|
+
#parser.error(f'Not yet implemented: {args.op}')
|
|
91
|
+
chebi.Search(args.query, base_url, fout)
|
|
68
92
|
|
|
69
93
|
else:
|
|
70
94
|
parser.error(f'Invalid operation: {args.op}')
|
BioClients-0.2.20/BioClients/chebi/Utils.py → bioclients-0.2.33/bioclients/chebi/Client_SOAP.py
RENAMED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Utility
|
|
4
|
-
|
|
3
|
+
Utility for ChEBI SOAP API -- DEPRECATED.
|
|
4
|
+
|
|
5
|
+
* https://www.ebi.ac.uk/chebi/webServices.do
|
|
5
6
|
"""
|
|
6
7
|
###
|
|
7
|
-
import sys,os,re,json,time,
|
|
8
|
+
import sys,os,re,json,argparse,time,logging
|
|
8
9
|
import pandas as pd
|
|
10
|
+
#
|
|
11
|
+
#from .. import chebi
|
|
12
|
+
##############################################################################
|
|
13
|
+
# Utility functions for ChEBI SOAP API.
|
|
14
|
+
###
|
|
15
|
+
import time,urllib.parse
|
|
9
16
|
import requests
|
|
10
17
|
import collections
|
|
11
18
|
import xmltodict
|
|
@@ -89,3 +96,61 @@ def GetEntityParents(ids, base_url=BASE_URL, fout=None):
|
|
|
89
96
|
return df
|
|
90
97
|
|
|
91
98
|
#############################################################################
|
|
99
|
+
##############################################################################
|
|
100
|
+
if __name__=='__main__':
|
|
101
|
+
epilog="Example entity IDs: 30273,33246,24433"
|
|
102
|
+
parser = argparse.ArgumentParser(description='ChEBI SOAP API client -- DEPRECATED', epilog=epilog)
|
|
103
|
+
ops = [
|
|
104
|
+
"get_entity",
|
|
105
|
+
"get_entity_children",
|
|
106
|
+
"get_entity_parents",
|
|
107
|
+
"search"
|
|
108
|
+
]
|
|
109
|
+
parser.add_argument("op", choices=ops, help='OPERATION (select one)')
|
|
110
|
+
parser.add_argument("--ids", help="input IDs")
|
|
111
|
+
parser.add_argument("--i", dest="ifile", help="input file, IDs")
|
|
112
|
+
parser.add_argument("--o", dest="ofile", help="output (TSV)")
|
|
113
|
+
parser.add_argument("--query", help="search query (SMILES)")
|
|
114
|
+
parser.add_argument("--skip", type=int, default=0)
|
|
115
|
+
parser.add_argument("--nmax", type=int, default=None)
|
|
116
|
+
parser.add_argument("--api_host", default=API_HOST)
|
|
117
|
+
parser.add_argument("--api_base_path", default=API_BASE_PATH)
|
|
118
|
+
parser.add_argument("-v","--verbose", action="count", default=0)
|
|
119
|
+
args = parser.parse_args()
|
|
120
|
+
|
|
121
|
+
logging.basicConfig(format='%(levelname)s:%(message)s', level=(logging.DEBUG if args.verbose>1 else logging.INFO))
|
|
122
|
+
|
|
123
|
+
base_url='https://'+args.api_host+args.api_base_path
|
|
124
|
+
|
|
125
|
+
fout = open(args.ofile, 'w') if args.ofile else sys.stdout
|
|
126
|
+
|
|
127
|
+
ids=[];
|
|
128
|
+
if args.ifile:
|
|
129
|
+
fin = open(args.ifile)
|
|
130
|
+
while True:
|
|
131
|
+
line = fin.readline()
|
|
132
|
+
if not line: break
|
|
133
|
+
ids.append(line.rstrip())
|
|
134
|
+
fin.close()
|
|
135
|
+
elif args.ids:
|
|
136
|
+
ids = re.split('[, ]+', args.ids.strip())
|
|
137
|
+
if len(ids)>0: logging.info('Input IDs: %d'%(len(ids)))
|
|
138
|
+
|
|
139
|
+
if args.op[:3]=="get" and not (args.ifile or args.ids):
|
|
140
|
+
parser.error(f"--i or --ids required for operation {args.op}.")
|
|
141
|
+
|
|
142
|
+
if args.op == "get_entity":
|
|
143
|
+
GetEntity(ids, base_url, fout)
|
|
144
|
+
|
|
145
|
+
elif args.op == "get_entity_children":
|
|
146
|
+
GetEntityChildren(ids, base_url, fout)
|
|
147
|
+
|
|
148
|
+
elif args.op == "get_entity_parents":
|
|
149
|
+
GetEntityParents(ids, base_url, fout)
|
|
150
|
+
|
|
151
|
+
elif args.op == "search":
|
|
152
|
+
parser.error(f'Not yet implemented: {args.op}')
|
|
153
|
+
#Search(args.query, base_url, fout)
|
|
154
|
+
|
|
155
|
+
else:
|
|
156
|
+
parser.error(f'Invalid operation: {args.op}')
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Utility functions for ChEBI REST API.
|
|
4
|
+
https://www.ebi.ac.uk/chebi/backend/api/docs/
|
|
5
|
+
"""
|
|
6
|
+
###
|
|
7
|
+
import sys,os,re,json,time,urllib.parse,logging,requests,collections
|
|
8
|
+
import pandas as pd
|
|
9
|
+
#
|
|
10
|
+
API_HOST="www.ebi.ac.uk"
|
|
11
|
+
API_BASE_PATH="/chebi/backend/api/public"
|
|
12
|
+
BASE_URL="https://"+API_HOST+API_BASE_PATH
|
|
13
|
+
#
|
|
14
|
+
NCHUNK=100
|
|
15
|
+
#
|
|
16
|
+
##############################################################################
|
|
17
|
+
def ListSources(base_url=BASE_URL, fout=None):
|
|
18
|
+
n_out=0; tags=None; df=None;
|
|
19
|
+
response = requests.get(f"{base_url}/advanced_search/sources_list", headers={"Accept":"application/json"})
|
|
20
|
+
result = response.json()
|
|
21
|
+
logging.debug(json.dumps(result, indent=2))
|
|
22
|
+
for source in result:
|
|
23
|
+
if not tags:
|
|
24
|
+
tags = [tag for tag in source.keys() if type(source[tag]) not in (list, dict, collections.OrderedDict)]
|
|
25
|
+
df_this = pd.DataFrame({tag:[source[tag] if tag in source else ''] for tag in tags})
|
|
26
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
27
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
28
|
+
n_out += df_this.shape[0]
|
|
29
|
+
logging.info(f"n_out: {n_out}")
|
|
30
|
+
return df
|
|
31
|
+
|
|
32
|
+
##############################################################################
|
|
33
|
+
def GetEntity(ids, include_parents=False, include_children=False, base_url=BASE_URL, fout=None):
|
|
34
|
+
n_out=0; tags=None; df=None;
|
|
35
|
+
for id_this in ids:
|
|
36
|
+
url_this = f"{base_url}/compound/{id_this}"
|
|
37
|
+
url_this = f"{url_this}/?{'true' if include_parents else 'false'}&{'true' if include_children else 'false'}"
|
|
38
|
+
response = requests.get(url_this, headers={"Accept":"application/json"})
|
|
39
|
+
result = response.json()
|
|
40
|
+
if result is None: continue
|
|
41
|
+
logging.debug(json.dumps(result, indent=2))
|
|
42
|
+
if not tags:
|
|
43
|
+
tags = [tag for tag in result.keys() if type(result[tag]) not in (list, dict, collections.OrderedDict)]
|
|
44
|
+
df_this = pd.DataFrame({tag:[result[tag] if tag in result else ''] for tag in tags})
|
|
45
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
46
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
47
|
+
n_out += df_this.shape[0]
|
|
48
|
+
logging.info(f"n_out: {n_out}")
|
|
49
|
+
return df
|
|
50
|
+
|
|
51
|
+
##############################################################################
|
|
52
|
+
def GetEntityNames(ids, base_url=BASE_URL, fout=None):
|
|
53
|
+
n_out=0; df=None; tags_entity=None; tags_name = ["name", "status", "type", "source", "ascii_name", "adapted", "language_code"]
|
|
54
|
+
for id_this in ids:
|
|
55
|
+
url_this = f"{base_url}/compound/{id_this}"
|
|
56
|
+
response = requests.get(url_this, headers={"Accept":"application/json"})
|
|
57
|
+
result = response.json()
|
|
58
|
+
if result is None: continue
|
|
59
|
+
logging.debug(json.dumps(result, indent=2))
|
|
60
|
+
if not tags_entity:
|
|
61
|
+
tags_entity = [tag for tag in result.keys() if type(result[tag]) not in (list, dict, collections.OrderedDict)]
|
|
62
|
+
df_this_entity = pd.DataFrame({tag:[result[tag] if tag in result else ''] for tag in tags_entity})
|
|
63
|
+
|
|
64
|
+
names = result["names"] if "names" in result else {}
|
|
65
|
+
synonyms = names["SYNONYM"] if "SYNONYM" in names else []
|
|
66
|
+
iupac_names = names["IUPAC NAME"] if "IUPAC NAME" in names else []
|
|
67
|
+
uniprot_names = names["UNIPROT NAME"] if "UNIPROT NAME" in names else []
|
|
68
|
+
for name in synonyms+iupac_names+uniprot_names:
|
|
69
|
+
|
|
70
|
+
df_this_name = pd.DataFrame({tag:[name[tag] if tag in name else ''] for tag in tags_name})
|
|
71
|
+
df_this = pd.concat([df_this_entity, df_this_name], axis=1)
|
|
72
|
+
|
|
73
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
74
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
75
|
+
n_out += df_this.shape[0]
|
|
76
|
+
|
|
77
|
+
logging.info(f"n_out: {n_out}")
|
|
78
|
+
return df
|
|
79
|
+
|
|
80
|
+
##############################################################################
|
|
81
|
+
def GetEntityDatabaseAccessions(ids, base_url=BASE_URL, fout=None):
|
|
82
|
+
n_out=0; df=None; tags_entity=None; tags_dbacc = ["id", "accession_number", "type", "source_name", "url", "prefix"]
|
|
83
|
+
for id_this in ids:
|
|
84
|
+
url_this = f"{base_url}/compound/{id_this}"
|
|
85
|
+
response = requests.get(url_this, headers={"Accept":"application/json"})
|
|
86
|
+
result = response.json()
|
|
87
|
+
if result is None: continue
|
|
88
|
+
logging.debug(json.dumps(result, indent=2))
|
|
89
|
+
if not tags_entity:
|
|
90
|
+
tags_entity = [tag for tag in result.keys() if type(result[tag]) not in (list, dict, collections.OrderedDict)]
|
|
91
|
+
df_this_entity = pd.DataFrame({tag:[result[tag] if tag in result else ''] for tag in tags_entity})
|
|
92
|
+
|
|
93
|
+
database_accessions = result["database_accessions"] if "database_accessions" in result else {}
|
|
94
|
+
xrefs = database_accessions["MANUAL_X_REF"] if "MANUAL_X_REF" in database_accessions else []
|
|
95
|
+
cas_rns = database_accessions["CAS"] if "CAS" in database_accessions else []
|
|
96
|
+
rns = database_accessions["REGISTRY_NUMBER"] if "REGISTRY_NUMBER" in database_accessions else []
|
|
97
|
+
citations = database_accessions["CITATION"] if "CITATION" in database_accessions else []
|
|
98
|
+
|
|
99
|
+
for acc in xrefs+cas_rns+rns+citations:
|
|
100
|
+
df_this_acc = pd.DataFrame({tag:[acc[tag] if tag in acc else ''] for tag in tags_dbacc})
|
|
101
|
+
if "id" in df_this_acc:
|
|
102
|
+
df_this_acc["accession_id"] = df_this_acc.pop("id")
|
|
103
|
+
df_this_acc = df_this_acc [['accession_id'] + [col for col in df_this_acc.columns if col != 'accession_id']]
|
|
104
|
+
|
|
105
|
+
df_this = pd.concat([df_this_entity, df_this_acc], axis=1)
|
|
106
|
+
|
|
107
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
108
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
109
|
+
n_out += df_this.shape[0]
|
|
110
|
+
|
|
111
|
+
logging.info(f"n_out: {n_out}")
|
|
112
|
+
return df
|
|
113
|
+
|
|
114
|
+
##############################################################################
|
|
115
|
+
def GetCompoundData(ids, base_url=BASE_URL, fout=None):
|
|
116
|
+
n_out=0; df=None; tags_entity=None; tags_chemical = ["formula", "charge", "mass", "monoisotopic_mass"]
|
|
117
|
+
tags_structure = ["id", "smiles", "standard_inchi", "standard_inchi_key", "wurcs", "is_r_group"]
|
|
118
|
+
for id_this in ids:
|
|
119
|
+
url_this = f"{base_url}/compound/{id_this}"
|
|
120
|
+
response = requests.get(url_this, headers={"Accept":"application/json"})
|
|
121
|
+
result = response.json()
|
|
122
|
+
if result is None: continue
|
|
123
|
+
logging.debug(json.dumps(result, indent=2))
|
|
124
|
+
if not tags_entity:
|
|
125
|
+
tags_entity = [tag for tag in result.keys() if type(result[tag]) not in (list, dict, collections.OrderedDict)]
|
|
126
|
+
df_this_entity = pd.DataFrame({tag:[result[tag] if tag in result else ''] for tag in tags_entity})
|
|
127
|
+
|
|
128
|
+
chemical_data = result["chemical_data"] if "chemical_data" in result else {}
|
|
129
|
+
default_structure = result["default_structure"] if "default_structure" in result else {}
|
|
130
|
+
|
|
131
|
+
df_this_chemical = pd.DataFrame({tag:[chemical_data[tag] if tag in chemical_data else ''] for tag in tags_chemical})
|
|
132
|
+
df_this_structure = pd.DataFrame({tag:[default_structure[tag] if tag in default_structure else ''] for tag in tags_structure})
|
|
133
|
+
if "id" in df_this_structure:
|
|
134
|
+
df_this_structure["structure_id"] = df_this_structure.pop("id")
|
|
135
|
+
df_this_structure = df_this_structure [['structure_id'] + [col for col in df_this_structure.columns if col != 'structure_id']]
|
|
136
|
+
df_this = pd.concat([df_this_entity, df_this_chemical, df_this_structure], axis=1)
|
|
137
|
+
|
|
138
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
139
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
140
|
+
n_out += df_this.shape[0]
|
|
141
|
+
|
|
142
|
+
logging.info(f"n_out: {n_out}")
|
|
143
|
+
return df
|
|
144
|
+
|
|
145
|
+
##############################################################################
|
|
146
|
+
def Search(query, base_url=BASE_URL, fout=None):
|
|
147
|
+
n_out=0; df=None;
|
|
148
|
+
tags_source=[ "chebi_accession", "name", "ascii_name", "stars", "default_structure", "definition", "monoisotopicmass", "charge", "formula", "smiles", "mass", "structures", ];
|
|
149
|
+
url = f"{base_url}/es_search/?term={query}&size={NCHUNK}"
|
|
150
|
+
i_page=1;
|
|
151
|
+
while True:
|
|
152
|
+
url_this = f"{url}&page={i_page}"
|
|
153
|
+
response = requests.get(url_this, headers={"Accept":"application/json"})
|
|
154
|
+
rval = response.json()
|
|
155
|
+
logging.debug(json.dumps(rval, indent=2))
|
|
156
|
+
results = rval["results"]
|
|
157
|
+
n_total = rval["total"] if "total" in rval else 0
|
|
158
|
+
n_pages = rval["number_pages"] if "number_pages" in rval else 0
|
|
159
|
+
for result in results:
|
|
160
|
+
source_data = result["_source"] if "_source" in result else {}
|
|
161
|
+
df_this = pd.DataFrame({tag:[source_data[tag] if tag in source_data else ''] for tag in tags_source})
|
|
162
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
163
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
164
|
+
n_out += df_this.shape[0]
|
|
165
|
+
if n_out >= n_total: break
|
|
166
|
+
i_page+=1
|
|
167
|
+
logging.info(f"n_out: {n_out}")
|
|
168
|
+
return df
|
|
169
|
+
|
|
170
|
+
##############################################################################
|
|
@@ -635,19 +635,29 @@ def GetMolecule(ids, base_url=BASE_URL, fout=None):
|
|
|
635
635
|
mol = response.json()
|
|
636
636
|
if not tq: tq = tqdm.tqdm(total=len(ids), unit="mols")
|
|
637
637
|
tq.update()
|
|
638
|
+
logging.debug(json.dumps(mol, sort_keys=True, indent=2))
|
|
638
639
|
if not mol_tags:
|
|
639
640
|
mol_tags = [tag for tag in sorted(list(mol.keys())) if type(mol[tag]) not in (dict, list)]
|
|
640
641
|
if not struct_tags:
|
|
641
|
-
|
|
642
|
-
|
|
642
|
+
molecule_structures = mol["molecule_structures"]
|
|
643
|
+
if type(molecule_structures) is dict:
|
|
644
|
+
struct_tags = sorted(molecule_structures.keys())
|
|
645
|
+
struct_tags.remove("molfile")
|
|
646
|
+
else:
|
|
647
|
+
molecule_structures = {}
|
|
648
|
+
struct_tags = {}
|
|
643
649
|
if not prop_tags:
|
|
644
|
-
|
|
645
|
-
|
|
650
|
+
molecule_properties = mol["molecule_properties"]
|
|
651
|
+
if type(molecule_properties) is dict:
|
|
652
|
+
prop_tags = sorted(molecule_properties.keys())
|
|
653
|
+
else:
|
|
654
|
+
molecule_properties = {}
|
|
655
|
+
prop_tags = {}
|
|
646
656
|
parent_chembl_id = mol["molecule_hierarchy"]["parent_chembl_id"] if "molecule_hierarchy" in mol and "parent_chembl_id" in mol["molecule_hierarchy"] else ""
|
|
647
657
|
df_this = pd.concat([
|
|
648
658
|
pd.DataFrame({tag:[(mol[tag] if tag in mol else None)] for tag in mol_tags}),
|
|
649
|
-
pd.DataFrame({tag:[(
|
|
650
|
-
pd.DataFrame({tag:[(
|
|
659
|
+
pd.DataFrame({tag:[(molecule_structures[tag] if tag in molecule_structures else None)] for tag in struct_tags}),
|
|
660
|
+
pd.DataFrame({tag:[(molecule_properties[tag] if tag in molecule_properties else None)] for tag in prop_tags}),
|
|
651
661
|
pd.DataFrame({"parent_chembl_id":[parent_chembl_id]})], axis=1)
|
|
652
662
|
if fout is None: df = pd.concat([df, df_this])
|
|
653
663
|
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
@@ -44,6 +44,7 @@ if __name__=='__main__':
|
|
|
44
44
|
"list_atcs",
|
|
45
45
|
"list_xrefs",
|
|
46
46
|
"list_xref_types",
|
|
47
|
+
"list_targets",
|
|
47
48
|
"search_indications",
|
|
48
49
|
"search_products",
|
|
49
50
|
"meta_listdbs"
|
|
@@ -152,6 +153,9 @@ if __name__=='__main__':
|
|
|
152
153
|
elif args.op=='list_xrefs':
|
|
153
154
|
drugcentral.ListXrefs(dbcon, fout)
|
|
154
155
|
|
|
156
|
+
elif args.op=='list_targets':
|
|
157
|
+
drugcentral.ListTargets(dbcon, fout)
|
|
158
|
+
|
|
155
159
|
elif args.op=='get_structure':
|
|
156
160
|
drugcentral.GetStructure(dbcon, ids, fout)
|
|
157
161
|
|