BioClients 0.2.38__tar.gz → 0.2.40__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.38 → bioclients-0.2.40}/PKG-INFO +1 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/drugcentral/Client.py +13 -7
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/drugcentral/Utils.py +20 -7
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gwascatalog/Client.py +10 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gwascatalog/Utils.py +156 -6
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/Client.py +6 -4
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/Utils.py +59 -21
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/App.py +2 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients.egg-info/PKG-INFO +1 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/pyproject.toml +1 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/setup.py +1 -1
- {bioclients-0.2.38 → bioclients-0.2.40}/LICENSE +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/README.md +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/allen/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/allen/brain/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/allen/brain/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/allen/brain/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/amp/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/amp/t2d/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/amp/t2d/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/amp/t2d/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/badapple/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/badapple/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/badapple/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bindingdb/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bindingdb/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bindingdb/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biogrid/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biogrid/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biogrid/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biomarkerkb/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biomarkerkb/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/biomarkerkb/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bioregistry/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bioregistry/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/bioregistry/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/brenda/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/brenda/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/brenda/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cas/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cas/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cas/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cdc/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cdc/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cdc/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cfde/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cfde/cfchemdb/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cfde/cfchemdb/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/cfde/cfchemdb/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chebi/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chebi/Client_SOAP.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chebi/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chebi/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/slap/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/slap/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chem2bio2rdf/slap/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chembl/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chembl/FetchByID.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chembl/UnichemClient.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chembl/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chembl/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chemidplus/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chemidplus/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/chemidplus/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/clinicaltrials/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/clinicaltrials/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/clinicaltrials/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/disgenet/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/disgenet/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/disgenet/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/dnorm/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/dnorm/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/drugcentral/Test.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/drugcentral/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/identifiers/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/identifiers/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/identifiers/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/unichem/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/unichem/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/emblebi/unichem/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/biomart/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/biomart/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ensembl/biomart/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/entrez/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/entrez/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/entrez/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/fda/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/fda/aer/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/fda/aer/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/fda/aer/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/geneontology/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/geneontology/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/geneontology/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/glygen/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/glygen/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/glygen/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gtex/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gtex/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gtex/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/gwascatalog/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hubmap/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hubmap/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hubmap/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hugo/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hugo/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/hugo/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/humanbase/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/humanbase/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/icite/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/icite/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/icite/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/pharos/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/pharos/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/pharos/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/rss/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/rss/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/rss/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tcrd/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tcrd/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tcrd/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tiga/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tiga/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tiga/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tinx/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tinx/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/idg/tinx/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/iuphar/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/iuphar/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/iuphar/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/jensenlab/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/jensenlab/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/jensenlab/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/Client_lincscloud.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/sigcom/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/sigcom/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/lincs/sigcom/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/archs4/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/archs4/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/archs4/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/harmonizome/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/harmonizome/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/maayanlab/harmonizome/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/connect/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/connect/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/connect/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/genetics/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/genetics/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/medline/genetics/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mesh/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mesh/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mesh/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/monarch/Biolink.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/monarch/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/monarch/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/monarch/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mygene/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mygene/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/mygene/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/gsrs/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/gsrs/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/gsrs/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/stitcher/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/stitcher/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncats/stitcher/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncbo/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncbo/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ncbo/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/omim/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/omim/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/oncotree/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/oncotree/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/oncotree/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/openphacts/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/openphacts/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/openphacts/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/opentargets/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/opentargets/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/opentargets/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/panther/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/panther/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pdb/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pdb/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pdb/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_actives.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_assay_fetch.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_assay_results.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_assay_search.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_assaysim.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_compound_assaystats.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/ftp/pubchem_ftp_gini_index.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/rdf/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/rdf/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/pug_aids2assays.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/pug_ids2mols.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubchem/soap/pug_substance_search.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubmed/App_XML.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubmed/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubmed/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubmed/Utils_XML.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubmed/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubtator/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubtator/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/pubtator/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/reactome/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/reactome/SMBL_utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/reactome/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/reactome/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/rxnorm/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/rxnorm/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/rxnorm/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/stringdb/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/stringdb/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/stringdb/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tcga/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tcga/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tcga/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tinx/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tinx/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/tinx/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ubkg/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ubkg/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/ubkg/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/umls/CPTClient.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/umls/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/umls/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/umls/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/uniprot/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/uniprot/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/uniprot/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/db/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/db/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/graphql/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/graphql/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/hdf/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/hdf/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/igraph/App.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/igraph/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/igraph/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/neo4j/App.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/neo4j/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/neo4j/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/obo/App.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/obo/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/obo/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/owl/App.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/owl/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/owl/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/Csv2Html.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/Csv2Markdown.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/Csv2Sql.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/pandas/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/rdf/App.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/rdf/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/rdf/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/rest/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/rest/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/sparql/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/sparql/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/sparql/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/xml/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/xml/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/yaml/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/util/yaml/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/who/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/who/atc/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/who/atc/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/who/atc/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikidata/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikidata/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikidata/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikipathways/Client.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikipathways/Utils.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients/wikipathways/__init__.py +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients.egg-info/SOURCES.txt +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients.egg-info/dependency_links.txt +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients.egg-info/requires.txt +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/bioclients.egg-info/top_level.txt +0 -0
- {bioclients-0.2.38 → bioclients-0.2.40}/setup.cfg +0 -0
|
@@ -10,7 +10,12 @@ from ..util import db as util_db
|
|
|
10
10
|
|
|
11
11
|
#############################################################################
|
|
12
12
|
if __name__=='__main__':
|
|
13
|
-
parser = argparse.ArgumentParser(description="DrugCentral PostgreSql client utility",
|
|
13
|
+
parser = argparse.ArgumentParser(description="DrugCentral PostgreSql client utility",
|
|
14
|
+
epilog="""\
|
|
15
|
+
Example struct_id: 2561 (Tamoxifen).
|
|
16
|
+
Search via --terms as regular expressions, e.g. \"^Alzheimer\".
|
|
17
|
+
get_drugpage returns JSON, all other operations return TSV.
|
|
18
|
+
""")
|
|
14
19
|
ops = [
|
|
15
20
|
"list_tables",
|
|
16
21
|
"list_columns",
|
|
@@ -26,7 +31,6 @@ if __name__=='__main__':
|
|
|
26
31
|
"get_structure_synonyms",
|
|
27
32
|
"get_structure_targets",
|
|
28
33
|
"get_product",
|
|
29
|
-
"get_product_structures",
|
|
30
34
|
"get_indication_structures",
|
|
31
35
|
"get_drugpage",
|
|
32
36
|
"get_drugsummary",
|
|
@@ -52,6 +56,7 @@ if __name__=='__main__':
|
|
|
52
56
|
parser.add_argument("op", choices=ops, help="OPERATION (select one)")
|
|
53
57
|
parser.add_argument("--i", dest="ifile", help="input ID file")
|
|
54
58
|
parser.add_argument("--ids", help="input IDs (comma-separated)")
|
|
59
|
+
parser.add_argument("--terms", help="input search terms (comma-separated)")
|
|
55
60
|
parser.add_argument("--xref_type", help="xref ID type")
|
|
56
61
|
parser.add_argument("--o", dest="ofile", help="output (TSV)")
|
|
57
62
|
parser.add_argument("--dbhost")
|
|
@@ -92,8 +97,9 @@ if __name__=='__main__':
|
|
|
92
97
|
elif args.ids:
|
|
93
98
|
ids = re.split(r'[,\s]+', args.ids)
|
|
94
99
|
|
|
100
|
+
terms = re.split(r'[,\s]+', args.terms) if args.terms else []
|
|
101
|
+
|
|
95
102
|
try:
|
|
96
|
-
#dbcon = drugcentral.Connect(params['DBHOST'], params['DBPORT'], params['DBNAME'], params['DBUSR'], params['DBPW'])
|
|
97
103
|
dbcon = util_db.PostgreSqlConnect(dbhost=params['DBHOST'], dbport=params['DBPORT'], dbusr=params['DBUSR'], dbpw=params['DBPW'], dbname=params['DBNAME'])
|
|
98
104
|
except Exception as e:
|
|
99
105
|
logging.error(f"Connect failed: {e}")
|
|
@@ -183,14 +189,14 @@ if __name__=='__main__':
|
|
|
183
189
|
elif args.op=='get_structure_targets':
|
|
184
190
|
drugcentral.GetStructureTargets(dbcon, ids, fout)
|
|
185
191
|
|
|
186
|
-
elif args.op=='
|
|
187
|
-
drugcentral.
|
|
192
|
+
elif args.op=='get_product':
|
|
193
|
+
drugcentral.GetProduct(dbcon, ids, fout)
|
|
188
194
|
|
|
189
195
|
elif args.op=='search_products':
|
|
190
|
-
drugcentral.SearchProducts(dbcon,
|
|
196
|
+
drugcentral.SearchProducts(dbcon, terms, fout)
|
|
191
197
|
|
|
192
198
|
elif args.op=='search_indications':
|
|
193
|
-
drugcentral.SearchIndications(dbcon,
|
|
199
|
+
drugcentral.SearchIndications(dbcon, terms, fout)
|
|
194
200
|
|
|
195
201
|
elif args.op=='get_indication_structures':
|
|
196
202
|
drugcentral.GetIndicationStructures(dbcon, ids, fout)
|
|
@@ -52,7 +52,7 @@ def ListColumns(dbcon, dbschema="public", fout=None):
|
|
|
52
52
|
#############################################################################
|
|
53
53
|
def ListTables(dbcon, dbschema="public", fout=None):
|
|
54
54
|
'''Listing the tables.'''
|
|
55
|
-
sql = (f"SELECT table_name FROM information_schema.tables WHERE table_schema = '{dbschema}'")
|
|
55
|
+
sql = (f"SELECT table_schema,table_name FROM information_schema.tables WHERE table_schema = '{dbschema}'")
|
|
56
56
|
df = pd.read_sql(sql, dbcon)
|
|
57
57
|
if fout: df.to_csv(fout, sep="\t", index=False)
|
|
58
58
|
logging.info(f"n_out: {df.shape[0]}")
|
|
@@ -62,10 +62,10 @@ def ListTables(dbcon, dbschema="public", fout=None):
|
|
|
62
62
|
def ListTablesRowCounts(dbcon, dbschema="public", fout=None):
|
|
63
63
|
'''Listing the table rowcounts.'''
|
|
64
64
|
df=None;
|
|
65
|
-
sql1 = (f"SELECT table_name FROM information_schema.tables WHERE table_schema = '{dbschema}'")
|
|
65
|
+
sql1 = (f"SELECT table_schema,table_name FROM information_schema.tables WHERE table_schema = '{dbschema}'")
|
|
66
66
|
df1 = pd.read_sql(sql1, dbcon)
|
|
67
67
|
for tname in df1.table_name:
|
|
68
|
-
sql2 = (f"SELECT COUNT(*) AS rowcount FROM {dbschema}
|
|
68
|
+
sql2 = (f"SELECT COUNT(*) AS rowcount FROM {dbschema}.\"{tname}\"")
|
|
69
69
|
df_this = pd.read_sql(sql2, dbcon)
|
|
70
70
|
df_this["schema"] = dbschema
|
|
71
71
|
df_this["table"] = tname
|
|
@@ -327,7 +327,7 @@ SELECT DISTINCT
|
|
|
327
327
|
p.id product_id,
|
|
328
328
|
p.ndc_product_code,
|
|
329
329
|
p.form product_form,
|
|
330
|
-
p.generic_name
|
|
330
|
+
p.generic_name,
|
|
331
331
|
p.product_name,
|
|
332
332
|
p.route product_route
|
|
333
333
|
FROM
|
|
@@ -337,7 +337,7 @@ JOIN
|
|
|
337
337
|
JOIN
|
|
338
338
|
product p ON p.ndc_product_code = ai.ndc_product_code
|
|
339
339
|
WHERE
|
|
340
|
-
p.product_name
|
|
340
|
+
p.product_name ~* '{term}' OR p.generic_name ~* '{term}'
|
|
341
341
|
"""
|
|
342
342
|
logging.debug(f"SQL: {sql}")
|
|
343
343
|
df_this = pd.read_sql(sql, dbcon)
|
|
@@ -408,7 +408,20 @@ WHERE
|
|
|
408
408
|
#############################################################################
|
|
409
409
|
def GetStructure(dbcon, ids, fout=None):
|
|
410
410
|
df=None;
|
|
411
|
-
sql =
|
|
411
|
+
sql = """\
|
|
412
|
+
SELECT id,
|
|
413
|
+
name,
|
|
414
|
+
cas_reg_no,
|
|
415
|
+
smiles,
|
|
416
|
+
inchikey,
|
|
417
|
+
inchi,
|
|
418
|
+
cd_formula AS formula,
|
|
419
|
+
cd_molweight AS molweight
|
|
420
|
+
FROM
|
|
421
|
+
structures
|
|
422
|
+
WHERE
|
|
423
|
+
id = '{}'
|
|
424
|
+
"""
|
|
412
425
|
for id_this in ids:
|
|
413
426
|
logging.debug(sql.format(id_this))
|
|
414
427
|
df_this = pd.read_sql(sql.format(id_this), dbcon)
|
|
@@ -815,7 +828,7 @@ WHERE
|
|
|
815
828
|
return df
|
|
816
829
|
|
|
817
830
|
#############################################################################
|
|
818
|
-
def
|
|
831
|
+
def GetProduct(dbcon, ids, fout=None):
|
|
819
832
|
df=None;
|
|
820
833
|
sql="""\
|
|
821
834
|
SELECT DISTINCT
|
|
@@ -41,6 +41,8 @@ Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
|
41
41
|
'get_snps',
|
|
42
42
|
'get_snps_v1',
|
|
43
43
|
'get_snps_v2',
|
|
44
|
+
'list_snps',
|
|
45
|
+
'get_genomic_contexts',
|
|
44
46
|
'search_studies_v1'
|
|
45
47
|
]
|
|
46
48
|
parser.add_argument("op", choices=ops, help='operation')
|
|
@@ -53,6 +55,7 @@ Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
|
53
55
|
parser.add_argument("--api_host", default=gwascatalog.API_HOST)
|
|
54
56
|
parser.add_argument("--api_base_path_v1", default=gwascatalog.API_BASE_PATH_V1)
|
|
55
57
|
parser.add_argument("--api_base_path_v2", default=gwascatalog.API_BASE_PATH_V2)
|
|
58
|
+
parser.add_argument("--api_user_agent", help="HTTP header User-Agent: ***, e.g. 'MyApp/1.0 (contact: foobar@unm.edu)'")
|
|
56
59
|
parser.add_argument("-v", "--verbose", default=0, action="count")
|
|
57
60
|
parser.add_argument("-q", "--quiet", default=0, action="count")
|
|
58
61
|
args = parser.parse_args()
|
|
@@ -97,7 +100,13 @@ Example SNPIDs: rs6085920, rs2273833, rs6684514, rs144991356
|
|
|
97
100
|
gwascatalog.GetSnpsV1(ids, args.skip, args.nmax, base_url_v1, fout)
|
|
98
101
|
|
|
99
102
|
elif args.op == 'get_snps_v2' or args.op == 'get_snps':
|
|
100
|
-
gwascatalog.GetSnpsV2(ids, args.skip, args.nmax, base_url_v2, fout)
|
|
103
|
+
gwascatalog.GetSnpsV2(ids, args.skip, args.nmax, args.api_user_agent, base_url_v2, fout)
|
|
104
|
+
|
|
105
|
+
elif args.op == 'list_snps_v2' or args.op == 'list_snps':
|
|
106
|
+
gwascatalog.ListSnpsV2(args.api_user_agent, base_url_v2, fout)
|
|
107
|
+
|
|
108
|
+
elif args.op == 'get_genomic_contexts_v2' or args.op == 'get_genomic_contexts':
|
|
109
|
+
gwascatalog.GetGenomicContextsV2(ids, args.skip, args.nmax, args.api_user_agent, base_url_v2, fout)
|
|
101
110
|
|
|
102
111
|
elif args.op == 'search_studies_v1':
|
|
103
112
|
gwascatalog.SearchStudiesV1(ids, args.searchtype, base_url_v1, fout)
|
|
@@ -7,8 +7,9 @@ V2:
|
|
|
7
7
|
- https://www.ebi.ac.uk/gwas/rest/api/v2/docs
|
|
8
8
|
- "GWAS RESTful API V2 has been released with various enhancements & improvements over GWAS RESTful API V1."
|
|
9
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/
|
|
11
10
|
- https://www.ebi.ac.uk/gwas/rest/api/v2/docs/reference
|
|
11
|
+
- https://www.ebi.ac.uk/gwas/docs/programmatic-access/rest-api/
|
|
12
|
+
- "The API allows up to 100 requests per minute and 15 requests per second per IP address. Requests above either limit are blocked and receive an HTTP 429 Too Many Requests response. If your client will send many requests, such as when it crawls the full API, set a descriptive User-Agent header. For example, use MyResearchProject/1.0 (contact: name@example.org)."
|
|
12
13
|
"""
|
|
13
14
|
###
|
|
14
15
|
import sys,os,re,json,time,logging,tqdm
|
|
@@ -357,24 +358,24 @@ gc = genomicContext
|
|
|
357
358
|
if fout is None: return(df)
|
|
358
359
|
|
|
359
360
|
##############################################################################
|
|
360
|
-
def GetSnpsV2(ids, skip=0, nmax=None, base_url=BASE_URL_V2, fout=None):
|
|
361
|
+
def GetSnpsV2(ids, skip=0, nmax=None, user_agent=None, base_url=BASE_URL_V2, fout=None):
|
|
361
362
|
"""
|
|
362
363
|
Input: rs_id, e.g. rs7329174
|
|
363
364
|
https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms?rs_id=rs7329174&page=0&size=20
|
|
364
|
-
To do(?): Include genomic contexts
|
|
365
365
|
"""
|
|
366
366
|
n_snp=0; n_gene=0; n_loc=0; n_gc=0; n_out=0; df=None; tq=None;
|
|
367
367
|
tags_snp=[]; tags_gc=[];
|
|
368
368
|
quiet = bool(logging.getLogger().getEffectiveLevel()>15)
|
|
369
369
|
session = InitiateSession()
|
|
370
370
|
url = base_url+'/single-nucleotide-polymorphisms'
|
|
371
|
+
headers = {"User-Agent": user_agent} if user_agent else {}
|
|
371
372
|
if skip>0: logging.info(f"SKIP IDs skipped: {skip}")
|
|
372
373
|
for id_this in ids[skip:]:
|
|
373
374
|
if not quiet and tq is None: tq = tqdm.tqdm(total=len(ids)-skip)
|
|
374
375
|
if tq is not None: tq.update()
|
|
375
376
|
url_this = url+f"?rs_id={id_this}"
|
|
376
377
|
try:
|
|
377
|
-
response = session.get(url_this)
|
|
378
|
+
response = session.get(url_this, headers=headers)
|
|
378
379
|
except Exception as e:
|
|
379
380
|
logging.error(f"Failed for SNP:{id_this}; URL:{url_this}; {str(e)}")
|
|
380
381
|
continue
|
|
@@ -409,7 +410,7 @@ To do(?): Include genomic contexts
|
|
|
409
410
|
n_loc += len(locs)
|
|
410
411
|
|
|
411
412
|
rs_id = snp['rs_id'] if 'rs_id' in snp else None
|
|
412
|
-
gcs =
|
|
413
|
+
gcs = RSID2GCs(rs_id, session)
|
|
413
414
|
df_gc = None
|
|
414
415
|
for gc in gcs:
|
|
415
416
|
if not tags_gc:
|
|
@@ -450,7 +451,84 @@ To do(?): Include genomic contexts
|
|
|
450
451
|
if fout is None: return(df)
|
|
451
452
|
|
|
452
453
|
##############################################################################
|
|
453
|
-
def
|
|
454
|
+
def ListSnpsV2(user_agent=None, base_url=BASE_URL_V2, fout=None):
|
|
455
|
+
"""
|
|
456
|
+
https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms?page=0&size=20
|
|
457
|
+
Include genomic contexts? (slow)
|
|
458
|
+
"""
|
|
459
|
+
n_snp=0; n_gene=0; n_loc=0; n_gc=0; n_out=0; df=None; tq=None;
|
|
460
|
+
tags_snp=[]; tags_gc=[];
|
|
461
|
+
quiet = bool(logging.getLogger().getEffectiveLevel()>15)
|
|
462
|
+
session = InitiateSession()
|
|
463
|
+
url = base_url+'/single-nucleotide-polymorphisms'
|
|
464
|
+
headers = {"User-Agent": user_agent} if user_agent else {}
|
|
465
|
+
i_page=0; url_next=None;
|
|
466
|
+
while True:
|
|
467
|
+
url_this = f"{url}?page={i_page}&size={NCHUNK}"
|
|
468
|
+
try:
|
|
469
|
+
response = session.get(url_this, headers=headers)
|
|
470
|
+
except Exception as e:
|
|
471
|
+
logging.error(f"Failed for URL:{url_this}; {str(e)}")
|
|
472
|
+
continue
|
|
473
|
+
if response.status_code!=200:
|
|
474
|
+
logging.error(f"(status_code={response.status_code}): url_this: {url_this}")
|
|
475
|
+
continue
|
|
476
|
+
|
|
477
|
+
rval = response.json()
|
|
478
|
+
logging.debug(json.dumps(rval, sort_keys=True, indent=2))
|
|
479
|
+
|
|
480
|
+
page = rval['page'] if 'page' in rval else {}
|
|
481
|
+
totalPages = page['totalPages'] if 'totalPages' in page else None
|
|
482
|
+
totalElements = page['totalElements'] if 'totalElements' in page else None
|
|
483
|
+
size = page['size'] if 'size' in page else None
|
|
484
|
+
if not quiet and tq is None: tq = tqdm.tqdm(total=totalElements)
|
|
485
|
+
if tq is not None: tq.update(size)
|
|
486
|
+
links = rval['_links'] if '_links' in rval else {}
|
|
487
|
+
url_next = links['next'] if 'next' in links else None
|
|
488
|
+
|
|
489
|
+
snps = rval['_embedded']['snps'] if '_embedded' in rval and 'snps' in rval['_embedded'] else []
|
|
490
|
+
|
|
491
|
+
df_this=None;
|
|
492
|
+
for snp in snps:
|
|
493
|
+
if not tags_snp:
|
|
494
|
+
for key,val in snp.items():
|
|
495
|
+
if type(val) not in (list, dict): tags_snp.append(key)
|
|
496
|
+
df_snp = pd.DataFrame({tag_snp:[snp[tag_snp] if tag_snp in snp else ''] for tag_snp in tags_snp})
|
|
497
|
+
if 'mapped_genes' in snp:
|
|
498
|
+
df_snp['mapped_genes'] = [','.join(snp['mapped_genes'])]
|
|
499
|
+
n_gene += len(snp['mapped_genes'])
|
|
500
|
+
links = snp['_links'] if '_links' in snp else {}
|
|
501
|
+
gcs_url = links['genomic_contexts']['href'] if 'genomic_contexts' in links and 'href' in links['genomic_contexts'] else None
|
|
502
|
+
df_snp['genomic_contexts_url'] = [gcs_url]
|
|
503
|
+
|
|
504
|
+
locs = snp['locations'] if 'locations' in snp else []
|
|
505
|
+
locs_strs = []
|
|
506
|
+
for loc in locs:
|
|
507
|
+
cn = loc['chromosome_name'] if 'chromosome_name' in loc else ''
|
|
508
|
+
cp = loc['chromosome_position'] if 'chromosome_position' in loc else ''
|
|
509
|
+
cr = loc['region']['name'] if 'region' in loc and 'name' in loc['region'] else ''
|
|
510
|
+
locs_strs.append(f"{cn}|{cp}|{cr}")
|
|
511
|
+
df_snp['locations'] = [','.join(locs_strs)]
|
|
512
|
+
n_loc += len(locs)
|
|
513
|
+
|
|
514
|
+
#df_this = pd.concat([df_snp, df_gc], axis=1)
|
|
515
|
+
df_this = df_snp
|
|
516
|
+
|
|
517
|
+
if fout: df_this.to_csv(fout, sep="\t", index=False, header=(n_out==0), mode=('w' if n_out==0 else 'a'))
|
|
518
|
+
if fout is None: df = pd.concat([df, df_this], axis=0)
|
|
519
|
+
n_out+=df_this.shape[0]
|
|
520
|
+
|
|
521
|
+
i_page+=1
|
|
522
|
+
if i_page>=totalPages or url_next is None:
|
|
523
|
+
break
|
|
524
|
+
|
|
525
|
+
n_snp+=1
|
|
526
|
+
if tq is not None: tq.close()
|
|
527
|
+
logging.info(f"SNPs: {n_snp}; mapped_genes: {n_gene}; locations: {n_loc}; genomic_contexts: {n_gc}; n_out: {n_out}")
|
|
528
|
+
if fout is None: return(df)
|
|
529
|
+
|
|
530
|
+
##############################################################################
|
|
531
|
+
def RSID2GCs(rs_id, session):
|
|
454
532
|
"""
|
|
455
533
|
https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms/rs7329174/genomic-contexts?sort=distance&direction=asc
|
|
456
534
|
"""
|
|
@@ -469,6 +547,78 @@ https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms/rs7329174
|
|
|
469
547
|
gcs = rval['_embedded']['genomic_contexts'] if '_embedded' in rval and 'genomic_contexts' in rval['_embedded'] else []
|
|
470
548
|
return gcs
|
|
471
549
|
|
|
550
|
+
##############################################################################
|
|
551
|
+
def GetGenomicContextsV2(ids, skip=0, nmax=None, user_agent=None, base_url=BASE_URL_V2, fout=None):
|
|
552
|
+
"""
|
|
553
|
+
Input: rs_id, e.g. rs7329174
|
|
554
|
+
https://www.ebi.ac.uk/gwas/rest/api/v2/single-nucleotide-polymorphisms/rs7329174/genomic-contexts?sort=distance&direction=asc
|
|
555
|
+
"""
|
|
556
|
+
n_snp=0; n_gene=0; n_loc=0; n_gc=0; n_out=0; df=None; tq=None;
|
|
557
|
+
tags_gc=[];
|
|
558
|
+
quiet = bool(logging.getLogger().getEffectiveLevel()>15)
|
|
559
|
+
session = InitiateSession()
|
|
560
|
+
url = base_url+'/single-nucleotide-polymorphisms'
|
|
561
|
+
headers = {"User-Agent": user_agent} if user_agent else {}
|
|
562
|
+
if skip>0: logging.info(f"SKIP IDs skipped: {skip}")
|
|
563
|
+
for id_this in ids[skip:]:
|
|
564
|
+
if not quiet and tq is None: tq = tqdm.tqdm(total=len(ids)-skip)
|
|
565
|
+
if tq is not None: tq.update()
|
|
566
|
+
url_this = f"{url}/{id_this}/genomic-contexts?sort=distance&direction=asc"
|
|
567
|
+
try:
|
|
568
|
+
response = session.get(url_this, headers=headers)
|
|
569
|
+
except Exception as e:
|
|
570
|
+
logging.error(f"Failed for SNP:{id_this}; URL:{url_this}; {str(e)}")
|
|
571
|
+
continue
|
|
572
|
+
if response.status_code!=200:
|
|
573
|
+
logging.error(f"(status_code={response.status_code}): url_this: {url_this}")
|
|
574
|
+
continue
|
|
575
|
+
|
|
576
|
+
rval = response.json()
|
|
577
|
+
logging.debug(json.dumps(rval, sort_keys=True, indent=2))
|
|
578
|
+
|
|
579
|
+
gcs_this = rval['_embedded']['genomic_contexts'] if '_embedded' in rval and 'genomic_contexts' in rval['_embedded'] else []
|
|
580
|
+
|
|
581
|
+
df_this = None
|
|
582
|
+
for gc in gcs_this:
|
|
583
|
+
if not tags_gc:
|
|
584
|
+
for key,val in gc.items():
|
|
585
|
+
if type(val) not in (list, dict): tags_gc.append(key)
|
|
586
|
+
df_gc_this = pd.DataFrame({tag_gc:[gc[tag_gc] if tag_gc in gc else ''] for tag_gc in tags_gc})
|
|
587
|
+
gene = gc['gene'] if 'gene' in gc else {}
|
|
588
|
+
gene_name = gene['gene_name'] if 'gene_name' in gene else ''
|
|
589
|
+
ensembl_gene_ids = gene['ensembl_gene_ids'] if 'ensembl_gene_ids' in gene else []
|
|
590
|
+
entrez_gene_ids = gene['entrez_gene_ids'] if 'entrez_gene_ids' in gene else []
|
|
591
|
+
location = gc['location'] if 'location' in gc else {}
|
|
592
|
+
chromosome_name = location['chromosome_name'] if 'chromosome_name' in location else ''
|
|
593
|
+
chromosome_position = location['chromosome_position'] if 'chromosome_position' in location else ''
|
|
594
|
+
chromosome_region = location['region']['name'] if 'region' in location and 'name' in location['region'] else ''
|
|
595
|
+
df_gc_this = pd.DataFrame(
|
|
596
|
+
{
|
|
597
|
+
'gene_name':[gene_name],
|
|
598
|
+
'ensembl_gene_ids':[';'.join(ensembl_gene_ids)],
|
|
599
|
+
'entrez_gene_ids':[';'.join(entrez_gene_ids)],
|
|
600
|
+
'chromosome_name':[chromosome_name],
|
|
601
|
+
'chromosome_position':[chromosome_position],
|
|
602
|
+
'chromosome_region':[chromosome_region]
|
|
603
|
+
})
|
|
604
|
+
df_gc = pd.concat([df_gc, df_gc_this])
|
|
605
|
+
|
|
606
|
+
n_gc+=1
|
|
607
|
+
df_this = pd.concat([df_this, df_gc], axis=1)
|
|
608
|
+
|
|
609
|
+
if fout: df_this.to_csv(fout, sep="\t", index=False, header=(n_out==0), mode=('w' if n_out==0 else 'a'))
|
|
610
|
+
if fout is None: df = pd.concat([df, df_this], axis=0)
|
|
611
|
+
n_out+=df_this.shape[0]
|
|
612
|
+
|
|
613
|
+
n_snp+=1
|
|
614
|
+
if n_snp==nmax:
|
|
615
|
+
logging.info(f"NMAX IDs reached: {nmax}")
|
|
616
|
+
break
|
|
617
|
+
if tq is not None: tq.close()
|
|
618
|
+
logging.info(f"SNPs: {n_snp}; mapped_genes: {n_gene}; locations: {n_loc}; genomic_contexts: {n_gc}; n_out: {n_out}")
|
|
619
|
+
if fout is None: return(df)
|
|
620
|
+
|
|
621
|
+
|
|
472
622
|
##############################################################################
|
|
473
623
|
def SearchStudiesV1(ids, searchtype, base_url=BASE_URL_V1, fout=None):
|
|
474
624
|
tags=[]; n_study=0; rval=None; df=None; tq=None;
|
|
@@ -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
|
|
@@ -31,6 +31,7 @@ if __name__=='__main__':
|
|
|
31
31
|
parser.add_argument("--compression", choices=compressions)
|
|
32
32
|
parser.add_argument("--csv", action="store_true", help="delimiter is comma")
|
|
33
33
|
parser.add_argument("--tsv", action="store_true", help="delimiter is tab")
|
|
34
|
+
parser.add_argument("--quotechar_in", default='"', help="Input quote char")
|
|
34
35
|
parser.add_argument("--clean_coltags", action="store_true", help="trim and replace whitespace, punctuation")
|
|
35
36
|
parser.add_argument("--on_bad_lines", choices=["error", "warn", "skip"], default="warn")
|
|
36
37
|
parser.add_argument("--merge_how", choices=["left", "right", "outer", "inner", "cross"], default="inner")
|
|
@@ -83,7 +84,7 @@ if __name__=='__main__':
|
|
|
83
84
|
search_rels = [rel.strip() for rel in re.split(r',', args.search_rels.strip())] if (args.search_rels is not None) else None
|
|
84
85
|
search_typs = [typ.strip() for typ in re.split(r',', args.search_typs.strip())] if (args.search_typs is not None) else None
|
|
85
86
|
|
|
86
|
-
df = pd.read_csv(args.ifile, sep=delim, header=(None if args.noheader_in else 0), compression=compression, on_bad_lines=args.on_bad_lines, nrows=(1 if args.op in ('showcols', 'list_columns') else args.nrows), skiprows=args.skiprows)
|
|
87
|
+
df = pd.read_csv(args.ifile, sep=delim, quotechar=args.quotechar_in, header=(None if args.noheader_in else 0), compression=compression, on_bad_lines=args.on_bad_lines, nrows=(1 if args.op in ('showcols', 'list_columns') else args.nrows), skiprows=args.skiprows)
|
|
87
88
|
|
|
88
89
|
if args.clean_coltags: util_pandas.CleanColtags(df)
|
|
89
90
|
|
|
@@ -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.40"
|
|
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.35",
|
|
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
|