BioClients 0.2.37__tar.gz → 0.2.39__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.37 → bioclients-0.2.39}/PKG-INFO +1 -1
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gwascatalog/Client.py +22 -18
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gwascatalog/Utils.py +92 -27
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/Client.py +6 -4
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/Utils.py +59 -21
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients.egg-info/PKG-INFO +1 -1
- {bioclients-0.2.37 → bioclients-0.2.39}/pyproject.toml +1 -1
- {bioclients-0.2.37 → bioclients-0.2.39}/setup.py +1 -1
- {bioclients-0.2.37 → bioclients-0.2.39}/LICENSE +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/README.md +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/allen/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/allen/brain/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/allen/brain/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/allen/brain/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/amp/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/amp/t2d/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/amp/t2d/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/amp/t2d/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/badapple/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/badapple/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/badapple/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bindingdb/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bindingdb/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bindingdb/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biogrid/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biogrid/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biogrid/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biomarkerkb/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biomarkerkb/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/biomarkerkb/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bioregistry/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bioregistry/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/bioregistry/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/brenda/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/brenda/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/brenda/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cas/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cas/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cas/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cdc/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cdc/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cdc/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cfde/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cfde/cfchemdb/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cfde/cfchemdb/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/cfde/cfchemdb/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chebi/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chebi/Client_SOAP.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chebi/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chebi/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/slap/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/slap/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chem2bio2rdf/slap/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chembl/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chembl/FetchByID.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chembl/UnichemClient.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chembl/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chembl/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chemidplus/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chemidplus/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/chemidplus/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/clinicaltrials/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/clinicaltrials/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/clinicaltrials/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/disgenet/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/disgenet/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/disgenet/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/dnorm/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/dnorm/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/drugcentral/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/drugcentral/Test.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/drugcentral/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/drugcentral/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/identifiers/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/identifiers/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/identifiers/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/unichem/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/unichem/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/emblebi/unichem/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/biomart/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/biomart/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ensembl/biomart/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/entrez/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/entrez/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/entrez/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/fda/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/fda/aer/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/fda/aer/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/fda/aer/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/geneontology/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/geneontology/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/geneontology/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/glygen/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/glygen/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/glygen/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gtex/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gtex/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gtex/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/gwascatalog/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hubmap/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hubmap/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hubmap/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hugo/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hugo/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/hugo/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/humanbase/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/humanbase/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/icite/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/icite/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/icite/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/pharos/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/pharos/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/pharos/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/rss/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/rss/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/rss/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tcrd/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tcrd/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tcrd/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tiga/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tiga/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tiga/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tinx/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tinx/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/idg/tinx/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/iuphar/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/iuphar/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/iuphar/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/jensenlab/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/jensenlab/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/jensenlab/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/Client_lincscloud.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/sigcom/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/sigcom/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/lincs/sigcom/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/archs4/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/archs4/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/archs4/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/harmonizome/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/harmonizome/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/maayanlab/harmonizome/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/connect/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/connect/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/connect/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/genetics/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/genetics/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/medline/genetics/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mesh/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mesh/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mesh/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/monarch/Biolink.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/monarch/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/monarch/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/monarch/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mygene/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mygene/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/mygene/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/gsrs/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/gsrs/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/gsrs/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/stitcher/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/stitcher/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncats/stitcher/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncbo/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncbo/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ncbo/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/omim/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/omim/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/oncotree/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/oncotree/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/oncotree/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/openphacts/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/openphacts/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/openphacts/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/opentargets/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/opentargets/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/opentargets/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/panther/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/panther/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pdb/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pdb/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pdb/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_actives.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_assay_fetch.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_assay_results.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_assay_search.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_assaysim.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_compound_assaystats.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/ftp/pubchem_ftp_gini_index.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/rdf/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/rdf/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/pug_aids2assays.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/pug_ids2mols.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubchem/soap/pug_substance_search.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubmed/App_XML.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubmed/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubmed/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubmed/Utils_XML.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubmed/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubtator/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubtator/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/pubtator/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/reactome/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/reactome/SMBL_utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/reactome/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/reactome/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/rxnorm/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/rxnorm/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/rxnorm/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/stringdb/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/stringdb/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/stringdb/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tcga/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tcga/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tcga/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tinx/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tinx/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/tinx/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ubkg/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ubkg/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/ubkg/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/umls/CPTClient.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/umls/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/umls/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/umls/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/uniprot/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/uniprot/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/uniprot/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/db/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/db/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/graphql/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/graphql/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/hdf/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/hdf/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/igraph/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/igraph/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/igraph/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/neo4j/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/neo4j/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/neo4j/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/obo/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/obo/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/obo/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/owl/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/owl/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/owl/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/Csv2Html.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/Csv2Markdown.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/Csv2Sql.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/pandas/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/rdf/App.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/rdf/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/rdf/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/rest/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/rest/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/sparql/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/sparql/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/sparql/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/xml/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/xml/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/yaml/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/util/yaml/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/who/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/who/atc/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/who/atc/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/who/atc/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikidata/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikidata/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikidata/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikipathways/Client.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikipathways/Utils.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients/wikipathways/__init__.py +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients.egg-info/SOURCES.txt +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients.egg-info/dependency_links.txt +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients.egg-info/requires.txt +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/bioclients.egg-info/top_level.txt +0 -0
- {bioclients-0.2.37 → bioclients-0.2.39}/setup.cfg +0 -0
|
@@ -26,18 +26,22 @@ Example GCSTs: GCST004364, GCST000227;
|
|
|
26
26
|
Example EFOIDs: EFO_0004232;
|
|
27
27
|
Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
28
28
|
"""
|
|
29
|
-
parser = argparse.ArgumentParser(description='GWAS Catalog REST API (V1
|
|
29
|
+
parser = argparse.ArgumentParser(description='GWAS Catalog REST API V2 (V1-deprecated) client', epilog=epilog)
|
|
30
30
|
searchtypes=['pubmedmid', 'gcst', 'efotrait', 'efouri', 'accessionid', 'rs']
|
|
31
31
|
ops = [
|
|
32
|
+
'get_metadata',
|
|
33
|
+
'get_metadata_v1',
|
|
32
34
|
'get_metadata_v2',
|
|
33
35
|
'list_studies',
|
|
36
|
+
'list_studies_v1',
|
|
34
37
|
'list_studies_v2',
|
|
35
38
|
'get_studyAssociations',
|
|
39
|
+
'get_studyAssociations_v1',
|
|
36
40
|
'get_studyAssociations_v2',
|
|
37
41
|
'get_snps',
|
|
42
|
+
'get_snps_v1',
|
|
38
43
|
'get_snps_v2',
|
|
39
|
-
'
|
|
40
|
-
'search_studies_v2'
|
|
44
|
+
'search_studies_v1'
|
|
41
45
|
]
|
|
42
46
|
parser.add_argument("op", choices=ops, help='operation')
|
|
43
47
|
parser.add_argument("--ids", dest="ids", help="IDs, comma-separated")
|
|
@@ -47,13 +51,13 @@ Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
|
47
51
|
parser.add_argument("--skip", type=int, default=0)
|
|
48
52
|
parser.add_argument("--nmax", type=int, default=None)
|
|
49
53
|
parser.add_argument("--api_host", default=gwascatalog.API_HOST)
|
|
50
|
-
parser.add_argument("--
|
|
54
|
+
parser.add_argument("--api_base_path_v1", default=gwascatalog.API_BASE_PATH_V1)
|
|
51
55
|
parser.add_argument("--api_base_path_v2", default=gwascatalog.API_BASE_PATH_V2)
|
|
52
56
|
parser.add_argument("-v", "--verbose", default=0, action="count")
|
|
53
57
|
parser.add_argument("-q", "--quiet", default=0, action="count")
|
|
54
58
|
args = parser.parse_args()
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
base_url_v1 = 'https://'+args.api_host+args.api_base_path_v1
|
|
57
61
|
base_url_v2 = 'https://'+args.api_host+args.api_base_path_v2
|
|
58
62
|
|
|
59
63
|
fout = open(args.ofile, 'w') if args.ofile else sys.stdout
|
|
@@ -74,29 +78,29 @@ Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
|
74
78
|
ids = re.split(r'\s*,\s*', args.ids.strip())
|
|
75
79
|
if ids: logging.info(f"Input IDs: {len(ids)}")
|
|
76
80
|
|
|
77
|
-
if args.op == 'get_metadata_v2':
|
|
78
|
-
gwascatalog.GetMetadataV2(
|
|
81
|
+
if args.op == 'get_metadata_v2' or args.op == 'get_metadata':
|
|
82
|
+
gwascatalog.GetMetadataV2(base_url_v2, fout)
|
|
79
83
|
|
|
80
|
-
elif args.op == '
|
|
81
|
-
gwascatalog.
|
|
84
|
+
elif args.op == 'list_studies_v1':
|
|
85
|
+
gwascatalog.ListStudiesV1(base_url_v1, fout)
|
|
82
86
|
|
|
83
|
-
elif args.op == 'list_studies_v2':
|
|
84
|
-
gwascatalog.
|
|
87
|
+
elif args.op == 'list_studies_v2' or args.op == 'list_studies':
|
|
88
|
+
gwascatalog.ListStudiesV2(base_url_v2, fout)
|
|
85
89
|
|
|
86
|
-
elif args.op == '
|
|
87
|
-
gwascatalog.
|
|
90
|
+
elif args.op == 'get_studyAssociations_v1':
|
|
91
|
+
gwascatalog.GetStudyAssociationsV1(ids, args.skip, args.nmax, base_url_v1, fout)
|
|
88
92
|
|
|
89
93
|
elif args.op == 'get_studyAssociations_v2':
|
|
90
94
|
gwascatalog.GetStudyAssociationsV2(ids, args.skip, args.nmax, base_url_v2, fout)
|
|
91
95
|
|
|
92
|
-
elif args.op == '
|
|
93
|
-
gwascatalog.
|
|
96
|
+
elif args.op == 'get_snps_v1':
|
|
97
|
+
gwascatalog.GetSnpsV1(ids, args.skip, args.nmax, base_url_v1, fout)
|
|
94
98
|
|
|
95
|
-
elif args.op == 'get_snps_v2':
|
|
99
|
+
elif args.op == 'get_snps_v2' or args.op == 'get_snps':
|
|
96
100
|
gwascatalog.GetSnpsV2(ids, args.skip, args.nmax, base_url_v2, fout)
|
|
97
101
|
|
|
98
|
-
elif args.op == '
|
|
99
|
-
gwascatalog.
|
|
102
|
+
elif args.op == 'search_studies_v1':
|
|
103
|
+
gwascatalog.SearchStudiesV1(ids, args.searchtype, base_url_v1, fout)
|
|
100
104
|
|
|
101
105
|
else:
|
|
102
106
|
parser.error(f"Unknown operation: {args.op}")
|
|
@@ -5,7 +5,9 @@ V1:
|
|
|
5
5
|
|
|
6
6
|
V2:
|
|
7
7
|
- https://www.ebi.ac.uk/gwas/rest/api/v2/docs
|
|
8
|
-
- "GWAS RESTful API V2 has been released with various enhancements & improvements over GWAS RESTful API V1.
|
|
8
|
+
- "GWAS RESTful API V2 has been released with various enhancements & improvements over GWAS RESTful API V1."
|
|
9
|
+
- "REST API v2 is the only currently supported version of the GWAS Catalog API. V1 was retired in August 2026."
|
|
10
|
+
- https://www.ebi.ac.uk/gwas/docs/programmatic-access/rest-api/
|
|
9
11
|
- https://www.ebi.ac.uk/gwas/rest/api/v2/docs/reference
|
|
10
12
|
"""
|
|
11
13
|
###
|
|
@@ -17,9 +19,9 @@ import urllib.request,urllib.parse
|
|
|
17
19
|
import pandas as pd
|
|
18
20
|
#
|
|
19
21
|
API_HOST='www.ebi.ac.uk'
|
|
20
|
-
|
|
22
|
+
API_BASE_PATH_V1='/gwas/rest/api'
|
|
21
23
|
API_BASE_PATH_V2='/gwas/rest/api/v2'
|
|
22
|
-
|
|
24
|
+
BASE_URL_V1='https://'+API_HOST+API_BASE_PATH_V1
|
|
23
25
|
BASE_URL_V2='https://'+API_HOST+API_BASE_PATH_V2
|
|
24
26
|
#
|
|
25
27
|
NCHUNK=100;
|
|
@@ -48,21 +50,22 @@ def GetMetadataV2(base_url=BASE_URL_V2, fout=None):
|
|
|
48
50
|
logging.error(f"(status_code={response.status_code}): url_this: {url_this}")
|
|
49
51
|
return
|
|
50
52
|
try:
|
|
51
|
-
|
|
53
|
+
result = response.json()
|
|
52
54
|
except Exception as e:
|
|
53
55
|
logging.error(f"{str(e)}; response.text: {response.text}")
|
|
54
56
|
return
|
|
55
|
-
logging.debug(json.dumps(
|
|
56
|
-
metadata =
|
|
57
|
-
for key in
|
|
58
|
-
metadata[key] = [
|
|
57
|
+
logging.debug(json.dumps(result, sort_keys=True, indent=2))
|
|
58
|
+
metadata = {}
|
|
59
|
+
for key in result.keys():
|
|
60
|
+
metadata[key] = [result[key]]
|
|
59
61
|
df_this = pd.DataFrame.from_dict(metadata)
|
|
62
|
+
df_this = df_this.transpose()
|
|
60
63
|
if fout is not None:
|
|
61
|
-
df_this.to_csv(fout, sep="\t", index=
|
|
64
|
+
df_this.to_csv(fout, sep="\t", index=True, header=False)
|
|
62
65
|
return df_this
|
|
63
66
|
|
|
64
67
|
##############################################################################
|
|
65
|
-
def
|
|
68
|
+
def ListStudiesV1(base_url=BASE_URL_V1, fout=None):
|
|
66
69
|
"""Only simple metadata."""
|
|
67
70
|
tags=[]; n_study=0; rval=None; df=None; tq=None;
|
|
68
71
|
session = InitiateSession()
|
|
@@ -107,7 +110,50 @@ def ListStudies(base_url=BASE_URL, fout=None):
|
|
|
107
110
|
return(df)
|
|
108
111
|
|
|
109
112
|
##############################################################################
|
|
110
|
-
def
|
|
113
|
+
def ListStudiesV2(base_url=BASE_URL_V2, fout=None):
|
|
114
|
+
tags=[]; n_study=0; rval=None; df=None; tq=None;
|
|
115
|
+
session = InitiateSession()
|
|
116
|
+
url_this = base_url+f'/studies?size={NCHUNK}'
|
|
117
|
+
while True:
|
|
118
|
+
logging.debug(url_this)
|
|
119
|
+
response = session.get(url_this)
|
|
120
|
+
if (response.status_code!=200):
|
|
121
|
+
logging.error(f"(status_code={response.status_code}): url_this: {url_this}")
|
|
122
|
+
break
|
|
123
|
+
try:
|
|
124
|
+
result = response.json()
|
|
125
|
+
except Exception as e:
|
|
126
|
+
logging.error(f"{str(e)}; response.text: {response.text}")
|
|
127
|
+
break
|
|
128
|
+
if '_embedded' not in result or 'studies' not in result['_embedded']: break
|
|
129
|
+
studies = result['_embedded']['studies']
|
|
130
|
+
if studies is None: break
|
|
131
|
+
if tq is None: tq = tqdm.tqdm(total=result["page"]["totalElements"])
|
|
132
|
+
for study in studies:
|
|
133
|
+
tq.update(n=1)
|
|
134
|
+
if not tags:
|
|
135
|
+
tags = list(study.keys())
|
|
136
|
+
for tag in tags[:]:
|
|
137
|
+
if type(study[tag]) in (list, dict) and tag not in (
|
|
138
|
+
"disease_trait",
|
|
139
|
+
"efo_traits",
|
|
140
|
+
"genotyping_technologies",
|
|
141
|
+
"discovery_ancestry"
|
|
142
|
+
):
|
|
143
|
+
tags.remove(tag)
|
|
144
|
+
logging.info(f"Ignoring tag: {tag}")
|
|
145
|
+
df_this = pd.DataFrame({tag:[str(study[tag]) if tag in study else ''] for tag in tags})
|
|
146
|
+
if fout is not None: df_this.to_csv(fout, sep="\t", index=False, header=(n_study==0), mode=('w' if n_study==0 else 'a'))
|
|
147
|
+
else: df = pd.concat([df, df_this])
|
|
148
|
+
n_study+=1
|
|
149
|
+
if 'next' not in result['_links']: break
|
|
150
|
+
elif url_this == result['_links']['last']['href']: break
|
|
151
|
+
else: url_this = result['_links']['next']['href']
|
|
152
|
+
logging.info(f"n_study: {n_study}")
|
|
153
|
+
return(df)
|
|
154
|
+
|
|
155
|
+
##############################################################################
|
|
156
|
+
def GetStudyAssociationsV1(ids, skip=0, nmax=None, base_url=BASE_URL_V1, fout=None):
|
|
111
157
|
"""
|
|
112
158
|
Mapped genes via SNP links.
|
|
113
159
|
arg = authorReportedGene
|
|
@@ -195,11 +241,11 @@ sea = SNP effect allele
|
|
|
195
241
|
if (response.status_code!=200):
|
|
196
242
|
logging.error(f"(status_code={response.status_code}): url_this: {url_this}")
|
|
197
243
|
continue
|
|
198
|
-
|
|
199
|
-
if not
|
|
200
|
-
logging.debug(json.dumps(
|
|
201
|
-
if '_embedded' in
|
|
202
|
-
assns =
|
|
244
|
+
result = response.json()
|
|
245
|
+
if not result: continue
|
|
246
|
+
logging.debug(json.dumps(result, sort_keys=True, indent=2))
|
|
247
|
+
if '_embedded' in result and 'associations' in result['_embedded']:
|
|
248
|
+
assns = result['_embedded']['associations']
|
|
203
249
|
else:
|
|
204
250
|
logging.error(f'No associations for study: {id_this}')
|
|
205
251
|
continue
|
|
@@ -248,7 +294,7 @@ sea = SNP effect allele
|
|
|
248
294
|
if fout is None: return(df)
|
|
249
295
|
|
|
250
296
|
##############################################################################
|
|
251
|
-
def
|
|
297
|
+
def GetSnpsV1(ids, skip=0, nmax=None, base_url=BASE_URL_V1, fout=None):
|
|
252
298
|
"""
|
|
253
299
|
Input: rs_id, e.g. rs7329174
|
|
254
300
|
loc = location
|
|
@@ -317,7 +363,7 @@ Input: rs_id, e.g. rs7329174
|
|
|
317
363
|
https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms?rs_id=rs7329174&page=0&size=20
|
|
318
364
|
To do(?): Include genomic contexts
|
|
319
365
|
"""
|
|
320
|
-
n_snp=0; n_gene=0; n_loc=0; n_gc=0; df=None; tq=None;
|
|
366
|
+
n_snp=0; n_gene=0; n_loc=0; n_gc=0; n_out=0; df=None; tq=None;
|
|
321
367
|
tags_snp=[]; tags_gc=[];
|
|
322
368
|
quiet = bool(logging.getLogger().getEffectiveLevel()>15)
|
|
323
369
|
session = InitiateSession()
|
|
@@ -344,7 +390,7 @@ To do(?): Include genomic contexts
|
|
|
344
390
|
if not tags_snp:
|
|
345
391
|
for key,val in snp.items():
|
|
346
392
|
if type(val) not in (list, dict): tags_snp.append(key)
|
|
347
|
-
df_snp = pd.DataFrame({tag_snp:[snp[tag_snp]] for tag_snp in tags_snp})
|
|
393
|
+
df_snp = pd.DataFrame({tag_snp:[snp[tag_snp] if tag_snp in snp else ''] for tag_snp in tags_snp})
|
|
348
394
|
if 'mapped_genes' in snp:
|
|
349
395
|
df_snp['mapped_genes'] = [','.join(snp['mapped_genes'])]
|
|
350
396
|
n_gene += len(snp['mapped_genes'])
|
|
@@ -369,19 +415,38 @@ To do(?): Include genomic contexts
|
|
|
369
415
|
if not tags_gc:
|
|
370
416
|
for key,val in gc.items():
|
|
371
417
|
if type(val) not in (list, dict): tags_gc.append(key)
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
418
|
+
df_gc_this = pd.DataFrame({tag_gc:[gc[tag_gc] if tag_gc in gc else ''] for tag_gc in tags_gc})
|
|
419
|
+
gene = gc['gene'] if 'gene' in gc else {}
|
|
420
|
+
gene_name = gene['gene_name'] if 'gene_name' in gene else ''
|
|
421
|
+
ensembl_gene_ids = gene['ensembl_gene_ids'] if 'ensembl_gene_ids' in gene else []
|
|
422
|
+
entrez_gene_ids = gene['entrez_gene_ids'] if 'entrez_gene_ids' in gene else []
|
|
423
|
+
location = gc['location'] if 'location' in gc else {}
|
|
424
|
+
chromosome_name = location['chromosome_name'] if 'chromosome_name' in location else ''
|
|
425
|
+
chromosome_position = location['chromosome_position'] if 'chromosome_position' in location else ''
|
|
426
|
+
chromosome_region = location['region']['name'] if 'region' in location and 'name' in location['region'] else ''
|
|
427
|
+
df_gc_this = pd.concat([df_gc_this, pd.DataFrame(
|
|
428
|
+
{
|
|
429
|
+
'gene_name':[gene_name],
|
|
430
|
+
'ensembl_gene_ids':[';'.join(ensembl_gene_ids)],
|
|
431
|
+
'entrez_gene_ids':[';'.join(entrez_gene_ids)],
|
|
432
|
+
'chromosome_name':[chromosome_name],
|
|
433
|
+
'chromosome_position':[chromosome_position],
|
|
434
|
+
'chromosome_region':[chromosome_region]
|
|
435
|
+
})], axis=1)
|
|
436
|
+
df_gc = pd.concat([df_gc, df_gc_this])
|
|
437
|
+
|
|
438
|
+
n_gc+=1
|
|
439
|
+
df_this = pd.concat([df_snp, df_gc], axis=1)
|
|
440
|
+
if fout: df_this.to_csv(fout, sep="\t", index=False, header=(n_out==0), mode=('w' if n_out==0 else 'a'))
|
|
441
|
+
if fout is None: df = pd.concat([df, df_this], axis=0)
|
|
442
|
+
n_out+=df_this.shape[0]
|
|
376
443
|
|
|
377
|
-
if fout: df_this.to_csv(fout, sep="\t", index=False, header=(n_snp==0), mode=('w' if n_snp==0 else 'a'))
|
|
378
|
-
if fout is None: df = pd.concat([df, df_this], axis=0)
|
|
379
444
|
n_snp+=1
|
|
380
445
|
if n_snp==nmax:
|
|
381
446
|
logging.info(f"NMAX IDs reached: {nmax}")
|
|
382
447
|
break
|
|
383
448
|
if tq is not None: tq.close()
|
|
384
|
-
logging.info(f"SNPs: {n_snp}; mapped_genes: {n_gene}; locations: {n_loc}; genomic_contexts: {n_gc}")
|
|
449
|
+
logging.info(f"SNPs: {n_snp}; mapped_genes: {n_gene}; locations: {n_loc}; genomic_contexts: {n_gc}; n_out: {n_out}")
|
|
385
450
|
if fout is None: return(df)
|
|
386
451
|
|
|
387
452
|
##############################################################################
|
|
@@ -405,7 +470,7 @@ https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms/rs7329174
|
|
|
405
470
|
return gcs
|
|
406
471
|
|
|
407
472
|
##############################################################################
|
|
408
|
-
def
|
|
473
|
+
def SearchStudiesV1(ids, searchtype, base_url=BASE_URL_V1, fout=None):
|
|
409
474
|
tags=[]; n_study=0; rval=None; df=None; tq=None;
|
|
410
475
|
url = base_url+'/studies/search'
|
|
411
476
|
if searchtype=='gcst':
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
3
|
Utility app for the PubChem PUG REST API.
|
|
4
|
+
|
|
5
|
+
https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest
|
|
4
6
|
"""
|
|
5
7
|
###
|
|
6
8
|
import sys,os,re,argparse,time,logging
|
|
@@ -35,7 +37,7 @@ if __name__=='__main__':
|
|
|
35
37
|
parser.add_argument("--api_base_path_view", default=pubchem.API_BASE_PATH_VIEW)
|
|
36
38
|
parser.add_argument("--skip", type=int, default=0)
|
|
37
39
|
parser.add_argument("--nmax", type=int, default=0)
|
|
38
|
-
parser.add_argument("--nmax_per_cid", type=int, default=
|
|
40
|
+
parser.add_argument("--nmax_per_cid", type=int, default=10)
|
|
39
41
|
parser.add_argument("-q", "--quiet", action="store_true", help="Suppress progress notification.")
|
|
40
42
|
parser.add_argument("-v", "--verbose", default=0, action="count")
|
|
41
43
|
args = parser.parse_args()
|
|
@@ -55,7 +57,7 @@ if __name__=='__main__':
|
|
|
55
57
|
ids.append(line.rstrip())
|
|
56
58
|
fin.close()
|
|
57
59
|
elif args.ids:
|
|
58
|
-
ids = re.split(r'
|
|
60
|
+
ids = [v.strip() for v in re.split(r',', args.ids)]
|
|
59
61
|
logging.info(f"Input IDs: {len(ids)}")
|
|
60
62
|
|
|
61
63
|
aids=[]
|
|
@@ -79,10 +81,10 @@ if __name__=='__main__':
|
|
|
79
81
|
pubchem.ListSources("substance", base_url, fout)
|
|
80
82
|
|
|
81
83
|
elif args.op == 'get_cid2synonyms':
|
|
82
|
-
pubchem.GetCID2Synonyms(ids, args.
|
|
84
|
+
pubchem.GetCID2Synonyms(ids, args.nmax_per_cid, base_url, fout)
|
|
83
85
|
|
|
84
86
|
elif args.op == 'get_cid2nicename':
|
|
85
|
-
pubchem.GetCID2Nicename(ids,
|
|
87
|
+
pubchem.GetCID2Nicename(ids, base_url, fout)
|
|
86
88
|
|
|
87
89
|
elif args.op == 'get_cid2descriptions':
|
|
88
90
|
pubchem.GetCID2Descriptions(ids, base_url, fout)
|
|
@@ -26,8 +26,8 @@ Utility functions for the PubChem PUG REST API.
|
|
|
26
26
|
import sys,os,io,re,csv,json,math,time,logging,tempfile,tqdm,tqdm.auto
|
|
27
27
|
from xml.etree import ElementTree
|
|
28
28
|
import requests
|
|
29
|
-
from requests.adapters import HTTPAdapter
|
|
30
|
-
from requests.packages.urllib3.util.retry import Retry
|
|
29
|
+
#from requests.adapters import HTTPAdapter
|
|
30
|
+
#from requests.packages.urllib3.util.retry import Retry
|
|
31
31
|
import urllib.request,urllib.parse
|
|
32
32
|
import pandas as pd
|
|
33
33
|
#
|
|
@@ -113,6 +113,7 @@ def GetCID2SID(cids, base_url=BASE_URL, fout=None):
|
|
|
113
113
|
### Must quote forward slash '/' in smiles. 2nd param in quote()
|
|
114
114
|
### specifies "safe" chars to not quote, '/' being the default, so specify
|
|
115
115
|
### '' for no safe chars.
|
|
116
|
+
### Note that operation "synonymns" returns names AND CIDs.
|
|
116
117
|
#############################################################################
|
|
117
118
|
def GetSmiles2CID(smis, base_url=BASE_URL, fout=None):
|
|
118
119
|
n_out=0; tq=None; df=None;
|
|
@@ -136,13 +137,52 @@ def GetSmiles2CID(smis, base_url=BASE_URL, fout=None):
|
|
|
136
137
|
if len(cids)==0:
|
|
137
138
|
logging.warning(f"CID not found for SMI: \"{smi}\"")
|
|
138
139
|
continue
|
|
139
|
-
|
|
140
|
+
nicenames=[];
|
|
141
|
+
for cid in cids:
|
|
142
|
+
df_synonym = GetCID2Nicename([cid])
|
|
143
|
+
nicename = df_synonym["synonym"][0] if df_synonym.shape[1]>0 else None
|
|
144
|
+
nicenames.append(nicename)
|
|
145
|
+
df_this = pd.DataFrame({"CID":cids, "SMILES":smi, "Input_name":name, "Pubchem_synonym":nicenames})
|
|
140
146
|
if fout is not None: df_this.to_csv(fout, sep="\t", header=bool(n_out==0), index=False)
|
|
141
147
|
else: df = pd.concat([df, df_this])
|
|
142
148
|
n_out+=len(cids)
|
|
143
149
|
logging.info(f"SMIs: {len(smis)}; CIDs out: {n_out}")
|
|
144
150
|
return df
|
|
145
151
|
|
|
152
|
+
#############################################################################
|
|
153
|
+
def GetCID2Synonyms(ids, nmax_per_cid, base_url=BASE_URL, fout=None):
|
|
154
|
+
n_out=0; tq=None; df=None;
|
|
155
|
+
for i_id in tqdm.auto.trange(len(ids)):
|
|
156
|
+
cid = ids[i_id]
|
|
157
|
+
try:
|
|
158
|
+
response = requests.get(base_url+f"/compound/cid/{cid}/synonyms/JSON")
|
|
159
|
+
except Exception as e:
|
|
160
|
+
logging.error(f"{cid} REST request failed: {e}")
|
|
161
|
+
continue
|
|
162
|
+
if response.status_code!=200:
|
|
163
|
+
logging.error(f"status_code: {response.status_code}")
|
|
164
|
+
continue
|
|
165
|
+
result = response.json()
|
|
166
|
+
logging.debug(json.dumps(result, indent=2))
|
|
167
|
+
informations = result['InformationList']['Information'] if 'InformationList' in result and 'Information' in result['InformationList'] else []
|
|
168
|
+
synonyms=[];
|
|
169
|
+
for information in informations:
|
|
170
|
+
synonyms_this = information['Synonym'] if 'Synonym' in information else []
|
|
171
|
+
synonyms.extend(synonyms_this)
|
|
172
|
+
if len(synonyms)==0:
|
|
173
|
+
logging.warning(f"Synonyms not found for CID: {cid}")
|
|
174
|
+
continue
|
|
175
|
+
synonyms = list(set(synonyms)) # deduplicate
|
|
176
|
+
synonyms = SortCompoundNamesByNiceness(synonyms)
|
|
177
|
+
synonyms = synonyms[:nmax_per_cid] # truncate
|
|
178
|
+
|
|
179
|
+
df_this = pd.DataFrame({ "CID":[cid for i in range(len(synonyms))], "synonym":synonyms })
|
|
180
|
+
if fout is not None: df_this.to_csv(fout, sep="\t", header=bool(n_out==0), index=False)
|
|
181
|
+
else: df = pd.concat([df, df_this])
|
|
182
|
+
n_out+=len(synonyms)
|
|
183
|
+
logging.info(f"CIDs: {len(ids)}; Synonyms out: {n_out}")
|
|
184
|
+
return df
|
|
185
|
+
|
|
146
186
|
#############################################################################
|
|
147
187
|
def GetCID2AssaySummary(ids, base_url=BASE_URL, fout=None):
|
|
148
188
|
"""Example CIDs: 2519 (caffeine), 3034034 (quinine)"""
|
|
@@ -514,23 +554,21 @@ ns).text
|
|
|
514
554
|
|
|
515
555
|
#############################################################################
|
|
516
556
|
def GetSID2Synonyms(ids, base_url=BASE_URL, fout=None):
|
|
557
|
+
# retry_strategy = Retry(
|
|
558
|
+
# total=30,
|
|
559
|
+
# backoff_factor=2,
|
|
560
|
+
# status_forcelist=[413, 429, 500, 502, 503, 504],
|
|
561
|
+
# method_whitelist=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
|
|
562
|
+
# )
|
|
563
|
+
# adapter = HTTPAdapter(max_retries=retry_strategy)
|
|
564
|
+
# session = requests.Session()
|
|
565
|
+
# session.mount("https://", adapter)
|
|
566
|
+
# session.mount("http://", adapter)
|
|
517
567
|
n_out=0; df=None;
|
|
518
|
-
|
|
519
|
-
retry_strategy = Retry(
|
|
520
|
-
total=30,
|
|
521
|
-
backoff_factor=2,
|
|
522
|
-
status_forcelist=[413, 429, 500, 502, 503, 504],
|
|
523
|
-
method_whitelist=["HEAD", "GET", "PUT", "DELETE", "OPTIONS", "TRACE"]
|
|
524
|
-
)
|
|
525
|
-
adapter = HTTPAdapter(max_retries=retry_strategy)
|
|
526
|
-
session = requests.Session()
|
|
527
|
-
session.mount("https://", adapter)
|
|
528
|
-
session.mount("http://", adapter)
|
|
529
|
-
|
|
530
568
|
for i_sid in range(len(ids)):
|
|
531
569
|
id_this = ids[i_sid]
|
|
532
570
|
url_this = f"{base_url}/substance/sid/{id_this}/synonyms/JSON"
|
|
533
|
-
response =
|
|
571
|
+
response = requests.get(url_this)
|
|
534
572
|
if response.status_code!=200: #404 is normal
|
|
535
573
|
logging.debug(f"Status code: {response.status_code}; url_this: {url_this}")
|
|
536
574
|
continue
|
|
@@ -545,7 +583,7 @@ def GetSID2Synonyms(ids, base_url=BASE_URL, fout=None):
|
|
|
545
583
|
return df
|
|
546
584
|
|
|
547
585
|
#############################################################################
|
|
548
|
-
def
|
|
586
|
+
def GetCID2SID2Synonyms(ids, skip, nmax, nmax_per_cid, base_url=BASE_URL, fout=None):
|
|
549
587
|
sids_all = set([])
|
|
550
588
|
i_cid=0; n_out=0; df=None;
|
|
551
589
|
for i_cid in tqdm.auto.trange(len(ids), desc="CIDs"):
|
|
@@ -576,8 +614,8 @@ def GetCID2Synonyms(ids, skip, nmax, nmax_per_cid, base_url=BASE_URL, fout=None)
|
|
|
576
614
|
return df
|
|
577
615
|
|
|
578
616
|
#############################################################################
|
|
579
|
-
def GetCID2Nicename(ids,
|
|
580
|
-
return GetCID2Synonyms(ids,
|
|
617
|
+
def GetCID2Nicename(ids, base_url=BASE_URL, fout=None):
|
|
618
|
+
return GetCID2Synonyms(ids, 1, base_url, fout)
|
|
581
619
|
|
|
582
620
|
#############################################################################
|
|
583
621
|
def GetName2SID(names, skip, nmax, base_url=BASE_URL, fout=None):
|
|
@@ -644,9 +682,9 @@ def GetName2Synonyms(names, skip, nmax, base_url=BASE_URL, fout=None):
|
|
|
644
682
|
#############################################################################
|
|
645
683
|
def NameNicenessScore(name, len_optimal=9):
|
|
646
684
|
"""Heuristic for human comprehensibility. In PubChem, a 'name' may be
|
|
647
|
-
any ID, often not useful."""
|
|
685
|
+
any ID, often not useful. Note systematic names may start with integers."""
|
|
648
686
|
score=0;
|
|
649
|
-
pat_proper = re.compile(r'^[A-Z][a-z]+$')
|
|
687
|
+
pat_proper = re.compile(r'^[1-4,-]*[A-Z][a-z]+$')
|
|
650
688
|
pat_text = re.compile(r'^[A-Za-z ]+$')
|
|
651
689
|
if pat_proper.match(name): score+=100
|
|
652
690
|
elif pat_text.match(name): score+=50
|
|
@@ -8,7 +8,7 @@ description = "Clients and tools for online biomedical resources, usually via RE
|
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Jeremy J Yang", email = "jeremyjyang@gmail.com"},
|
|
10
10
|
]
|
|
11
|
-
version = "0.2.
|
|
11
|
+
version = "0.2.39"
|
|
12
12
|
requires-python = ">= 3.10"
|
|
13
13
|
dependencies = [
|
|
14
14
|
"pandas",
|
|
@@ -10,7 +10,7 @@ with open("README.md", "r") as fh:
|
|
|
10
10
|
|
|
11
11
|
setuptools.setup(
|
|
12
12
|
name="bioclients",
|
|
13
|
-
version="0.2.
|
|
13
|
+
version="0.2.34",
|
|
14
14
|
author="Jeremy Yang",
|
|
15
15
|
author_email="jeremyjyang@gmail.com",
|
|
16
16
|
description="Clients and tools for online biomedical resources, usually via REST APIs.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|