BioClients 0.2.18__tar.gz → 0.2.20__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/badapple/Client.py +73 -0
- BioClients-0.2.20/BioClients/badapple/Utils.py +114 -0
- BioClients-0.2.20/BioClients/biomarkerkb/Client.py +59 -0
- BioClients-0.2.20/BioClients/biomarkerkb/Utils.py +34 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/disgenet/Client.py +20 -45
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/disgenet/Utils.py +82 -110
- BioClients-0.2.20/BioClients/entrez/Client.py +54 -0
- BioClients-0.2.20/BioClients/entrez/Utils.py +25 -0
- BioClients-0.2.20/BioClients/entrez/__init__.py +3 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ubkg/Client.py +15 -3
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ubkg/Utils.py +52 -17
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/umls/Utils.py +3 -3
- BioClients-0.2.20/BioClients/wikidata/__init__.py +1 -0
- BioClients-0.2.20/BioClients/wikipathways/__init__.py +1 -0
- BioClients-0.2.20/BioClients.egg-info/PKG-INFO +105 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients.egg-info/SOURCES.txt +9 -0
- BioClients-0.2.20/PKG-INFO +105 -0
- BioClients-0.2.20/README.md +87 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/setup.py +2 -2
- BioClients-0.2.18/BioClients.egg-info/PKG-INFO +0 -75
- BioClients-0.2.18/PKG-INFO +0 -75
- BioClients-0.2.18/README.md +0 -61
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/allen/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/allen/brain/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/allen/brain/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/allen/brain/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/amp/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/amp/t2d/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/amp/t2d/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/amp/t2d/__init__.py +0 -0
- {BioClients-0.2.18/BioClients/bindingdb → BioClients-0.2.20/BioClients/badapple}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/bindingdb/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/bindingdb/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/biogrid → BioClients-0.2.20/BioClients/bindingdb}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/biogrid/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/biogrid/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/bioregistry → BioClients-0.2.20/BioClients/biogrid}/__init__.py +0 -0
- {BioClients-0.2.18/BioClients/brenda → BioClients-0.2.20/BioClients/biomarkerkb}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/bioregistry/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/bioregistry/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/cdc → BioClients-0.2.20/BioClients/bioregistry}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/brenda/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/brenda/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/cfde/cfchemdb → BioClients-0.2.20/BioClients/brenda}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cas/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cas/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cas/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cdc/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cdc/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/chebi → BioClients-0.2.20/BioClients/cdc}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cfde/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cfde/cfchemdb/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/cfde/cfchemdb/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/chembl → BioClients-0.2.20/BioClients/cfde/cfchemdb}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chebi/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chebi/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/clinicaltrials → BioClients-0.2.20/BioClients/chebi}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/slap/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/slap/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chem2bio2rdf/slap/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chembl/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chembl/FetchByID.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chembl/UnichemClient.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chembl/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/disgenet → BioClients-0.2.20/BioClients/chembl}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chemidplus/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chemidplus/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/chemidplus/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/clinicaltrials/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/clinicaltrials/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/drugcentral → BioClients-0.2.20/BioClients/clinicaltrials}/__init__.py +0 -0
- {BioClients-0.2.18/BioClients/emblebi/identifiers → BioClients-0.2.20/BioClients/disgenet}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/dnorm/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/dnorm/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/drugcentral/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/drugcentral/Test.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/drugcentral/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/emblebi/unichem → BioClients-0.2.20/BioClients/drugcentral}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/emblebi/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/emblebi/identifiers/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/emblebi/identifiers/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/ensembl/biomart → BioClients-0.2.20/BioClients/emblebi/identifiers}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/emblebi/unichem/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/emblebi/unichem/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/fda/aer → BioClients-0.2.20/BioClients/emblebi/unichem}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ensembl/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ensembl/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ensembl/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ensembl/biomart/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ensembl/biomart/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/geneontology → BioClients-0.2.20/BioClients/ensembl/biomart}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/fda/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/fda/aer/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/fda/aer/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/glygen → BioClients-0.2.20/BioClients/fda/aer}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/geneontology/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/geneontology/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/gtex → BioClients-0.2.20/BioClients/geneontology}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/glygen/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/glygen/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/gwascatalog → BioClients-0.2.20/BioClients/glygen}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/gtex/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/gtex/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/hubmap → BioClients-0.2.20/BioClients/gtex}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/gwascatalog/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/gwascatalog/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/hugo → BioClients-0.2.20/BioClients/gwascatalog}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/hubmap/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/hubmap/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/icite → BioClients-0.2.20/BioClients/hubmap}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/hugo/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/hugo/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/idg/pharos → BioClients-0.2.20/BioClients/hugo}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/humanbase/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/humanbase/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/icite/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/icite/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/idg/rss → BioClients-0.2.20/BioClients/icite}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/pharos/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/pharos/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/idg/tcrd → BioClients-0.2.20/BioClients/idg/pharos}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/rss/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/rss/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/idg/tiga → BioClients-0.2.20/BioClients/idg/rss}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tcrd/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tcrd/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/idg/tinx → BioClients-0.2.20/BioClients/idg/tcrd}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tiga/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tiga/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/iuphar → BioClients-0.2.20/BioClients/idg/tiga}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tinx/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/idg/tinx/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/jensenlab → BioClients-0.2.20/BioClients/idg/tinx}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/iuphar/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/iuphar/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/lincs → BioClients-0.2.20/BioClients/iuphar}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/jensenlab/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/jensenlab/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/lincs/sigcom → BioClients-0.2.20/BioClients/jensenlab}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/lincs/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/lincs/Client_lincscloud.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/lincs/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/maayanlab/archs4 → BioClients-0.2.20/BioClients/lincs}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/lincs/sigcom/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/lincs/sigcom/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/maayanlab/harmonizome → BioClients-0.2.20/BioClients/lincs/sigcom}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/maayanlab/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/maayanlab/archs4/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/maayanlab/archs4/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/medline/connect → BioClients-0.2.20/BioClients/maayanlab/archs4}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/maayanlab/harmonizome/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/maayanlab/harmonizome/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/medline/genetics → BioClients-0.2.20/BioClients/maayanlab/harmonizome}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/medline/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/medline/connect/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/medline/connect/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/mesh → BioClients-0.2.20/BioClients/medline/connect}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/medline/genetics/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/medline/genetics/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/monarch → BioClients-0.2.20/BioClients/medline/genetics}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/mesh/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/mesh/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/mygene → BioClients-0.2.20/BioClients/mesh}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/monarch/Biolink.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/monarch/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/monarch/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/ncats/gsrs → BioClients-0.2.20/BioClients/monarch}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/mygene/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/mygene/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/ncbo → BioClients-0.2.20/BioClients/mygene}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ncats/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ncats/gsrs/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ncats/gsrs/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/oncotree → BioClients-0.2.20/BioClients/ncats/gsrs}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ncbo/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/ncbo/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/openphacts → BioClients-0.2.20/BioClients/ncbo}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/omim/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/omim/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/oncotree/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/oncotree/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/opentargets → BioClients-0.2.20/BioClients/oncotree}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/openphacts/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/openphacts/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/pdb → BioClients-0.2.20/BioClients/openphacts}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/opentargets/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/opentargets/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/pubchem/ftp → BioClients-0.2.20/BioClients/opentargets}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/panther/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/panther/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pdb/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pdb/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/pubchem/soap → BioClients-0.2.20/BioClients/pdb}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/pubtator → BioClients-0.2.20/BioClients/pubchem/ftp}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_actives.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_assay_fetch.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_assay_results.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_assay_search.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_assaysim.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_compound_assaystats.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/ftp/pubchem_ftp_gini_index.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/rdf/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/rdf/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/soap/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/soap/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/rxnorm → BioClients-0.2.20/BioClients/pubchem/soap}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/soap/pug_aids2assays.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/soap/pug_ids2mols.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubchem/soap/pug_substance_search.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubmed/App_XML.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubmed/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubmed/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubmed/Utils_XML.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubmed/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubtator/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/pubtator/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/stringdb → BioClients-0.2.20/BioClients/pubtator}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/reactome/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/reactome/SMBL_utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/reactome/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/reactome/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/rxnorm/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/rxnorm/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/tcga → BioClients-0.2.20/BioClients/rxnorm}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/stringdb/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/stringdb/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/ubkg → BioClients-0.2.20/BioClients/stringdb}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/tcga/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/tcga/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/umls → BioClients-0.2.20/BioClients/tcga}/__init__.py +0 -0
- {BioClients-0.2.18/BioClients/uniprot → BioClients-0.2.20/BioClients/ubkg}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/umls/Client.py +0 -0
- {BioClients-0.2.18/BioClients/util/db → BioClients-0.2.20/BioClients/umls}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/uniprot/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/uniprot/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/graphql → BioClients-0.2.20/BioClients/uniprot}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/db/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/hdf → BioClients-0.2.20/BioClients/util/db}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/graphql/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/igraph → BioClients-0.2.20/BioClients/util/graphql}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/hdf/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/neo4j → BioClients-0.2.20/BioClients/util/hdf}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/igraph/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/igraph/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/obo → BioClients-0.2.20/BioClients/util/igraph}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/neo4j/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/neo4j/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/owl → BioClients-0.2.20/BioClients/util/neo4j}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/obo/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/obo/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/pandas → BioClients-0.2.20/BioClients/util/obo}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/owl/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/owl/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/rdf → BioClients-0.2.20/BioClients/util/owl}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/pandas/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/pandas/Csv2Html.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/pandas/Csv2Markdown.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/pandas/Csv2Sql.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/pandas/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/rest → BioClients-0.2.20/BioClients/util/pandas}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/rdf/App.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/rdf/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/sparql → BioClients-0.2.20/BioClients/util/rdf}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/rest/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/xml → BioClients-0.2.20/BioClients/util/rest}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/sparql/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/sparql/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/util/yaml → BioClients-0.2.20/BioClients/util/sparql}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/xml/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/wikidata → BioClients-0.2.20/BioClients/util/xml}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/util/yaml/Utils.py +0 -0
- {BioClients-0.2.18/BioClients/wikipathways → BioClients-0.2.20/BioClients/util/yaml}/__init__.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/wikidata/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/wikidata/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/wikipathways/Client.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients/wikipathways/Utils.py +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients.egg-info/dependency_links.txt +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/BioClients.egg-info/top_level.txt +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/LICENSE +0 -0
- {BioClients-0.2.18 → BioClients-0.2.20}/setup.cfg +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
https://chiltepin.health.unm.edu/badapple2/apidocs/
|
|
4
|
+
"""
|
|
5
|
+
###
|
|
6
|
+
import sys,os,re,argparse,time,logging
|
|
7
|
+
#
|
|
8
|
+
from .. import badapple
|
|
9
|
+
#
|
|
10
|
+
##############################################################################
|
|
11
|
+
if __name__=='__main__':
|
|
12
|
+
parser = argparse.ArgumentParser(
|
|
13
|
+
description='Badapple REST API client utility',
|
|
14
|
+
epilog="""\
|
|
15
|
+
Example SMILES: OC(=O)C1=C2CCCC(C=C3C=CC(=O)C=C3)=C2NC2=CC=CC=C12
|
|
16
|
+
Example scaffold IDs: 46,50
|
|
17
|
+
""")
|
|
18
|
+
ops = ['get_compound2scaffolds', 'get_scaffold_info', 'get_scaffold2compounds', 'get_scaffold2drugs', ]
|
|
19
|
+
parser.add_argument("op",choices=ops,help='OPERATION')
|
|
20
|
+
parser.add_argument("--smi", dest="smi", help="input SMILES")
|
|
21
|
+
parser.add_argument("--ids", dest="ids", help="input IDs, comma-separated")
|
|
22
|
+
parser.add_argument("--i", dest="ifile", help="input SMILES file (with optional appended <space>NAME), or input IDs file")
|
|
23
|
+
parser.add_argument("--db", choices=badapple.DATABASES, default="badapple2", help="default=badapple2")
|
|
24
|
+
parser.add_argument("--o", dest="ofile", help="output file (TSV)")
|
|
25
|
+
parser.add_argument("--max_rings", type=int, default=10, help="max rings")
|
|
26
|
+
parser.add_argument("--api_host", default=badapple.API_HOST)
|
|
27
|
+
parser.add_argument("--api_base_path", default=badapple.API_BASE_PATH)
|
|
28
|
+
parser.add_argument("-v", "--verbose", action="count", default=0)
|
|
29
|
+
|
|
30
|
+
args = parser.parse_args()
|
|
31
|
+
|
|
32
|
+
logging.basicConfig(format='%(levelname)s:%(message)s', level=(logging.DEBUG if args.verbose>1 else logging.INFO))
|
|
33
|
+
|
|
34
|
+
base_url='https://'+args.api_host+args.api_base_path
|
|
35
|
+
|
|
36
|
+
fout = open(args.ofile,"w") if args.ofile else sys.stdout
|
|
37
|
+
|
|
38
|
+
t0=time.time()
|
|
39
|
+
|
|
40
|
+
if args.ifile:
|
|
41
|
+
fin = open(args.ifile)
|
|
42
|
+
ids = [];
|
|
43
|
+
while True:
|
|
44
|
+
line = fin.readline()
|
|
45
|
+
if not line: break
|
|
46
|
+
if line.rstrip(): ids.append(line.rstrip())
|
|
47
|
+
logging.info(f"Input SMILES: {len(ids)}")
|
|
48
|
+
fin.close()
|
|
49
|
+
elif args.ids:
|
|
50
|
+
ids = re.split(r'[, ]+', args.ids.strip())
|
|
51
|
+
elif args.smi:
|
|
52
|
+
ids = [args.smi.strip()]
|
|
53
|
+
|
|
54
|
+
if args.op == "get_compound2scaffolds":
|
|
55
|
+
badapple.GetCompound2Scaffolds(ids, args.db, args.max_rings, base_url, fout)
|
|
56
|
+
|
|
57
|
+
elif args.op == "get_scaffold_info":
|
|
58
|
+
badapple.GetScaffoldInfo(ids, args.db, base_url, fout)
|
|
59
|
+
|
|
60
|
+
elif args.op == "get_scaffold2compounds":
|
|
61
|
+
badapple.GetScaffold2Compounds(ids, args.db, base_url, fout)
|
|
62
|
+
|
|
63
|
+
elif args.op == "get_scaffold2drugs":
|
|
64
|
+
badapple.GetScaffold2Drugs(ids, args.db, base_url, fout)
|
|
65
|
+
|
|
66
|
+
elif args.op == "get_version":
|
|
67
|
+
#badapple.GetVersion(args.db, base_url, fout)
|
|
68
|
+
parser.error("Not implemented.")
|
|
69
|
+
|
|
70
|
+
else:
|
|
71
|
+
parser.error("No operation specified.")
|
|
72
|
+
|
|
73
|
+
logging.info(f"elapsed time: {time.strftime('%Hh:%Mm:%Ss',time.gmtime(time.time()-t0))}")
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
"""
|
|
4
|
+
###
|
|
5
|
+
import sys,os,io,re,time,requests,urllib,json,logging
|
|
6
|
+
import pandas as pd
|
|
7
|
+
#
|
|
8
|
+
API_HOST='chiltepin.health.unm.edu'
|
|
9
|
+
API_BASE_PATH='/badapple2/api/v1'
|
|
10
|
+
BASE_URL='https://'+API_HOST+API_BASE_PATH
|
|
11
|
+
#
|
|
12
|
+
DATABASES = ["badapple2", "badapple_classic"]
|
|
13
|
+
#
|
|
14
|
+
##############################################################################
|
|
15
|
+
def GetCompound2Scaffolds(smis, database, max_rings, base_url=BASE_URL, fout=None):
|
|
16
|
+
params = {}; n_out=0; df=None;
|
|
17
|
+
tags = ["id", "in_db", "prank", "pscore", "in_drug", "nass_active", "nass_tested", "ncpd_active", "ncpd_tested", "ncpd_total", "nsam_active", "nsam_tested", "nsub_active", "nsub_tested", "nsub_total", "scafsmi", "kekule_scafsmi", "scaftree" ]
|
|
18
|
+
headers = {'Accept': 'application/json'}
|
|
19
|
+
url = f"{base_url}/compound_search/get_associated_scaffolds_ordered"
|
|
20
|
+
params['database'] = database
|
|
21
|
+
params['max_rings'] = max_rings
|
|
22
|
+
for smi_this in smis:
|
|
23
|
+
vals = re.split(r'\s+', smi_this, 1)
|
|
24
|
+
if len(vals)>1:
|
|
25
|
+
params['SMILES'],params['Names'] = vals
|
|
26
|
+
else:
|
|
27
|
+
params['SMILES'],params['Names'] = smi_this, "Unspecified"
|
|
28
|
+
response = requests.get(url, params=params, headers=headers)
|
|
29
|
+
results = response.json()
|
|
30
|
+
logging.debug(json.dumps(results, indent=2))
|
|
31
|
+
scafs = results[0]["scaffolds"]
|
|
32
|
+
for scaf in scafs:
|
|
33
|
+
scaf_this = {"molecule_SMILES": params['SMILES'], "molecule_Name": params['Names'], "db": database}
|
|
34
|
+
for tag in tags:
|
|
35
|
+
scaf_this[tag] = scaf[tag] if tag in scaf else ""
|
|
36
|
+
df_this = pd.DataFrame([scaf_this])
|
|
37
|
+
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
38
|
+
else: df = pd.concat([df, df_this])
|
|
39
|
+
n_out+=1
|
|
40
|
+
logging.info(f"Compounds: {len(smis)}; Scaffolds: {n_out}")
|
|
41
|
+
return df
|
|
42
|
+
|
|
43
|
+
##############################################################################
|
|
44
|
+
def GetScaffoldInfo(ids, database, base_url=BASE_URL, fout=None):
|
|
45
|
+
params = {}; n_out=0; df=None;
|
|
46
|
+
tags = ["id", "scafsmi", "kekule_scafsmi", "pscore", "prank", "in_drug", "nass_active", "nass_tested", "ncpd_active", "ncpd_tested", "ncpd_total", "nsam_active", "nsam_tested", "nsub_active", "nsub_tested", "nsub_total", "scaftree"]
|
|
47
|
+
headers = {'Accept': 'application/json'}
|
|
48
|
+
url = f"{base_url}/scaffold_search/get_scaffold_info"
|
|
49
|
+
params['database'] = database
|
|
50
|
+
for id_this in ids:
|
|
51
|
+
params['scafid'] = id_this
|
|
52
|
+
response = requests.get(url, params=params, headers=headers)
|
|
53
|
+
results = response.json()
|
|
54
|
+
logging.debug(json.dumps(results, indent=2))
|
|
55
|
+
scaf = results
|
|
56
|
+
scaf_this = {"db": database}
|
|
57
|
+
for tag in tags:
|
|
58
|
+
scaf_this[tag] = scaf[tag] if tag in scaf else ""
|
|
59
|
+
df_this = pd.DataFrame([scaf_this])
|
|
60
|
+
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
61
|
+
else: df = pd.concat([df, df_this])
|
|
62
|
+
n_out+=1
|
|
63
|
+
logging.info(f"Scaffolds: {n_out}")
|
|
64
|
+
return df
|
|
65
|
+
|
|
66
|
+
##############################################################################
|
|
67
|
+
def GetScaffold2Compounds(ids, database, base_url=BASE_URL, fout=None):
|
|
68
|
+
params = {}; n_out=0; df=None;
|
|
69
|
+
tags = ["cansmi", "cid", "isosmi", "nass_active", "nass_tested", "nsam_active", "nsam_tested", "nsub_active", "nsub_tested", "nsub_total"]
|
|
70
|
+
headers = {'Accept': 'application/json'}
|
|
71
|
+
url = f"{base_url}/scaffold_search/get_associated_compounds"
|
|
72
|
+
params['database'] = database
|
|
73
|
+
for id_this in ids:
|
|
74
|
+
params['scafid'] = id_this
|
|
75
|
+
response = requests.get(url, params=params, headers=headers)
|
|
76
|
+
results = response.json()
|
|
77
|
+
logging.debug(json.dumps(results, indent=2))
|
|
78
|
+
cpds = results
|
|
79
|
+
for cpd in cpds:
|
|
80
|
+
cpd_this = {"scafid": id_this, "db": database}
|
|
81
|
+
for tag in tags:
|
|
82
|
+
cpd_this[tag] = cpd[tag] if tag in cpd else ""
|
|
83
|
+
df_this = pd.DataFrame([cpd_this])
|
|
84
|
+
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
85
|
+
else: df = pd.concat([df, df_this])
|
|
86
|
+
n_out+=1
|
|
87
|
+
logging.info(f"Scaffolds: {len(ids)}; Compounds: {n_out}")
|
|
88
|
+
return df
|
|
89
|
+
|
|
90
|
+
##############################################################################
|
|
91
|
+
def GetScaffold2Drugs(ids, database, base_url=BASE_URL, fout=None):
|
|
92
|
+
params = {}; n_out=0; df=None;
|
|
93
|
+
tags = ["cansmi", "cid", "isosmi", "nass_active", "nass_tested", "nsam_active", "nsam_tested", "nsub_active", "nsub_tested", "nsub_total"]
|
|
94
|
+
headers = {'Accept': 'application/json'}
|
|
95
|
+
url = f"{base_url}/scaffold_search/get_associated_drugs"
|
|
96
|
+
params['database'] = database
|
|
97
|
+
for id_this in ids:
|
|
98
|
+
params['scafid'] = id_this
|
|
99
|
+
response = requests.get(url, params=params, headers=headers)
|
|
100
|
+
results = response.json()
|
|
101
|
+
logging.debug(json.dumps(results, indent=2))
|
|
102
|
+
cpds = results
|
|
103
|
+
for cpd in cpds:
|
|
104
|
+
cpd_this = {"scafid": id_this, "db": database}
|
|
105
|
+
for tag in tags:
|
|
106
|
+
cpd_this[tag] = cpd[tag] if tag in cpd else ""
|
|
107
|
+
df_this = pd.DataFrame([cpd_this])
|
|
108
|
+
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
109
|
+
else: df = pd.concat([df, df_this])
|
|
110
|
+
n_out+=1
|
|
111
|
+
logging.info(f"Scaffolds: {len(ids)}; Drugs: {n_out}")
|
|
112
|
+
return df
|
|
113
|
+
|
|
114
|
+
##############################################################################
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Utility for BiomarkerKB REST API.
|
|
4
|
+
|
|
5
|
+
* https://api.biomarkerkb.org/
|
|
6
|
+
"""
|
|
7
|
+
###
|
|
8
|
+
import sys,os,re,json,argparse,time,logging
|
|
9
|
+
import pandas as pd
|
|
10
|
+
#
|
|
11
|
+
from .. import biomarkerkb
|
|
12
|
+
#
|
|
13
|
+
##############################################################################
|
|
14
|
+
if __name__=='__main__':
|
|
15
|
+
epilog="Example BiomarkerKB ID: AN6278-1"
|
|
16
|
+
parser = argparse.ArgumentParser(description='BiomarkerKB REST API client', epilog=epilog)
|
|
17
|
+
ops = [
|
|
18
|
+
"get_biomarker_detail",
|
|
19
|
+
"list_biomarker",
|
|
20
|
+
"search_biomarker"
|
|
21
|
+
]
|
|
22
|
+
parser.add_argument("op", choices=ops, help='OPERATION (select one)')
|
|
23
|
+
parser.add_argument("--ids", help="input IDs")
|
|
24
|
+
parser.add_argument("--i", dest="ifile", help="input file, IDs")
|
|
25
|
+
parser.add_argument("--o", dest="ofile", help="output (TSV)")
|
|
26
|
+
parser.add_argument("--query", help="search query (SMILES)")
|
|
27
|
+
parser.add_argument("--skip", type=int, default=0)
|
|
28
|
+
parser.add_argument("--nmax", type=int, default=None)
|
|
29
|
+
parser.add_argument("--api_host", default=biomarkerkb.API_HOST)
|
|
30
|
+
parser.add_argument("--api_base_path", default=biomarkerkb.API_BASE_PATH)
|
|
31
|
+
parser.add_argument("-v","--verbose", action="count", default=0)
|
|
32
|
+
args = parser.parse_args()
|
|
33
|
+
|
|
34
|
+
logging.basicConfig(format='%(levelname)s:%(message)s', level=(logging.DEBUG if args.verbose>1 else logging.INFO))
|
|
35
|
+
|
|
36
|
+
base_url='https://'+args.api_host+args.api_base_path
|
|
37
|
+
|
|
38
|
+
fout = open(args.ofile, 'w') if args.ofile else sys.stdout
|
|
39
|
+
|
|
40
|
+
ids=[]
|
|
41
|
+
if args.ifile:
|
|
42
|
+
fin = open(args.ifile)
|
|
43
|
+
while True:
|
|
44
|
+
line = fin.readline()
|
|
45
|
+
if not line: break
|
|
46
|
+
ids.append(line.rstrip())
|
|
47
|
+
fin.close()
|
|
48
|
+
elif args.ids:
|
|
49
|
+
ids = re.split('[, ]+', args.ids.strip())
|
|
50
|
+
if len(ids)>0: logging.info('Input IDs: %d'%(len(ids)))
|
|
51
|
+
|
|
52
|
+
if args.op[:3]=="get" and not (args.ifile or args.ids):
|
|
53
|
+
parser.error(f"--i or --ids required for operation {args.op}.")
|
|
54
|
+
|
|
55
|
+
if args.op == "get_biomarker_detail":
|
|
56
|
+
biomarkerkb.GetBiomarkerDetail(ids, args.skip, base_url, fout)
|
|
57
|
+
|
|
58
|
+
else:
|
|
59
|
+
parser.error(f'Invalid operation: {args.op}')
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Utility functions for BiomarkerKB REST API.
|
|
4
|
+
https://api.biomarkerkb.org/
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
###
|
|
8
|
+
import sys,os,re,json,collections,time,urllib.parse,logging,tqdm,tqdm.auto
|
|
9
|
+
import pandas as pd
|
|
10
|
+
import requests
|
|
11
|
+
#
|
|
12
|
+
NCHUNK=100
|
|
13
|
+
#
|
|
14
|
+
API_HOST="api.biomarkerkb.org"
|
|
15
|
+
API_BASE_PATH=""
|
|
16
|
+
BASE_URL="https://"+API_HOST+API_BASE_PATH
|
|
17
|
+
#
|
|
18
|
+
##############################################################################
|
|
19
|
+
def GetBiomarkerDetail(ids, skip, base_url=BASE_URL, fout=None):
|
|
20
|
+
n_out=0; tags=None; df=None;
|
|
21
|
+
for i in tqdm.auto.trange(len(ids), desc="IDs"):
|
|
22
|
+
id_this = ids[i]
|
|
23
|
+
response = requests.get(f"{base_url}/biomarker/detail/{id_this}", headers={"Accept":"application/json"})
|
|
24
|
+
result = response.json()
|
|
25
|
+
logging.debug(json.dumps(result, indent=2))
|
|
26
|
+
if not tags: tags = [tag for tag in result.keys() if type(result[tag]) not in (list, dict, collections.OrderedDict)]
|
|
27
|
+
df_this = pd.DataFrame({tags[j]:[result[tags[j]]] for j in range(len(tags))})
|
|
28
|
+
if fout is None: df = pd.concat([df, df_this])
|
|
29
|
+
else: df_this.to_csv(fout, sep="\t", index=False, header=bool(n_out==0))
|
|
30
|
+
n_out += df_this.shape[0]
|
|
31
|
+
logging.info(f"n_out: {n_out}")
|
|
32
|
+
return df
|
|
33
|
+
|
|
34
|
+
##############################################################################
|
|
@@ -1,33 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
|
|
4
|
-
https://www.disgenet.org/dbinfo
|
|
5
|
-
DisGeNET Disease Types : disease, phenotype, group
|
|
6
|
-
DisGeNET Metrics:
|
|
7
|
-
GDA Score
|
|
8
|
-
VDA Score
|
|
9
|
-
Disease Specificity Index (DSI)
|
|
10
|
-
Disease Pleiotropy Index (DPI)
|
|
11
|
-
Evidence Level (EL)
|
|
12
|
-
Evidence Index (EI)
|
|
13
|
-
GNOMAD pLI (Loss-of-function Intolerant)
|
|
14
|
-
|
|
15
|
-
DisGeNET Association Types:
|
|
16
|
-
Therapeutic
|
|
17
|
-
Biomarker
|
|
18
|
-
Genomic Alterations
|
|
19
|
-
GeneticVariation
|
|
20
|
-
Causal Mutation
|
|
21
|
-
Germline Causal Mutation
|
|
22
|
-
Somatic Causal Mutation
|
|
23
|
-
Chromosomal Rearrangement
|
|
24
|
-
Fusion Gene
|
|
25
|
-
Susceptibility Mutation
|
|
26
|
-
Modifying Mutation
|
|
27
|
-
Germline Modifying Mutation
|
|
28
|
-
Somatic Modifying Mutation
|
|
29
|
-
AlteredExpression
|
|
30
|
-
Post-translational Modification
|
|
3
|
+
https://www.disgenet.com/Profile-area#howtouse
|
|
31
4
|
"""
|
|
32
5
|
###
|
|
33
6
|
import sys,os,re,argparse,time,logging
|
|
@@ -38,22 +11,24 @@ from ..util import yaml as util_yaml
|
|
|
38
11
|
##############################################################################
|
|
39
12
|
if __name__=='__main__':
|
|
40
13
|
parser = argparse.ArgumentParser(
|
|
41
|
-
description='Disgenet
|
|
14
|
+
description='Disgenet.org REST API client utility',
|
|
42
15
|
epilog="""\
|
|
43
16
|
Example IDs: C0019829 (UMLS CUI); 351 (NCBI Gene ID) """)
|
|
44
|
-
ops = ['
|
|
17
|
+
ops = ['search_diseases', 'get_diseases', 'get_disease_GDAs', 'get_gene_GDAs', 'get_version']
|
|
45
18
|
parser.add_argument("op",choices=ops,help='OPERATION')
|
|
46
19
|
parser.add_argument("--ids", dest="ids", help="IDs, comma-separated (Disease UMLS CUIs, or Gene EntrezIDs, HGNC symbols, or UniProtIDs)")
|
|
47
20
|
parser.add_argument("--i", dest="ifile", help="input file of IDs")
|
|
48
|
-
parser.add_argument("--source", choices=disgenet.SOURCES, default="
|
|
21
|
+
parser.add_argument("--source", choices=disgenet.SOURCES, default="CURATED", help="default=CURATED")
|
|
49
22
|
parser.add_argument("--disease_type", choices=disgenet.DISEASE_TYPES, default="disease")
|
|
50
|
-
parser.add_argument("--
|
|
23
|
+
parser.add_argument("--disease_classes", help="List of MeSH disease classes, comma-separated, e.g. C01 for Infections")
|
|
24
|
+
parser.add_argument("--geneid_type", choices=disgenet.GENEID_TYPES, default="ncbi")
|
|
51
25
|
parser.add_argument("--o", dest="ofile", help="output file (TSV)")
|
|
52
26
|
parser.add_argument("--nmax", type=int, default=None, help="max results")
|
|
53
27
|
parser.add_argument("--api_host", default=disgenet.API_HOST)
|
|
54
28
|
parser.add_argument("--api_base_path", default=disgenet.API_BASE_PATH)
|
|
55
|
-
parser.add_argument("--user_email")
|
|
56
|
-
parser.add_argument("--user_password")
|
|
29
|
+
#parser.add_argument("--user_email")
|
|
30
|
+
#parser.add_argument("--user_password")
|
|
31
|
+
parser.add_argument("--api_key")
|
|
57
32
|
parser.add_argument("--param_file", default=os.environ['HOME']+"/.disgenet.yaml")
|
|
58
33
|
parser.add_argument("-v", "--verbose", action="count", default=0)
|
|
59
34
|
|
|
@@ -63,9 +38,9 @@ Example IDs: C0019829 (UMLS CUI); 351 (NCBI Gene ID) """)
|
|
|
63
38
|
|
|
64
39
|
if os.path.isfile(args.param_file):
|
|
65
40
|
params = util_yaml.ReadParamFile(args.param_file)
|
|
66
|
-
if args.user_email: params['EMAIL'] = args.user_email
|
|
67
|
-
if args.user_password: params['PASSWORD'] = args.user_password
|
|
68
|
-
|
|
41
|
+
#if args.user_email: params['EMAIL'] = args.user_email
|
|
42
|
+
#if args.user_password: params['PASSWORD'] = args.user_password
|
|
43
|
+
if args.api_key: params['API_KEY'] = args.api_key
|
|
69
44
|
|
|
70
45
|
base_url='https://'+args.api_host+args.api_base_path
|
|
71
46
|
|
|
@@ -86,19 +61,19 @@ Example IDs: C0019829 (UMLS CUI); 351 (NCBI Gene ID) """)
|
|
|
86
61
|
ids = re.split('[, ]+', args.ids.strip())
|
|
87
62
|
|
|
88
63
|
if args.op == "get_disease_GDAs":
|
|
89
|
-
disgenet.GetDiseaseGDAs(ids, args.source, params["
|
|
64
|
+
disgenet.GetDiseaseGDAs(ids, args.source, params["API_KEY"], base_url, fout)
|
|
90
65
|
|
|
91
66
|
elif args.op == "get_gene_GDAs":
|
|
92
|
-
disgenet.GetGeneGDAs(ids, args.
|
|
93
|
-
|
|
94
|
-
elif args.op == "get_protein_GDAs":
|
|
95
|
-
disgenet.GetProteinGDAs(ids, args.source, params["EMAIL"], params["PASSWORD"], base_url, fout)
|
|
67
|
+
disgenet.GetGeneGDAs(ids, args.geneid_type, args.source, params["API_KEY"], base_url, fout)
|
|
96
68
|
|
|
97
69
|
elif args.op == "get_diseases":
|
|
98
|
-
disgenet.GetDiseases(
|
|
70
|
+
disgenet.GetDiseases(ids, args.disease_type, args.disease_classes, args.nmax, params["API_KEY"], base_url, fout)
|
|
71
|
+
|
|
72
|
+
elif args.op == "search_diseases":
|
|
73
|
+
disgenet.SearchDiseases(args.query, args.source, args.disease_type, args.disease_class, args.nmax, params["API_KEY"], base_url, fout)
|
|
99
74
|
|
|
100
|
-
elif args.op == "
|
|
101
|
-
disgenet.
|
|
75
|
+
elif args.op == "get_version":
|
|
76
|
+
disgenet.GetVersion(params["API_KEY"], base_url, fout)
|
|
102
77
|
|
|
103
78
|
else:
|
|
104
79
|
parser.error("No operation specified.")
|
|
@@ -3,38 +3,13 @@
|
|
|
3
3
|
https://www.disgenet.org/api/
|
|
4
4
|
https://www.disgenet.org/dbinfo
|
|
5
5
|
DisGeNET Disease Types : disease, phenotype, group
|
|
6
|
-
DisGeNET Metrics:
|
|
7
|
-
GDA Score
|
|
8
|
-
VDA Score
|
|
9
|
-
Disease Specificity Index (DSI)
|
|
10
|
-
Disease Pleiotropy Index (DPI)
|
|
11
|
-
Evidence Level (EL)
|
|
12
|
-
Evidence Index (EI)
|
|
13
|
-
GNOMAD pLI (Loss-of-function Intolerant)
|
|
14
|
-
|
|
15
|
-
DisGeNET Association Types:
|
|
16
|
-
Therapeutic
|
|
17
|
-
Biomarker
|
|
18
|
-
Genomic Alterations
|
|
19
|
-
GeneticVariation
|
|
20
|
-
Causal Mutation
|
|
21
|
-
Germline Causal Mutation
|
|
22
|
-
Somatic Causal Mutation
|
|
23
|
-
Chromosomal Rearrangement
|
|
24
|
-
Fusion Gene
|
|
25
|
-
Susceptibility Mutation
|
|
26
|
-
Modifying Mutation
|
|
27
|
-
Germline Modifying Mutation
|
|
28
|
-
Somatic Modifying Mutation
|
|
29
|
-
AlteredExpression
|
|
30
|
-
Post-translational Modification
|
|
31
6
|
"""
|
|
32
7
|
###
|
|
33
8
|
import sys,os,io,re,time,requests,json,logging
|
|
34
9
|
import pandas as pd
|
|
35
10
|
#
|
|
36
|
-
API_HOST='
|
|
37
|
-
API_BASE_PATH='/api'
|
|
11
|
+
API_HOST='api.disgenet.com'
|
|
12
|
+
API_BASE_PATH='/api/v1'
|
|
38
13
|
BASE_URL='https://'+API_HOST+API_BASE_PATH
|
|
39
14
|
#
|
|
40
15
|
SOURCES = [
|
|
@@ -91,6 +66,7 @@ DISEASE_CLASSES = [ # MeSH Disease classes:
|
|
|
91
66
|
"F02", # Psychological Phenomena
|
|
92
67
|
"F03", # Mental Disorders
|
|
93
68
|
]
|
|
69
|
+
GENEID_TYPES = ["ncbi", "ensembl", "symbol", "uniprot"]
|
|
94
70
|
#
|
|
95
71
|
##############################################################################
|
|
96
72
|
def GetApiKey(session, user_email, user_password, base_url=BASE_URL):
|
|
@@ -112,79 +88,112 @@ def GetApiKey(session, user_email, user_password, base_url=BASE_URL):
|
|
|
112
88
|
return api_key
|
|
113
89
|
|
|
114
90
|
##############################################################################
|
|
115
|
-
def GetVersion(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
91
|
+
def GetVersion(api_key, base_url=BASE_URL, fout=None):
|
|
92
|
+
headers={'Authorization': api_key, 'Accept': 'application/json'}
|
|
93
|
+
url = f"{base_url}/public/version"
|
|
94
|
+
response = requests.get(url, headers=headers)
|
|
95
|
+
#logging.debug(response.text)
|
|
96
|
+
results = response.json()["payload"]
|
|
97
|
+
logging.debug(json.dumps(results, indent=2))
|
|
98
|
+
df = pd.DataFrame(results, index=[0])
|
|
122
99
|
if fout is not None: df.to_csv(fout, sep='\t', index=False)
|
|
123
100
|
return df
|
|
124
101
|
|
|
125
102
|
##############################################################################
|
|
126
|
-
def
|
|
127
|
-
'''NCBI Entrez Identifier or HGNC Symbol'''
|
|
103
|
+
def GetDiseaseGDAs(ids, source, api_key, base_url=BASE_URL, fout=None):
|
|
128
104
|
tags=[]; n_out=0; df=None;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if api_key is None: return
|
|
105
|
+
headers={'Authorization': api_key, 'Accept': 'application/json'}
|
|
106
|
+
url = f"{base_url}/gda/summary"
|
|
132
107
|
params = {'source': source}
|
|
133
108
|
for id_this in ids:
|
|
134
|
-
|
|
135
|
-
response =
|
|
136
|
-
|
|
109
|
+
params['disease'] = f"{id_this}"
|
|
110
|
+
response = requests.get(url, params=params, headers=headers)
|
|
111
|
+
results = response.json()
|
|
112
|
+
logging.debug(json.dumps(results, indent=2))
|
|
113
|
+
gdas = results["payload"]
|
|
137
114
|
for gda in gdas:
|
|
138
115
|
if not tags:
|
|
139
|
-
tags =
|
|
140
|
-
for tag in tags[:]:
|
|
141
|
-
if type(gda[tag]) in (list,dict):
|
|
142
|
-
tags.remove(tag)
|
|
143
|
-
logging.info(f"Ignoring field: {tag}")
|
|
116
|
+
tags = [tag for tag in gda.keys() if type(gda[tag]) not in (list,dict)]
|
|
144
117
|
df_this = pd.DataFrame({tag:[gda[tag] if tag in gda else ""] for tag in tags})
|
|
145
118
|
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
146
119
|
else: df = pd.concat([df, df_this])
|
|
147
120
|
n_out+=1
|
|
148
|
-
session.close()
|
|
149
121
|
logging.info(f"IDs: {len(ids)}; GDAs: {n_out}")
|
|
150
122
|
return df
|
|
151
123
|
|
|
152
124
|
##############################################################################
|
|
153
|
-
def
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
params = {'source': source}
|
|
125
|
+
def GetDiseases(ids, dtype, dclasses, nmax, api_key, base_url=BASE_URL, fout=None):
|
|
126
|
+
n_out=0; df=None;
|
|
127
|
+
tags = ["name", "type", "diseaseClasses_MSH", "diseaseClasses_UMLS_ST", "diseaseClasses_DO", "diseaseClasses_HPO", "diseaseCodes", "synonyms"];
|
|
128
|
+
headers={'Authorization': api_key, 'Accept': 'application/json'}
|
|
129
|
+
url = f"{base_url}/entity/disease"
|
|
130
|
+
params = {}
|
|
160
131
|
for id_this in ids:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
132
|
+
params['disease'] = f"{id_this}"
|
|
133
|
+
if dtype is not None: params['type'] = dtype
|
|
134
|
+
if dclasses is not None: params['dis_class_list'] = dclasses
|
|
135
|
+
response = requests.get(url, params=params, headers=headers)
|
|
136
|
+
if not response.ok:
|
|
137
|
+
if response.status_code == 429:
|
|
138
|
+
while response.ok is False:
|
|
139
|
+
logging.info("Query limit reached; waiting {}s...".format(response.headers['x-rate-limit-retry-after-seconds']))
|
|
140
|
+
time.sleep(int(response.headers['x-rate-limit-retry-after-seconds']))
|
|
141
|
+
response = requests.get(url, params=params, headers=headers)
|
|
142
|
+
if response.ok is True:
|
|
143
|
+
break
|
|
144
|
+
else:
|
|
145
|
+
continue
|
|
146
|
+
results = response.json()
|
|
147
|
+
logging.debug(json.dumps(results, indent=2))
|
|
148
|
+
diseases = results["payload"]
|
|
149
|
+
for disease in diseases:
|
|
150
|
+
d={}
|
|
151
|
+
for tag in tags:
|
|
152
|
+
if tag not in disease:
|
|
153
|
+
d[tag] = None
|
|
154
|
+
elif tag == "diseaseCodes":
|
|
155
|
+
d[tag] = ";".join([f"{s['vocabulary']}:{s['code']}" for s in disease[tag]])
|
|
156
|
+
elif tag == "synonyms":
|
|
157
|
+
d[tag] = ";".join([s["name"] for s in disease[tag]])
|
|
158
|
+
elif type(disease[tag]) not in (list,dict):
|
|
159
|
+
d[tag] = disease[tag]
|
|
160
|
+
elif type(disease[tag]) is list:
|
|
161
|
+
d[tag] = ";".join([str(x) for x in disease[tag]])
|
|
162
|
+
df_this = pd.DataFrame(d, index=[0])
|
|
163
|
+
if df_this is None: continue
|
|
168
164
|
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
169
165
|
else: df = pd.concat([df, df_this])
|
|
170
|
-
n_out+=
|
|
171
|
-
logging.info(f"
|
|
166
|
+
n_out+=df_this.shape[0]
|
|
167
|
+
logging.info(f"Diseases: {n_out}")
|
|
172
168
|
return df
|
|
173
169
|
|
|
174
170
|
##############################################################################
|
|
175
|
-
def
|
|
176
|
-
|
|
171
|
+
def GetGeneGDAs(ids, geneid_type, source, api_key, base_url=BASE_URL, fout=None):
|
|
172
|
+
'''NCBI Entrez Identifier or HGNC Symbol'''
|
|
177
173
|
tags=[]; n_out=0; df=None;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
headers={'Authorization': api_key, 'Accept': 'application/json'}
|
|
175
|
+
url = f"{base_url}/gda/summary"
|
|
176
|
+
params = {'source': source}
|
|
181
177
|
for id_this in ids:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
if geneid_type == "ncbi":
|
|
179
|
+
params["gene_ncbi_id"] = id_this
|
|
180
|
+
elif geneid_type == "ensembl":
|
|
181
|
+
params["gene_ensembl_id"] = id_this
|
|
182
|
+
elif geneid_type == "uniprot":
|
|
183
|
+
params["uniprot_id"] = id_this
|
|
184
|
+
else:
|
|
185
|
+
params["gene_symbol"] = id_this
|
|
186
|
+
response = requests.get(url, params=params, headers=headers)
|
|
187
|
+
results = response.json()
|
|
188
|
+
logging.debug(json.dumps(results, indent=2))
|
|
189
|
+
gdas = results["payload"]
|
|
185
190
|
for gda in gdas:
|
|
186
191
|
if not tags:
|
|
187
|
-
tags =
|
|
192
|
+
tags = list(gda.keys())
|
|
193
|
+
for tag in tags[:]:
|
|
194
|
+
if type(gda[tag]) in (list,dict):
|
|
195
|
+
tags.remove(tag)
|
|
196
|
+
logging.info(f"Ignoring field: {tag}")
|
|
188
197
|
df_this = pd.DataFrame({tag:[gda[tag] if tag in gda else ""] for tag in tags})
|
|
189
198
|
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
190
199
|
else: df = pd.concat([df, df_this])
|
|
@@ -193,40 +202,3 @@ def GetProteinGDAs(ids, source, user_email, user_password, base_url=BASE_URL, fo
|
|
|
193
202
|
return df
|
|
194
203
|
|
|
195
204
|
##############################################################################
|
|
196
|
-
def ListDiseases(user_email, user_password, base_url=BASE_URL, fout=None):
|
|
197
|
-
tags=[]; n_out=0; df=None;
|
|
198
|
-
session = requests.Session()
|
|
199
|
-
api_key = GetApiKey(session, user_email, user_password, base_url)
|
|
200
|
-
if api_key is None: return
|
|
201
|
-
for source in SOURCES:
|
|
202
|
-
url = f"{base_url}/disease/source/{source}"
|
|
203
|
-
params = {'format':'tsv'}
|
|
204
|
-
response = session.get(url, params=params)
|
|
205
|
-
if (response.status_code!=200):
|
|
206
|
-
logging.error(f"(status_code={response.status_code}): source: {source}")
|
|
207
|
-
continue
|
|
208
|
-
df_this = pd.read_csv(io.StringIO(response.text), sep='\t')
|
|
209
|
-
if fout is not None: df_this.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
210
|
-
else: df = pd.concat([df, df_this])
|
|
211
|
-
n_out+=df_this.shape[0]
|
|
212
|
-
logging.info(f"Diseases: {n_out}")
|
|
213
|
-
|
|
214
|
-
##############################################################################
|
|
215
|
-
def GetDiseases(source, dtype, dclass, nmax, user_email, user_password, base_url=BASE_URL, fout=None):
|
|
216
|
-
tags=[]; n_out=0; df=None;
|
|
217
|
-
session = requests.Session()
|
|
218
|
-
api_key = GetApiKey(session, user_email, user_password, base_url)
|
|
219
|
-
if api_key is None: return
|
|
220
|
-
url = f"{base_url}/disease/source/{source}"
|
|
221
|
-
params = {'format':'tsv'}
|
|
222
|
-
if dtype is not None: params['type'] = dtype
|
|
223
|
-
if dclass is not None: params['disease_class'] = dclass
|
|
224
|
-
if nmax is not None: params['limit'] = nmax
|
|
225
|
-
response = session.get(url, params=params)
|
|
226
|
-
#logging.debug(response.text)
|
|
227
|
-
df = pd.read_csv(io.StringIO(response.text), sep='\t')
|
|
228
|
-
if fout is not None: df.to_csv(fout, sep='\t', index=False, header=bool(n_out==0))
|
|
229
|
-
n_out+=df.shape[0]
|
|
230
|
-
logging.info(f"Diseases: {n_out}")
|
|
231
|
-
|
|
232
|
-
##############################################################################
|