pyobo 0.11.2__tar.gz → 0.12.0.dev0__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.
- {pyobo-0.11.2/src/pyobo.egg-info → pyobo-0.12.0.dev0}/PKG-INFO +218 -216
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/README.md +172 -163
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/pyproject.toml +38 -35
- pyobo-0.12.0.dev0/src/pyobo/.DS_Store +0 -0
- pyobo-0.12.0.dev0/src/pyobo/__init__.py +145 -0
- pyobo-0.12.0.dev0/src/pyobo/_reference_tmp.py +35 -0
- pyobo-0.12.0.dev0/src/pyobo/api/__init__.py +126 -0
- pyobo-0.12.0.dev0/src/pyobo/api/alts.py +101 -0
- pyobo-0.12.0.dev0/src/pyobo/api/combine.py +38 -0
- pyobo-0.12.0.dev0/src/pyobo/api/edges.py +68 -0
- pyobo-0.12.0.dev0/src/pyobo/api/hierarchy.py +225 -0
- pyobo-0.12.0.dev0/src/pyobo/api/metadata.py +35 -0
- pyobo-0.12.0.dev0/src/pyobo/api/names.py +334 -0
- pyobo-0.12.0.dev0/src/pyobo/api/properties.py +210 -0
- pyobo-0.12.0.dev0/src/pyobo/api/relations.py +181 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/api/species.py +24 -21
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/api/typedefs.py +11 -11
- pyobo-0.12.0.dev0/src/pyobo/api/utils.py +156 -0
- pyobo-0.12.0.dev0/src/pyobo/api/xrefs.py +174 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/aws.py +23 -22
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/cli/cli.py +1 -47
- pyobo-0.12.0.dev0/src/pyobo/cli/database.py +360 -0
- pyobo-0.11.2/src/pyobo/xrefdb/xrefs_pipeline.py → pyobo-0.12.0.dev0/src/pyobo/cli/database_utils.py +52 -71
- pyobo-0.12.0.dev0/src/pyobo/cli/lookup.py +302 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/cli/utils.py +19 -6
- pyobo-0.12.0.dev0/src/pyobo/constants.py +199 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/getters.py +188 -117
- pyobo-0.12.0.dev0/src/pyobo/gilda_utils.py +151 -0
- pyobo-0.12.0.dev0/src/pyobo/identifier_utils.py +303 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/mocks.py +9 -6
- pyobo-0.12.0.dev0/src/pyobo/ner/__init__.py +7 -0
- pyobo-0.12.0.dev0/src/pyobo/ner/api.py +72 -0
- {pyobo-0.11.2/src/pyobo → pyobo-0.12.0.dev0/src/pyobo/ner}/normalizer.py +37 -43
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/obographs.py +38 -29
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/plugins.py +5 -4
- pyobo-0.12.0.dev0/src/pyobo/reader.py +1582 -0
- pyobo-0.12.0.dev0/src/pyobo/reader_utils.py +155 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/registries/metaregistry.json +453 -334
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/registries/metaregistry.py +37 -3
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resource_utils.py +42 -22
- pyobo-0.12.0.dev0/src/pyobo/resources/goc.py +75 -0
- pyobo-0.12.0.dev0/src/pyobo/resources/goc.tsv +188 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/ncbitaxon.py +4 -5
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/ro.py +3 -2
- pyobo-0.12.0.dev0/src/pyobo/sources/README.md +19 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/__init__.py +46 -27
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/antibodyregistry.py +11 -12
- pyobo-0.12.0.dev0/src/pyobo/sources/bigg/__init__.py +13 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/bigg/bigg_compartment.py +81 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/bigg/bigg_metabolite.py +174 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/bigg/bigg_model.py +46 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/bigg/bigg_reaction.py +71 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/biogrid.py +1 -2
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/ccle.py +7 -12
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/cgnc.py +0 -5
- pyobo-0.12.0.dev0/src/pyobo/sources/chembl/__init__.py +9 -0
- pyobo-0.11.2/src/pyobo/sources/chembl.py → pyobo-0.12.0.dev0/src/pyobo/sources/chembl/chembl_compound.py +13 -25
- pyobo-0.12.0.dev0/src/pyobo/sources/chembl/chembl_target.py +152 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/civic_gene.py +94 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/clinicaltrials.py +158 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/complexportal.py +24 -24
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/conso.py +14 -22
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/credit.py +1 -9
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/cvx.py +27 -5
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/depmap.py +9 -12
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/dictybase_gene.py +2 -7
- pyobo-0.12.0.dev0/src/pyobo/sources/drugbank/__init__.py +9 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/drugbank}/drugbank.py +11 -16
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/drugbank}/drugbank_salt.py +3 -8
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/drugcentral.py +4 -9
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/expasy.py +31 -34
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/famplex.py +13 -18
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/flybase.py +3 -8
- pyobo-0.12.0.dev0/src/pyobo/sources/gard.py +62 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/geonames/__init__.py +9 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/geonames/features.py +28 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/geonames}/geonames.py +87 -26
- pyobo-0.12.0.dev0/src/pyobo/sources/geonames/utils.py +115 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/gmt_utils.py +6 -7
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/go.py +20 -13
- pyobo-0.12.0.dev0/src/pyobo/sources/gtdb.py +154 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/gwascentral/__init__.py +9 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/gwascentral}/gwascentral_phenotype.py +5 -7
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/gwascentral}/gwascentral_study.py +1 -7
- pyobo-0.12.0.dev0/src/pyobo/sources/hgnc/__init__.py +9 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/hgnc}/hgnc.py +56 -70
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/hgnc}/hgncgenefamily.py +8 -18
- pyobo-0.12.0.dev0/src/pyobo/sources/icd/__init__.py +9 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/icd}/icd10.py +35 -37
- pyobo-0.12.0.dev0/src/pyobo/sources/icd/icd11.py +148 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/icd}/icd_utils.py +66 -20
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/interpro.py +4 -9
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/itis.py +0 -5
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/kegg/api.py +16 -38
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/kegg/genes.py +9 -20
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/kegg/genome.py +1 -7
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/kegg/pathway.py +9 -21
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/mesh.py +58 -24
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/mgi.py +3 -10
- pyobo-0.12.0.dev0/src/pyobo/sources/mirbase/__init__.py +11 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/mirbase}/mirbase.py +8 -11
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/mirbase}/mirbase_family.py +4 -8
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/mirbase}/mirbase_mature.py +3 -7
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/msigdb.py +64 -38
- pyobo-0.12.0.dev0/src/pyobo/sources/ncbi/__init__.py +9 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/ncbi/ncbi_gc.py +162 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/ncbi}/ncbigene.py +18 -19
- pyobo-0.12.0.dev0/src/pyobo/sources/nih_reporter.py +60 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/nlm/__init__.py +9 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/nlm/nlm_catalog.py +48 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/nlm/nlm_publisher.py +36 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/nlm/utils.py +105 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/npass.py +6 -8
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/omim_ps.py +10 -3
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/pathbank.py +4 -8
- pyobo-0.12.0.dev0/src/pyobo/sources/pfam/__init__.py +9 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/pfam}/pfam.py +3 -8
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/pfam}/pfam_clan.py +2 -7
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/__init__.py +15 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +85 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +77 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +108 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +63 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +84 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/pharmgkb/utils.py +86 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/pid.py +1 -6
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/pombase.py +6 -10
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/pubchem.py +4 -9
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/reactome.py +5 -11
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/rgd.py +11 -16
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/rhea.py +37 -36
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/ror.py +59 -39
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/selventa/schem.py +4 -7
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/selventa/scomp.py +1 -6
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/selventa/sdis.py +4 -7
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/selventa/sfam.py +1 -6
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/sgd.py +6 -11
- pyobo-0.12.0.dev0/src/pyobo/sources/signor/__init__.py +7 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/signor/download.py +41 -0
- pyobo-0.12.0.dev0/src/pyobo/sources/signor/signor_complexes.py +103 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/slm.py +9 -13
- pyobo-0.12.0.dev0/src/pyobo/sources/umls/__init__.py +9 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/umls/get_synonym_types.py +20 -4
- pyobo-0.12.0.dev0/src/pyobo/sources/umls/sty.py +57 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/umls/synonym_types.tsv +1 -1
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/umls/umls.py +18 -22
- pyobo-0.12.0.dev0/src/pyobo/sources/unimod.py +46 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/uniprot/uniprot.py +40 -32
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/uniprot/uniprot_ptm.py +4 -34
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/utils.py +3 -2
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/wikipathways.py +7 -10
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/zfin.py +5 -10
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/ssg/__init__.py +12 -16
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/ssg/index.html +26 -13
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/ssg/term.html +12 -2
- pyobo-0.12.0.dev0/src/pyobo/struct/__init__.py +80 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/__init__.py +1 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/dsl.py +2572 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/macros.py +423 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/obo_to_functional.py +385 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/ontology.py +270 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/functional/utils.py +112 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/reference.py +373 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/struct.py +2277 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/struct_utils.py +1078 -0
- pyobo-0.12.0.dev0/src/pyobo/struct/typedef.py +331 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/struct/utils.py +12 -5
- pyobo-0.12.0.dev0/src/pyobo/struct/vocabulary.py +138 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/utils/cache.py +13 -11
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/utils/io.py +17 -31
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/utils/iter.py +5 -5
- pyobo-0.12.0.dev0/src/pyobo/utils/misc.py +76 -0
- pyobo-0.12.0.dev0/src/pyobo/utils/path.py +147 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/version.py +3 -3
- pyobo-0.11.2/MANIFEST.in +0 -11
- pyobo-0.11.2/PKG-INFO +0 -711
- pyobo-0.11.2/setup.cfg +0 -4
- pyobo-0.11.2/src/pyobo/__init__.py +0 -68
- pyobo-0.11.2/src/pyobo/api/__init__.py +0 -55
- pyobo-0.11.2/src/pyobo/api/alts.py +0 -92
- pyobo-0.11.2/src/pyobo/api/hierarchy.py +0 -291
- pyobo-0.11.2/src/pyobo/api/metadata.py +0 -40
- pyobo-0.11.2/src/pyobo/api/names.py +0 -255
- pyobo-0.11.2/src/pyobo/api/properties.py +0 -206
- pyobo-0.11.2/src/pyobo/api/relations.py +0 -207
- pyobo-0.11.2/src/pyobo/api/utils.py +0 -104
- pyobo-0.11.2/src/pyobo/api/xrefs.py +0 -187
- pyobo-0.11.2/src/pyobo/cli/database.py +0 -338
- pyobo-0.11.2/src/pyobo/cli/lookup.py +0 -334
- pyobo-0.11.2/src/pyobo/constants.py +0 -99
- pyobo-0.11.2/src/pyobo/gilda_utils.py +0 -272
- pyobo-0.11.2/src/pyobo/identifier_utils.py +0 -142
- pyobo-0.11.2/src/pyobo/reader.py +0 -620
- pyobo-0.11.2/src/pyobo/sources/README.md +0 -15
- pyobo-0.11.2/src/pyobo/sources/civic_gene.py +0 -54
- pyobo-0.11.2/src/pyobo/sources/icd11.py +0 -105
- pyobo-0.11.2/src/pyobo/sources/umls/__init__.py +0 -3
- pyobo-0.11.2/src/pyobo/struct/__init__.py +0 -34
- pyobo-0.11.2/src/pyobo/struct/reference.py +0 -178
- pyobo-0.11.2/src/pyobo/struct/struct.py +0 -1496
- pyobo-0.11.2/src/pyobo/struct/typedef.py +0 -379
- pyobo-0.11.2/src/pyobo/utils/misc.py +0 -88
- pyobo-0.11.2/src/pyobo/utils/path.py +0 -141
- pyobo-0.11.2/src/pyobo/xrefdb/__init__.py +0 -1
- pyobo-0.11.2/src/pyobo/xrefdb/canonicalizer.py +0 -214
- pyobo-0.11.2/src/pyobo/xrefdb/priority.py +0 -59
- pyobo-0.11.2/src/pyobo/xrefdb/sources/__init__.py +0 -60
- pyobo-0.11.2/src/pyobo/xrefdb/sources/biomappings.py +0 -36
- pyobo-0.11.2/src/pyobo/xrefdb/sources/cbms2019.py +0 -91
- pyobo-0.11.2/src/pyobo/xrefdb/sources/chembl.py +0 -83
- pyobo-0.11.2/src/pyobo/xrefdb/sources/compath.py +0 -82
- pyobo-0.11.2/src/pyobo/xrefdb/sources/famplex.py +0 -64
- pyobo-0.11.2/src/pyobo/xrefdb/sources/gilda.py +0 -50
- pyobo-0.11.2/src/pyobo/xrefdb/sources/intact.py +0 -113
- pyobo-0.11.2/src/pyobo/xrefdb/sources/ncit.py +0 -133
- pyobo-0.11.2/src/pyobo/xrefdb/sources/pubchem.py +0 -27
- pyobo-0.11.2/src/pyobo/xrefdb/sources/wikidata.py +0 -116
- pyobo-0.11.2/src/pyobo.egg-info/SOURCES.txt +0 -181
- pyobo-0.11.2/src/pyobo.egg-info/dependency_links.txt +0 -1
- pyobo-0.11.2/src/pyobo.egg-info/entry_points.txt +0 -2
- pyobo-0.11.2/src/pyobo.egg-info/requires.txt +0 -36
- pyobo-0.11.2/src/pyobo.egg-info/top_level.txt +0 -1
- pyobo-0.11.2/tests/__init__.py +0 -1
- pyobo-0.11.2/tests/constants.py +0 -18
- pyobo-0.11.2/tests/resources/citations.txt +0 -201
- pyobo-0.11.2/tests/resources/test_chebi.obo +0 -436
- pyobo-0.11.2/tests/resources/test_msigdb.gmt +0 -3
- pyobo-0.11.2/tests/resources/test_wikipathways.gmt +0 -3
- pyobo-0.11.2/tests/test_alt_ids.py +0 -91
- pyobo-0.11.2/tests/test_caches.py +0 -86
- pyobo-0.11.2/tests/test_extract.py +0 -63
- pyobo-0.11.2/tests/test_get.py +0 -264
- pyobo-0.11.2/tests/test_gmt.py +0 -57
- pyobo-0.11.2/tests/test_ground.py +0 -38
- pyobo-0.11.2/tests/test_mapper.py +0 -63
- pyobo-0.11.2/tests/test_sources/__init__.py +0 -1
- pyobo-0.11.2/tests/test_sources/test_famplex.py +0 -14
- pyobo-0.11.2/tests/test_sources/test_meta.py +0 -38
- pyobo-0.11.2/tests/test_struct.py +0 -51
- pyobo-0.11.2/tests/test_utils.py +0 -75
- pyobo-0.11.2/tests/test_version_pins.py +0 -44
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/LICENSE +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/__main__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/cli/__init__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/cli/aws.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/py.typed +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/registries/__init__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/__init__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/ro.tsv +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/so.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/resources/so.tsv +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/agrovoc.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/chebi.py +1 -1
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/cpt.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/kegg/__init__.py +0 -0
- {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0.dev0/src/pyobo/sources/mirbase}/mirbase_constants.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/selventa/__init__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/umls/__main__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/sources/uniprot/__init__.py +1 -1
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/ssg/base.html +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/ssg/typedef.html +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/utils/__init__.py +0 -0
- {pyobo-0.11.2 → pyobo-0.12.0.dev0}/src/pyobo/utils/ndex_utils.py +0 -0
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyobo
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0.dev0
|
|
4
4
|
Summary: A python package for handling and generating OBO
|
|
5
|
-
Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>
|
|
6
|
-
Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
|
|
7
|
-
License: MIT License
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2024 Charles Tapley Hoyt
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions:
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in all
|
|
19
|
-
copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
-
SOFTWARE.
|
|
28
|
-
|
|
29
|
-
Project-URL: Bug Tracker, https://github.com/biopragmatics/pyobo/issues
|
|
30
|
-
Project-URL: Homepage, https://github.com/biopragmatics/pyobo
|
|
31
|
-
Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
|
|
32
|
-
Project-URL: Documentation, https://pyobo.readthedocs.io
|
|
33
5
|
Keywords: snekpack,cookiecutter,ontologies,biomedical ontologies,life sciences,natural sciences,bioinformatics,cheminformatics,Open Biomedical Ontologies,OBO
|
|
6
|
+
Author: Charles Tapley Hoyt
|
|
7
|
+
Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>
|
|
8
|
+
License-File: LICENSE
|
|
34
9
|
Classifier: Development Status :: 4 - Beta
|
|
35
10
|
Classifier: Environment :: Console
|
|
36
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -39,16 +14,16 @@ Classifier: Operating System :: OS Independent
|
|
|
39
14
|
Classifier: Framework :: Pytest
|
|
40
15
|
Classifier: Framework :: tox
|
|
41
16
|
Classifier: Framework :: Sphinx
|
|
17
|
+
Classifier: Natural Language :: English
|
|
42
18
|
Classifier: Programming Language :: Python
|
|
43
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
44
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
45
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
46
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
47
23
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
|
+
Classifier: Typing :: Typed
|
|
48
25
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
49
26
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
50
|
-
Requires-Python: >=3.9
|
|
51
|
-
Description-Content-Type: text/markdown
|
|
52
27
|
Requires-Dist: obonet>=0.3.0
|
|
53
28
|
Requires-Dist: click
|
|
54
29
|
Requires-Dist: tqdm
|
|
@@ -56,33 +31,51 @@ Requires-Dist: pyyaml
|
|
|
56
31
|
Requires-Dist: pandas
|
|
57
32
|
Requires-Dist: requests
|
|
58
33
|
Requires-Dist: protmapper
|
|
59
|
-
Requires-Dist:
|
|
60
|
-
Requires-Dist:
|
|
34
|
+
Requires-Dist: more-itertools
|
|
35
|
+
Requires-Dist: more-click>=0.0.2
|
|
61
36
|
Requires-Dist: humanize
|
|
62
37
|
Requires-Dist: tabulate
|
|
63
38
|
Requires-Dist: cachier
|
|
64
|
-
Requires-Dist: pystow>=0.
|
|
65
|
-
Requires-Dist: bioversions>=0.
|
|
66
|
-
Requires-Dist: bioregistry>=0.
|
|
67
|
-
Requires-Dist: bioontologies>=0.
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
39
|
+
Requires-Dist: pystow>=0.7.0
|
|
40
|
+
Requires-Dist: bioversions>=0.7.0
|
|
41
|
+
Requires-Dist: bioregistry>=0.12.0
|
|
42
|
+
Requires-Dist: bioontologies>=0.5.2
|
|
43
|
+
Requires-Dist: ssslm>=0.0.9
|
|
44
|
+
Requires-Dist: zenodo-client>=0.3.6
|
|
45
|
+
Requires-Dist: class-resolver
|
|
70
46
|
Requires-Dist: psycopg2-binary
|
|
71
47
|
Requires-Dist: pydantic>=2.0
|
|
72
|
-
Requires-Dist:
|
|
73
|
-
Requires-Dist:
|
|
74
|
-
Requires-Dist:
|
|
75
|
-
Requires-Dist:
|
|
76
|
-
Requires-Dist:
|
|
48
|
+
Requires-Dist: curies>=0.10.6
|
|
49
|
+
Requires-Dist: python-dateutil
|
|
50
|
+
Requires-Dist: networkx>=3.4
|
|
51
|
+
Requires-Dist: drugbank-downloader
|
|
52
|
+
Requires-Dist: chembl-downloader
|
|
53
|
+
Requires-Dist: umls-downloader>=0.1.3
|
|
54
|
+
Requires-Dist: clinicaltrials-downloader>=0.0.2
|
|
55
|
+
Requires-Dist: nih-reporter-downloader>=0.0.1
|
|
56
|
+
Requires-Dist: typing-extensions
|
|
77
57
|
Requires-Dist: rdflib
|
|
78
|
-
|
|
79
|
-
Requires-Dist:
|
|
80
|
-
Requires-Dist:
|
|
58
|
+
Requires-Dist: sphinx>=8 ; extra == 'docs'
|
|
59
|
+
Requires-Dist: sphinx-rtd-theme>=3.0 ; extra == 'docs'
|
|
60
|
+
Requires-Dist: sphinx-click ; extra == 'docs'
|
|
61
|
+
Requires-Dist: sphinx-automodapi ; extra == 'docs'
|
|
62
|
+
Requires-Dist: ssslm[gilda] ; extra == 'gilda'
|
|
63
|
+
Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
|
|
64
|
+
Requires-Dist: pytest ; extra == 'tests'
|
|
65
|
+
Requires-Dist: coverage[toml] ; extra == 'tests'
|
|
66
|
+
Maintainer: Charles Tapley Hoyt
|
|
67
|
+
Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
|
|
68
|
+
Requires-Python: >=3.10
|
|
69
|
+
Project-URL: Bug Tracker, https://github.com/biopragmatics/pyobo/issues
|
|
70
|
+
Project-URL: Documentation, https://pyobo.readthedocs.io
|
|
71
|
+
Project-URL: Funding, https://github.com/sponsors/cthoyt
|
|
72
|
+
Project-URL: Homepage, https://github.com/biopragmatics/pyobo
|
|
73
|
+
Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
|
|
81
74
|
Provides-Extra: docs
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
Provides-Extra: gilda
|
|
76
|
+
Provides-Extra: gilda-slim
|
|
77
|
+
Provides-Extra: tests
|
|
78
|
+
Description-Content-Type: text/markdown
|
|
86
79
|
|
|
87
80
|
<!--
|
|
88
81
|
<p align="center">
|
|
@@ -117,25 +110,24 @@ Requires-Dist: sphinx_automodapi; extra == "docs"
|
|
|
117
110
|
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3381961.svg" alt="DOI"></a>
|
|
118
111
|
</p>
|
|
119
112
|
|
|
120
|
-
Tools for biological identifiers, names, synonyms, xrefs, hierarchies,
|
|
121
|
-
perspective of OBO.
|
|
113
|
+
Tools for biological identifiers, names, synonyms, xrefs, hierarchies,
|
|
114
|
+
relations, and properties through the perspective of OBO.
|
|
122
115
|
|
|
123
116
|
## Example Usage
|
|
124
117
|
|
|
125
|
-
Note! PyOBO is no-nonsense. This means that there's no repetitive
|
|
126
|
-
|
|
127
|
-
no exceptions.
|
|
118
|
+
Note! PyOBO is no-nonsense. This means that there's no repetitive prefixes in
|
|
119
|
+
identifiers. It also means all identifiers are strings, no exceptions.
|
|
128
120
|
|
|
129
|
-
Note! The first time you run these, they have to download and cache
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
121
|
+
Note! The first time you run these, they have to download and cache all
|
|
122
|
+
resources. We're not in the business of redistributing data, so all scripts
|
|
123
|
+
should be completely reproducible. There's some AWS tools for
|
|
124
|
+
hosting/downloading pre-compiled versions in `pyobo.aws` if you don't have time
|
|
125
|
+
for that.
|
|
134
126
|
|
|
135
|
-
Note! PyOBO can perform grounding in a limited number of cases, but
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
127
|
+
Note! PyOBO can perform grounding in a limited number of cases, but it is _not_
|
|
128
|
+
a general solution for named entity recognition (NER) or grounding. It's
|
|
129
|
+
suggested to check `Gilda <https://github.com/indralab/gilda>`\_ for a
|
|
130
|
+
no-nonsense solution.
|
|
139
131
|
|
|
140
132
|
### Mapping Identifiers and CURIEs
|
|
141
133
|
|
|
@@ -185,6 +177,7 @@ one using alternative identifiers listed in the underlying OBO with:
|
|
|
185
177
|
|
|
186
178
|
```python
|
|
187
179
|
import pyobo
|
|
180
|
+
from pyobo import Reference
|
|
188
181
|
|
|
189
182
|
# Look up DNA-binding transcription factor activity (go:0003700)
|
|
190
183
|
# based on an old id
|
|
@@ -192,13 +185,13 @@ primary_curie = pyobo.get_primary_curie('go:0001071')
|
|
|
192
185
|
assert primary_curie == 'go:0003700'
|
|
193
186
|
|
|
194
187
|
# If it's already the primary, it just gets returned
|
|
195
|
-
assert 'go:0003700' == pyobo.
|
|
188
|
+
assert Reference.from_curie('go:0003700') == pyobo.get_primary_curie('go:0003700')
|
|
196
189
|
```
|
|
197
190
|
|
|
198
191
|
### Mapping Species
|
|
199
192
|
|
|
200
|
-
Some resources have species information for their term. Get a mapping of
|
|
201
|
-
to species (as NCBI taxonomy identifiers):
|
|
193
|
+
Some resources have species information for their term. Get a mapping of
|
|
194
|
+
WikiPathway identifiers to species (as NCBI taxonomy identifiers):
|
|
202
195
|
|
|
203
196
|
```python
|
|
204
197
|
import pyobo
|
|
@@ -241,9 +234,9 @@ assert identifier is None
|
|
|
241
234
|
assert name is None
|
|
242
235
|
```
|
|
243
236
|
|
|
244
|
-
If you're not really sure which namespace a name might belong to, you
|
|
245
|
-
|
|
246
|
-
|
|
237
|
+
If you're not really sure which namespace a name might belong to, you can try a
|
|
238
|
+
few in a row (prioritize by ones that cover the appropriate entity type to avoid
|
|
239
|
+
false positives in case of conflicts):
|
|
247
240
|
|
|
248
241
|
```python
|
|
249
242
|
import pyobo
|
|
@@ -277,8 +270,8 @@ pubchem_compound_id = pyobo.get_xref('chebi', '132964', 'pubchem.compound')
|
|
|
277
270
|
assert pubchem_compound_id == '3033674'
|
|
278
271
|
```
|
|
279
272
|
|
|
280
|
-
Get xrefs from Entrez to HGNC, but they're only available through HGNC,
|
|
281
|
-
|
|
273
|
+
Get xrefs from Entrez to HGNC, but they're only available through HGNC, so you
|
|
274
|
+
need to flip them:
|
|
282
275
|
|
|
283
276
|
```python
|
|
284
277
|
import pyobo
|
|
@@ -292,8 +285,8 @@ mapt_hgnc = ncbigene_id_to_hgnc_id['4137']
|
|
|
292
285
|
assert mapt_hgnc == '6893'
|
|
293
286
|
```
|
|
294
287
|
|
|
295
|
-
Since this is a common pattern, there's a keyword argument `flip`
|
|
296
|
-
|
|
288
|
+
Since this is a common pattern, there's a keyword argument `flip` that does this
|
|
289
|
+
for you:
|
|
297
290
|
|
|
298
291
|
```python
|
|
299
292
|
import pyobo
|
|
@@ -313,45 +306,10 @@ hgnc_id = pyobo.get_xref('hgnc', '4137', 'ncbigene', flip=True)
|
|
|
313
306
|
assert hgnc_id == '6893'
|
|
314
307
|
```
|
|
315
308
|
|
|
316
|
-
Remap a CURIE based on pre-defined priority list and [Inspector Javert's Xref
|
|
317
|
-
Database](https://cthoyt.com/2020/04/19/inspector-javerts-xref-database.html):
|
|
318
|
-
|
|
319
|
-
```python
|
|
320
|
-
|
|
321
|
-
import pyobo
|
|
322
|
-
|
|
323
|
-
# Map to the best source possible
|
|
324
|
-
mapt_ncbigene = pyobo.get_priority_curie('hgnc:6893')
|
|
325
|
-
assert mapt_ncbigene == 'ncbigene:4137'
|
|
326
|
-
|
|
327
|
-
# Sometimes you know you're the best. Own it.
|
|
328
|
-
assert 'ncbigene:4137' == pyobo.get_priority_curie('ncbigene:4137')
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
Find all CURIEs mapped to a given one using Inspector Javert's Xref Database:
|
|
332
|
-
|
|
333
|
-
```python
|
|
334
|
-
import pyobo
|
|
335
|
-
|
|
336
|
-
# Get a set of all CURIEs mapped to MAPT
|
|
337
|
-
mapt_curies = pyobo.get_equivalent('hgnc:6893')
|
|
338
|
-
assert 'ncbigene:4137' in mapt_curies
|
|
339
|
-
assert 'ensembl:ENSG00000186868' in mapt_curies
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
If you don't want to wait to build the database locally for the `pyobo.get_priority_curie` and
|
|
343
|
-
`pyobo.get_equivalent`, you can use the following code to download a release from
|
|
344
|
-
[Zenodo](https://zenodo.org/record/3757266):
|
|
345
|
-
|
|
346
|
-
```python
|
|
347
|
-
import pyobo.resource_utils
|
|
348
|
-
|
|
349
|
-
pyobo.resource_utils.ensure_inspector_javert()
|
|
350
|
-
```
|
|
351
|
-
|
|
352
309
|
### Properties
|
|
353
310
|
|
|
354
|
-
Get properties, like SMILES. The semantics of these are defined on an OBO-OBO
|
|
311
|
+
Get properties, like SMILES. The semantics of these are defined on an OBO-OBO
|
|
312
|
+
basis.
|
|
355
313
|
|
|
356
314
|
```python
|
|
357
315
|
import pyobo
|
|
@@ -378,47 +336,50 @@ assert smiles == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
|
|
|
378
336
|
Check if an entity is in the hierarchy:
|
|
379
337
|
|
|
380
338
|
```python
|
|
381
|
-
import networkx as nx
|
|
382
339
|
import pyobo
|
|
340
|
+
from pyobo import Reference
|
|
383
341
|
|
|
384
342
|
# check that go:0008219 ! cell death is an ancestor of go:0006915 ! apoptotic process
|
|
385
|
-
assert 'go:0008219' in pyobo.get_ancestors('go', '0006915')
|
|
343
|
+
assert Reference.from_curie('go:0008219') in pyobo.get_ancestors('go', '0006915')
|
|
386
344
|
|
|
387
345
|
# check that go:0070246 ! natural killer cell apoptotic process is a
|
|
388
346
|
# descendant of go:0006915 ! apoptotic process
|
|
389
347
|
apopototic_process_descendants = pyobo.get_descendants('go', '0006915')
|
|
390
|
-
assert 'go:0070246' in apopototic_process_descendants
|
|
348
|
+
assert Reference.from_curie('go:0070246') in apopototic_process_descendants
|
|
391
349
|
```
|
|
392
350
|
|
|
393
351
|
Get the sub-hierarchy below a given node:
|
|
394
352
|
|
|
395
353
|
```python
|
|
396
354
|
import pyobo
|
|
355
|
+
from pyobo import Reference
|
|
397
356
|
|
|
398
357
|
# get the descendant graph of go:0006915 ! apoptotic process
|
|
399
358
|
apopototic_process_subhierarchy = pyobo.get_subhierarchy('go', '0006915')
|
|
400
359
|
|
|
401
360
|
# check that go:0070246 ! natural killer cell apoptotic process is a
|
|
402
361
|
# descendant of go:0006915 ! apoptotic process through the subhierarchy
|
|
403
|
-
assert 'go:0070246' in apopototic_process_subhierarchy
|
|
362
|
+
assert Reference.from_curie('go:0070246') in apopototic_process_subhierarchy
|
|
404
363
|
```
|
|
405
364
|
|
|
406
365
|
Get a hierarchy with properties preloaded in the node data dictionaries:
|
|
407
366
|
|
|
408
367
|
```python
|
|
409
368
|
import pyobo
|
|
369
|
+
from pyobo import Reference
|
|
410
370
|
|
|
411
371
|
prop = 'http://purl.obolibrary.org/obo/chebi/smiles'
|
|
412
372
|
chebi_hierarchy = pyobo.get_hierarchy('chebi', properties=[prop])
|
|
413
373
|
|
|
414
|
-
assert 'chebi:132964' in chebi_hierarchy
|
|
374
|
+
assert Reference.from_curie('chebi:132964') in chebi_hierarchy
|
|
415
375
|
assert prop in chebi_hierarchy.nodes['chebi:132964']
|
|
416
376
|
assert chebi_hierarchy.nodes['chebi:132964'][prop] == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
|
|
417
377
|
```
|
|
418
378
|
|
|
419
379
|
### Relations
|
|
420
380
|
|
|
421
|
-
Get all orthologies (`ro:HOM0000017`) between HGNC and MGI (note: this is one
|
|
381
|
+
Get all orthologies (`ro:HOM0000017`) between HGNC and MGI (note: this is one
|
|
382
|
+
way)
|
|
422
383
|
|
|
423
384
|
```python
|
|
424
385
|
>>> import pyobo
|
|
@@ -440,11 +401,10 @@ If you want to do it in one line, use:
|
|
|
440
401
|
|
|
441
402
|
### Writings Tests that Use PyOBO
|
|
442
403
|
|
|
443
|
-
If you're writing your own code that relies on PyOBO, and unit
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
pre-build patches like in the following:
|
|
404
|
+
If you're writing your own code that relies on PyOBO, and unit testing it (as
|
|
405
|
+
you should) in a continuous integration setting, you've probably realized that
|
|
406
|
+
loading all the resources on each build is not so fast. In those scenarios, you
|
|
407
|
+
can use some of the pre-build patches like in the following:
|
|
448
408
|
|
|
449
409
|
```python
|
|
450
410
|
import unittest
|
|
@@ -464,57 +424,76 @@ class MyTestCase(unittest.TestCase):
|
|
|
464
424
|
pyobo.get_name('chebi', '1234')
|
|
465
425
|
```
|
|
466
426
|
|
|
467
|
-
|
|
468
427
|
## Curation of the Bioregistry
|
|
469
428
|
|
|
470
429
|
In order to normalize references and identify resources, PyOBO uses the
|
|
471
|
-
[Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
|
|
472
|
-
been externalized for more general reuse.
|
|
430
|
+
[Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
|
|
431
|
+
of PyOBO, but has since been externalized for more general reuse.
|
|
473
432
|
|
|
474
|
-
At
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
433
|
+
At
|
|
434
|
+
[src/pyobo/registries/metaregistry.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/registries/metaregistry.json)
|
|
435
|
+
is the curated "metaregistry". This is a source of information that contains all
|
|
436
|
+
sorts of fixes for missing/wrong information in MIRIAM, OLS, and OBO Foundry;
|
|
437
|
+
entries that don't appear in any of them; additional synonym information for
|
|
438
|
+
each namespace/prefix; rules for normalizing xrefs and CURIEs, etc.
|
|
478
439
|
|
|
479
440
|
Other entries in the metaregistry:
|
|
480
441
|
|
|
481
|
-
- The `"remappings"->"full"` entry is a dictionary from strings that might
|
|
482
|
-
in a given OBO file that need to be completely replaced, due to
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
442
|
+
- The `"remappings"->"full"` entry is a dictionary from strings that might
|
|
443
|
+
follow `xref:` in a given OBO file that need to be completely replaced, due to
|
|
444
|
+
incorrect formatting
|
|
445
|
+
- The `"remappings"->"prefix"` entry contains a dictionary of prefixes for xrefs
|
|
446
|
+
that need to be remapped. Several rules, for example, remove superfluous
|
|
447
|
+
spaces that occur inside CURIEs or and others address instances of the GOGO
|
|
448
|
+
issue.
|
|
449
|
+
- The `"blacklists"` entry contains rules for throwing out malformed xrefs based
|
|
450
|
+
on full string, just prefix, or just suffix.
|
|
488
451
|
|
|
489
452
|
## Troubleshooting
|
|
490
453
|
|
|
491
|
-
The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO
|
|
454
|
+
The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO
|
|
455
|
+
resources. If you get an error like:
|
|
492
456
|
|
|
493
457
|
```
|
|
494
458
|
pyobo.getters.MissingOboBuild: OBO Foundry is missing a build for: mondo
|
|
495
459
|
```
|
|
496
460
|
|
|
497
|
-
Then you should check the corresponding page on the OBO Foundry (in this case,
|
|
498
|
-
and make update to the `url`
|
|
461
|
+
Then you should check the corresponding page on the OBO Foundry (in this case,
|
|
462
|
+
http://www.obofoundry.org/ontology/mondo.html) and make update to the `url`
|
|
463
|
+
entry for that namespace in the Bioregistry.
|
|
499
464
|
|
|
500
465
|
## 🚀 Installation
|
|
501
466
|
|
|
502
467
|
The most recent release can be installed from
|
|
503
|
-
[PyPI](https://pypi.org/project/pyobo/) with:
|
|
468
|
+
[PyPI](https://pypi.org/project/pyobo/) with uv:
|
|
504
469
|
|
|
505
470
|
```console
|
|
506
471
|
python3 -m pip install pyobo
|
|
472
|
+
$ uv pip install pyobo
|
|
507
473
|
```
|
|
508
474
|
|
|
509
|
-
|
|
475
|
+
or with pip:
|
|
510
476
|
|
|
511
477
|
```console
|
|
512
|
-
python3 -m pip install
|
|
478
|
+
$ python3 -m pip install pyobo
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
The most recent code and data can be installed directly from GitHub with uv:
|
|
482
|
+
|
|
483
|
+
```console
|
|
484
|
+
$ uv pip install git+https://github.com/biopragmatics/pyobo.git
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
or with pip:
|
|
488
|
+
|
|
489
|
+
```console
|
|
490
|
+
$ python3 -m pip install git+https://github.com/biopragmatics/pyobo.git
|
|
513
491
|
```
|
|
514
492
|
|
|
515
493
|
## 👐 Contributing
|
|
516
494
|
|
|
517
|
-
Contributions, whether filing an issue, making a pull request, or forking, are
|
|
495
|
+
Contributions, whether filing an issue, making a pull request, or forking, are
|
|
496
|
+
appreciated. See
|
|
518
497
|
[CONTRIBUTING.md](https://github.com/biopragmatics/pyobo/blob/master/.github/CONTRIBUTING.md)
|
|
519
498
|
for more information on getting involved.
|
|
520
499
|
|
|
@@ -551,49 +530,59 @@ This project has been supported by the following grants:
|
|
|
551
530
|
|
|
552
531
|
### 🍪 Cookiecutter
|
|
553
532
|
|
|
554
|
-
This package was created with
|
|
555
|
-
[
|
|
556
|
-
[cookiecutter
|
|
533
|
+
This package was created with
|
|
534
|
+
[@audreyfeldroy](https://github.com/audreyfeldroy)'s
|
|
535
|
+
[cookiecutter](https://github.com/cookiecutter/cookiecutter) package using
|
|
536
|
+
[@cthoyt](https://github.com/cthoyt)'s
|
|
537
|
+
[cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack)
|
|
538
|
+
template.
|
|
557
539
|
|
|
558
540
|
## 🛠️ For Developers
|
|
559
541
|
|
|
560
542
|
<details>
|
|
561
543
|
<summary>See developer instructions</summary>
|
|
562
544
|
|
|
563
|
-
The final section of the README is for if you want to get involved by making a
|
|
545
|
+
The final section of the README is for if you want to get involved by making a
|
|
546
|
+
code contribution.
|
|
564
547
|
|
|
565
548
|
### Development Installation
|
|
566
549
|
|
|
567
550
|
To install in development mode, use the following:
|
|
568
551
|
|
|
569
552
|
```console
|
|
570
|
-
git clone git+https://github.com/biopragmatics/pyobo.git
|
|
571
|
-
cd pyobo
|
|
572
|
-
|
|
553
|
+
$ git clone git+https://github.com/biopragmatics/pyobo.git
|
|
554
|
+
$ cd pyobo
|
|
555
|
+
$ uv pip install -e .
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
Alternatively, install using pip:
|
|
559
|
+
|
|
560
|
+
```console
|
|
561
|
+
$ python3 -m pip install -e .
|
|
573
562
|
```
|
|
574
563
|
|
|
575
564
|
### Updating Package Boilerplate
|
|
576
565
|
|
|
577
|
-
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
578
|
-
configuration)
|
|
579
|
-
|
|
566
|
+
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
567
|
+
guidelines, documentation configuration) up-to-date with the upstream
|
|
568
|
+
cookiecutter package. Install cruft with either `uv tool install cruft` or
|
|
569
|
+
`python3 -m pip install cruft` then run:
|
|
580
570
|
|
|
581
571
|
```console
|
|
582
|
-
|
|
583
|
-
cruft update
|
|
572
|
+
$ cruft update
|
|
584
573
|
```
|
|
585
574
|
|
|
586
|
-
More info on Cruft's update command is
|
|
587
|
-
|
|
575
|
+
More info on Cruft's update command is available
|
|
576
|
+
[here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
|
|
588
577
|
|
|
589
578
|
### 🥼 Testing
|
|
590
579
|
|
|
591
580
|
After cloning the repository and installing `tox` with
|
|
592
|
-
`python3 -m pip install tox tox-uv`,
|
|
593
|
-
|
|
581
|
+
`uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, the
|
|
582
|
+
unit tests in the `tests/` folder can be run reproducibly with:
|
|
594
583
|
|
|
595
584
|
```console
|
|
596
|
-
tox -e py
|
|
585
|
+
$ tox -e py
|
|
597
586
|
```
|
|
598
587
|
|
|
599
588
|
Additionally, these tests are automatically re-run with each commit in a
|
|
@@ -604,67 +593,77 @@ Additionally, these tests are automatically re-run with each commit in a
|
|
|
604
593
|
The documentation can be built locally using the following:
|
|
605
594
|
|
|
606
595
|
```console
|
|
607
|
-
git clone git+https://github.com/biopragmatics/pyobo.git
|
|
608
|
-
cd pyobo
|
|
609
|
-
tox -e docs
|
|
610
|
-
open docs/build/html/index.html
|
|
596
|
+
$ git clone git+https://github.com/biopragmatics/pyobo.git
|
|
597
|
+
$ cd pyobo
|
|
598
|
+
$ tox -e docs
|
|
599
|
+
$ open docs/build/html/index.html
|
|
611
600
|
```
|
|
612
601
|
|
|
613
|
-
The documentation automatically installs the package as well as the `docs`
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
`extensions` list in [`docs/source/conf.py`](
|
|
602
|
+
The documentation automatically installs the package as well as the `docs` extra
|
|
603
|
+
specified in the [`pyproject.toml`](pyproject.toml). `sphinx` plugins like
|
|
604
|
+
`texext` can be added there. Additionally, they need to be added to the
|
|
605
|
+
`extensions` list in [`docs/source/conf.py`](docs/source/conf.py).
|
|
617
606
|
|
|
618
607
|
The documentation can be deployed to [ReadTheDocs](https://readthedocs.io) using
|
|
619
|
-
[this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html).
|
|
620
|
-
|
|
621
|
-
You can also set up continuous integration on GitHub to check not
|
|
622
|
-
Sphinx can build the documentation in an isolated environment (i.e.,
|
|
623
|
-
|
|
608
|
+
[this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html). The
|
|
609
|
+
[`.readthedocs.yml`](.readthedocs.yml) YAML file contains all the configuration
|
|
610
|
+
you'll need. You can also set up continuous integration on GitHub to check not
|
|
611
|
+
only that Sphinx can build the documentation in an isolated environment (i.e.,
|
|
612
|
+
with `tox -e docs-test`) but also that
|
|
613
|
+
[ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
|
|
624
614
|
|
|
625
615
|
#### Configuring ReadTheDocs
|
|
626
616
|
|
|
627
|
-
1. Log in to ReadTheDocs with your GitHub account to install the integration
|
|
628
|
-
|
|
629
|
-
2. Import your project by navigating to https://readthedocs.org/dashboard/import
|
|
630
|
-
your repository
|
|
631
|
-
3. You can rename the repository on the next screen using a more stylized name
|
|
617
|
+
1. Log in to ReadTheDocs with your GitHub account to install the integration at
|
|
618
|
+
https://readthedocs.org/accounts/login/?next=/dashboard/
|
|
619
|
+
2. Import your project by navigating to https://readthedocs.org/dashboard/import
|
|
620
|
+
then clicking the plus icon next to your repository
|
|
621
|
+
3. You can rename the repository on the next screen using a more stylized name
|
|
622
|
+
(i.e., with spaces and capital letters)
|
|
632
623
|
4. Click next, and you're good to go!
|
|
633
624
|
|
|
634
625
|
### 📦 Making a Release
|
|
635
626
|
|
|
636
627
|
#### Configuring Zenodo
|
|
637
628
|
|
|
638
|
-
[Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
|
|
629
|
+
[Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
|
|
630
|
+
to each release of your package.
|
|
639
631
|
|
|
640
|
-
1. Log in to Zenodo via GitHub with this link:
|
|
641
|
-
|
|
642
|
-
|
|
632
|
+
1. Log in to Zenodo via GitHub with this link:
|
|
633
|
+
https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a page
|
|
634
|
+
that lists all of your organizations and asks you to approve installing the
|
|
635
|
+
Zenodo app on GitHub. Click "grant" next to any organizations you want to
|
|
636
|
+
enable the integration for, then click the big green "approve" button. This
|
|
643
637
|
step only needs to be done once.
|
|
644
|
-
2. Navigate to https://zenodo.org/account/settings/github/, which lists all of
|
|
645
|
-
|
|
646
|
-
|
|
638
|
+
2. Navigate to https://zenodo.org/account/settings/github/, which lists all of
|
|
639
|
+
your GitHub repositories (both in your username and any organizations you
|
|
640
|
+
enabled). Click the on/off toggle for any relevant repositories. When you
|
|
641
|
+
make a new repository, you'll have to come back to this
|
|
647
642
|
|
|
648
|
-
After these steps, you're ready to go! After you make "release" on GitHub (steps
|
|
649
|
-
to
|
|
650
|
-
to see
|
|
643
|
+
After these steps, you're ready to go! After you make "release" on GitHub (steps
|
|
644
|
+
for this are below), you can navigate to
|
|
645
|
+
https://zenodo.org/account/settings/github/repository/biopragmatics/pyobo to see
|
|
646
|
+
the DOI for the release and link to the Zenodo record for it.
|
|
651
647
|
|
|
652
648
|
#### Registering with the Python Package Index (PyPI)
|
|
653
649
|
|
|
654
650
|
You only have to do the following steps once.
|
|
655
651
|
|
|
656
|
-
1. Register for an account on the
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
652
|
+
1. Register for an account on the
|
|
653
|
+
[Python Package Index (PyPI)](https://pypi.org/account/register)
|
|
654
|
+
2. Navigate to https://pypi.org/manage/account and make sure you have verified
|
|
655
|
+
your email address. A verification email might not have been sent by default,
|
|
656
|
+
so you might have to click the "options" dropdown next to your address to get
|
|
657
|
+
to the "re-send verification email" button
|
|
658
|
+
3. 2-Factor authentication is required for PyPI since the end of 2023 (see this
|
|
659
|
+
[blog post from PyPI](https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/)).
|
|
660
|
+
This means you have to first issue account recovery codes, then set up
|
|
661
|
+
2-factor authentication
|
|
663
662
|
4. Issue an API token from https://pypi.org/manage/account/token
|
|
664
663
|
|
|
665
664
|
#### Configuring your machine's connection to PyPI
|
|
666
665
|
|
|
667
|
-
You have to do the following steps once per machine.
|
|
666
|
+
You have to do the following steps once per machine.
|
|
668
667
|
|
|
669
668
|
```console
|
|
670
669
|
$ uv tool install keyring
|
|
@@ -676,34 +675,37 @@ Note that this deprecates previous workflows using `.pypirc`.
|
|
|
676
675
|
|
|
677
676
|
#### Uploading to PyPI
|
|
678
677
|
|
|
679
|
-
After installing the package in development mode and installing
|
|
680
|
-
`tox
|
|
681
|
-
|
|
678
|
+
After installing the package in development mode and installing `tox` with
|
|
679
|
+
`uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, run
|
|
680
|
+
the following from the console:
|
|
682
681
|
|
|
683
682
|
```console
|
|
684
|
-
tox -e finish
|
|
683
|
+
$ tox -e finish
|
|
685
684
|
```
|
|
686
685
|
|
|
687
686
|
This script does the following:
|
|
688
687
|
|
|
689
|
-
1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to
|
|
690
|
-
the `pyproject.toml`, `CITATION.cff`,
|
|
691
|
-
and [`docs/source/conf.py`](
|
|
688
|
+
1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to
|
|
689
|
+
switch the version number in the `pyproject.toml`, `CITATION.cff`,
|
|
690
|
+
`src/pyobo/version.py`, and [`docs/source/conf.py`](docs/source/conf.py) to
|
|
691
|
+
not have the `-dev` suffix
|
|
692
692
|
2. Packages the code in both a tar archive and a wheel using
|
|
693
693
|
[`uv build`](https://docs.astral.sh/uv/guides/publish/#building-your-package)
|
|
694
|
-
3. Uploads to PyPI using
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
694
|
+
3. Uploads to PyPI using
|
|
695
|
+
[`uv publish`](https://docs.astral.sh/uv/guides/publish/#publishing-your-package).
|
|
696
|
+
4. Push to GitHub. You'll need to make a release going with the commit where the
|
|
697
|
+
version was bumped.
|
|
698
|
+
5. Bump the version to the next patch. If you made big changes and want to bump
|
|
699
|
+
the version by minor, you can use `tox -e bumpversion -- minor` after.
|
|
698
700
|
|
|
699
701
|
#### Releasing on GitHub
|
|
700
702
|
|
|
701
|
-
1. Navigate
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
3. Click the "Generate Release Notes" button to get a quick outline of recent
|
|
706
|
-
as you see fit
|
|
703
|
+
1. Navigate to https://github.com/biopragmatics/pyobo/releases/new to draft a
|
|
704
|
+
new release
|
|
705
|
+
2. Click the "Choose a Tag" dropdown and select the tag corresponding to the
|
|
706
|
+
release you just made
|
|
707
|
+
3. Click the "Generate Release Notes" button to get a quick outline of recent
|
|
708
|
+
changes. Modify the title and description as you see fit
|
|
707
709
|
4. Click the big green "Publish Release" button
|
|
708
710
|
|
|
709
711
|
This will trigger Zenodo to assign a DOI to your release as well.
|