pyobo 0.12.1__tar.gz → 0.12.3__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.12.1 → pyobo-0.12.3}/PKG-INFO +5 -16
- {pyobo-0.12.1 → pyobo-0.12.3}/README.md +0 -13
- {pyobo-0.12.1 → pyobo-0.12.3}/pyproject.toml +6 -4
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/__init__.py +12 -4
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/getters.py +11 -3
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/__init__.py +4 -1
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/api.py +4 -3
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/__init__.py +2 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/credit.py +17 -6
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/drugbank/drugbank.py +1 -1
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gwascentral/gwascentral_study.py +1 -1
- pyobo-0.12.3/src/pyobo/sources/intact.py +79 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/__init__.py +2 -1
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/ontology.py +2 -2
- pyobo-0.12.3/src/pyobo/struct/obo/__init__.py +9 -0
- {pyobo-0.12.1/src/pyobo → pyobo-0.12.3/src/pyobo/struct/obo}/reader.py +21 -18
- pyobo-0.12.3/src/pyobo/struct/obograph/__init__.py +16 -0
- pyobo-0.12.3/src/pyobo/struct/obograph/export.py +315 -0
- pyobo-0.12.3/src/pyobo/struct/obograph/reader.py +242 -0
- pyobo-0.12.3/src/pyobo/struct/obograph/utils.py +47 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/struct.py +13 -23
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/struct_utils.py +22 -14
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/typedef.py +4 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/vocabulary.py +7 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/version.py +1 -1
- pyobo-0.12.1/src/pyobo/identifier_utils/preprocessing.json +0 -873
- pyobo-0.12.1/src/pyobo/identifier_utils/preprocessing.py +0 -27
- pyobo-0.12.1/src/pyobo/obographs.py +0 -147
- pyobo-0.12.1/src/pyobo/resources/goc.py +0 -75
- pyobo-0.12.1/src/pyobo/resources/goc.tsv +0 -188
- {pyobo-0.12.1 → pyobo-0.12.3}/LICENSE +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/.DS_Store +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/__main__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/alts.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/combine.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/edges.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/hierarchy.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/metadata.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/names.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/properties.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/relations.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/species.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/typedefs.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/api/xrefs.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/cli.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/database.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/database_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/lookup.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/cli/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/constants.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/gilda_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/api.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/data.json +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/data_owl.json +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/data_rdf.json +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/identifier_utils/relations/data_rdfs.json +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/mocks.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ner/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ner/api.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ner/normalizer.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/plugins.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/py.typed +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resource_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/ncbitaxon.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/ro.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/ro.tsv +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/so.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/resources/so.tsv +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/README.md +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/agrovoc.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/antibodyregistry.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/bigg/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/bigg/bigg_compartment.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/bigg/bigg_metabolite.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/bigg/bigg_model.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/bigg/bigg_reaction.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/biogrid.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/ccle.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/cgnc.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/chebi.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/chembl/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/chembl/chembl_compound.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/chembl/chembl_target.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/civic_gene.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/clinicaltrials.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/complexportal.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/conso.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/cpt.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/cvx.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/depmap.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/dictybase_gene.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/drugbank/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/drugbank/drugbank_salt.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/drugcentral.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/expasy.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/famplex.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/flybase.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gard.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/geonames/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/geonames/features.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/geonames/geonames.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/geonames/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gmt_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/go.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gtdb.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gwascentral/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/gwascentral/gwascentral_phenotype.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/hgnc/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/hgnc/hgnc.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/hgnc/hgncgenefamily.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/icd/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/icd/icd10.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/icd/icd11.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/icd/icd_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/interpro.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/itis.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/kegg/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/kegg/api.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/kegg/genes.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/kegg/genome.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/kegg/pathway.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mesh.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mgi.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mirbase/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mirbase/mirbase.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mirbase/mirbase_constants.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mirbase/mirbase_family.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/mirbase/mirbase_mature.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/msigdb.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/ncbi/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/ncbi/ncbi_gc.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/ncbi/ncbigene.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/nih_reporter.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/nlm/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/nlm/nlm_catalog.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/nlm/nlm_publisher.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/nlm/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/npass.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/omim_ps.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pathbank.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pfam/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pfam/pfam.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pfam/pfam_clan.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pharmgkb/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pid.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pombase.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/pubchem.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/reactome.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/rgd.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/rhea.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/ror.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/selventa/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/selventa/schem.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/selventa/scomp.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/selventa/sdis.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/selventa/sfam.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/sgd.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/signor/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/signor/download.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/signor/signor_complexes.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/slm.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/__main__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/sty.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/umls/umls.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/unimod.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/uniprot/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/uniprot/uniprot.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/wikipathways.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/sources/zfin.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ssg/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ssg/base.html +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ssg/index.html +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ssg/term.html +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/ssg/typedef.html +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/dsl.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/macros.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/obo_to_functional.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/functional/utils.py +0 -0
- {pyobo-0.12.1/src/pyobo → pyobo-0.12.3/src/pyobo/struct/obo}/reader_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/reference.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/struct/utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/__init__.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/cache.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/io.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/iter.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/misc.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/ndex_utils.py +0 -0
- {pyobo-0.12.1 → pyobo-0.12.3}/src/pyobo/utils/path.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyobo
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.3
|
|
4
4
|
Summary: A python package for handling and generating OBO
|
|
5
5
|
Keywords: snekpack,cookiecutter,ontologies,biomedical ontologies,life sciences,natural sciences,bioinformatics,cheminformatics,Open Biomedical Ontologies,OBO
|
|
6
6
|
Author: Charles Tapley Hoyt
|
|
@@ -39,13 +39,14 @@ Requires-Dist: cachier
|
|
|
39
39
|
Requires-Dist: pystow>=0.7.0
|
|
40
40
|
Requires-Dist: bioversions>=0.8.0
|
|
41
41
|
Requires-Dist: bioregistry>=0.12.7
|
|
42
|
-
Requires-Dist: bioontologies>=0.7.
|
|
42
|
+
Requires-Dist: bioontologies>=0.7.2
|
|
43
43
|
Requires-Dist: ssslm>=0.0.13
|
|
44
44
|
Requires-Dist: zenodo-client>=0.3.6
|
|
45
45
|
Requires-Dist: class-resolver>=0.6.0
|
|
46
46
|
Requires-Dist: psycopg2-binary
|
|
47
47
|
Requires-Dist: pydantic>=2.0
|
|
48
|
-
Requires-Dist: curies>=0.10.
|
|
48
|
+
Requires-Dist: curies>=0.10.17
|
|
49
|
+
Requires-Dist: curies-processing>=0.1.0
|
|
49
50
|
Requires-Dist: python-dateutil
|
|
50
51
|
Requires-Dist: networkx>=3.4
|
|
51
52
|
Requires-Dist: drugbank-downloader
|
|
@@ -55,6 +56,7 @@ Requires-Dist: clinicaltrials-downloader>=0.0.2
|
|
|
55
56
|
Requires-Dist: nih-reporter-downloader>=0.0.1
|
|
56
57
|
Requires-Dist: typing-extensions
|
|
57
58
|
Requires-Dist: rdflib
|
|
59
|
+
Requires-Dist: obographs>=0.0.8
|
|
58
60
|
Requires-Dist: ssslm[gilda] ; extra == 'gilda'
|
|
59
61
|
Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
|
|
60
62
|
Maintainer: Charles Tapley Hoyt
|
|
@@ -395,19 +397,6 @@ class MyTestCase(unittest.TestCase):
|
|
|
395
397
|
pyobo.get_name("chebi", "1234")
|
|
396
398
|
```
|
|
397
399
|
|
|
398
|
-
## Preprocessing CURIEs, URIs, and unqualified identifiers
|
|
399
|
-
|
|
400
|
-
In order to normalize references and identify resources, PyOBO uses the
|
|
401
|
-
[Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
|
|
402
|
-
of PyOBO, but has since been externalized for more general reuse.
|
|
403
|
-
|
|
404
|
-
At
|
|
405
|
-
[src/pyobo/identifier_utils/preprocessing.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/src/pyobo/identifier_utils/preprocessing.json)
|
|
406
|
-
is the curated set of pre-processing rules. These are used in combination with
|
|
407
|
-
the `curies` package to do pre-processing steps on CURIEs, URIs, and unqualified
|
|
408
|
-
identifiers beyond what is possible with the Bioregistry. See
|
|
409
|
-
https://curies.readthedocs.io/en/latest/preprocessing.html.
|
|
410
|
-
|
|
411
400
|
## Troubleshooting
|
|
412
401
|
|
|
413
402
|
The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO
|
|
@@ -324,19 +324,6 @@ class MyTestCase(unittest.TestCase):
|
|
|
324
324
|
pyobo.get_name("chebi", "1234")
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
## Preprocessing CURIEs, URIs, and unqualified identifiers
|
|
328
|
-
|
|
329
|
-
In order to normalize references and identify resources, PyOBO uses the
|
|
330
|
-
[Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
|
|
331
|
-
of PyOBO, but has since been externalized for more general reuse.
|
|
332
|
-
|
|
333
|
-
At
|
|
334
|
-
[src/pyobo/identifier_utils/preprocessing.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/src/pyobo/identifier_utils/preprocessing.json)
|
|
335
|
-
is the curated set of pre-processing rules. These are used in combination with
|
|
336
|
-
the `curies` package to do pre-processing steps on CURIEs, URIs, and unqualified
|
|
337
|
-
identifiers beyond what is possible with the Bioregistry. See
|
|
338
|
-
https://curies.readthedocs.io/en/latest/preprocessing.html.
|
|
339
|
-
|
|
340
327
|
## Troubleshooting
|
|
341
328
|
|
|
342
329
|
The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO
|
|
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyobo"
|
|
7
|
-
version = "0.12.
|
|
7
|
+
version = "0.12.3"
|
|
8
8
|
description = "A python package for handling and generating OBO"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -72,13 +72,14 @@ dependencies = [
|
|
|
72
72
|
"pystow>=0.7.0",
|
|
73
73
|
"bioversions>=0.8.0",
|
|
74
74
|
"bioregistry>=0.12.7",
|
|
75
|
-
"bioontologies>=0.7.
|
|
75
|
+
"bioontologies>=0.7.2",
|
|
76
76
|
"ssslm>=0.0.13",
|
|
77
77
|
"zenodo-client>=0.3.6",
|
|
78
78
|
"class_resolver>=0.6.0",
|
|
79
79
|
"psycopg2-binary",
|
|
80
80
|
"pydantic>=2.0",
|
|
81
|
-
"curies>=0.10.
|
|
81
|
+
"curies>=0.10.17",
|
|
82
|
+
"curies-processing>=0.1.0",
|
|
82
83
|
"python-dateutil",
|
|
83
84
|
"networkx>=3.4",
|
|
84
85
|
# Resource Downloaders
|
|
@@ -89,6 +90,7 @@ dependencies = [
|
|
|
89
90
|
"nih-reporter-downloader>=0.0.1",
|
|
90
91
|
"typing_extensions",
|
|
91
92
|
"rdflib",
|
|
93
|
+
"obographs>=0.0.8",
|
|
92
94
|
]
|
|
93
95
|
|
|
94
96
|
# see https://peps.python.org/pep-0735/ and https://docs.astral.sh/uv/concepts/dependencies/#dependency-groups
|
|
@@ -288,7 +290,7 @@ known-first-party = [
|
|
|
288
290
|
docstring-code-format = true
|
|
289
291
|
|
|
290
292
|
[tool.bumpversion]
|
|
291
|
-
current_version = "0.12.
|
|
293
|
+
current_version = "0.12.3"
|
|
292
294
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<release>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+(?P<build>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?"
|
|
293
295
|
serialize = [
|
|
294
296
|
"{major}.{minor}.{patch}-{release}+{build}",
|
|
@@ -57,20 +57,29 @@ from .api import (
|
|
|
57
57
|
)
|
|
58
58
|
from .getters import get_ontology
|
|
59
59
|
from .ner import get_grounder, ground
|
|
60
|
-
from .obographs import parse_results_from_obo
|
|
61
60
|
from .plugins import (
|
|
62
61
|
has_nomenclature_plugin,
|
|
63
62
|
iter_nomenclature_plugins,
|
|
64
63
|
run_nomenclature_plugin,
|
|
65
64
|
)
|
|
66
|
-
from .
|
|
67
|
-
|
|
65
|
+
from .struct import (
|
|
66
|
+
Obo,
|
|
67
|
+
Reference,
|
|
68
|
+
StanzaType,
|
|
69
|
+
Synonym,
|
|
70
|
+
SynonymTypeDef,
|
|
71
|
+
Term,
|
|
72
|
+
TypeDef,
|
|
73
|
+
default_reference,
|
|
74
|
+
)
|
|
75
|
+
from .struct.obo import from_obo_path, from_obonet
|
|
68
76
|
from .utils.path import ensure_path
|
|
69
77
|
from .version import get_version
|
|
70
78
|
|
|
71
79
|
__all__ = [
|
|
72
80
|
"Obo",
|
|
73
81
|
"Reference",
|
|
82
|
+
"StanzaType",
|
|
74
83
|
"Synonym",
|
|
75
84
|
"SynonymTypeDef",
|
|
76
85
|
"Term",
|
|
@@ -138,6 +147,5 @@ __all__ = [
|
|
|
138
147
|
"has_nomenclature_plugin",
|
|
139
148
|
"is_descendent",
|
|
140
149
|
"iter_nomenclature_plugins",
|
|
141
|
-
"parse_results_from_obo",
|
|
142
150
|
"run_nomenclature_plugin",
|
|
143
151
|
]
|
|
@@ -20,7 +20,6 @@ from typing import Any, TypeVar
|
|
|
20
20
|
import bioregistry
|
|
21
21
|
import click
|
|
22
22
|
import pystow.utils
|
|
23
|
-
from bioontologies import robot
|
|
24
23
|
from tabulate import tabulate
|
|
25
24
|
from tqdm.auto import tqdm
|
|
26
25
|
from typing_extensions import Unpack
|
|
@@ -34,8 +33,8 @@ from .constants import (
|
|
|
34
33
|
)
|
|
35
34
|
from .identifier_utils import ParseError, wrap_norm_prefix
|
|
36
35
|
from .plugins import has_nomenclature_plugin, run_nomenclature_plugin
|
|
37
|
-
from .reader import from_obo_path, from_obonet
|
|
38
36
|
from .struct import Obo
|
|
37
|
+
from .struct.obo import from_obo_path, from_obonet
|
|
39
38
|
from .utils.io import safe_open_writer
|
|
40
39
|
from .utils.path import ensure_path, prefix_directory_join
|
|
41
40
|
from .version import get_git_hash, get_version
|
|
@@ -160,11 +159,20 @@ def get_ontology(
|
|
|
160
159
|
elif ontology_format == "obo":
|
|
161
160
|
pass # all gucci
|
|
162
161
|
elif ontology_format == "owl":
|
|
162
|
+
import bioontologies.robot
|
|
163
|
+
|
|
163
164
|
_converted_obo_path = path.with_suffix(".obo")
|
|
164
165
|
if prefix in REQUIRES_NO_ROBOT_CHECK:
|
|
165
166
|
robot_check = False
|
|
166
|
-
robot.convert(path, _converted_obo_path, check=robot_check)
|
|
167
|
+
bioontologies.robot.convert(path, _converted_obo_path, check=robot_check)
|
|
167
168
|
path = _converted_obo_path
|
|
169
|
+
elif ontology_format == "json":
|
|
170
|
+
from .struct.obograph import read_obograph
|
|
171
|
+
|
|
172
|
+
obo = read_obograph(prefix=prefix, path=path)
|
|
173
|
+
if cache:
|
|
174
|
+
obo.write_default(force=force_process)
|
|
175
|
+
return obo
|
|
168
176
|
else:
|
|
169
177
|
raise UnhandledFormatError(f"[{prefix}] unhandled ontology file format: {path.suffix}")
|
|
170
178
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Extract registry information."""
|
|
2
2
|
|
|
3
|
+
from curies_processing import get_rules
|
|
4
|
+
|
|
3
5
|
from .api import (
|
|
4
6
|
DefaultCoercionError,
|
|
5
7
|
EmptyStringError,
|
|
@@ -10,10 +12,10 @@ from .api import (
|
|
|
10
12
|
UnregisteredPrefixError,
|
|
11
13
|
_is_valid_identifier,
|
|
12
14
|
_parse_str_or_curie_or_uri_helper,
|
|
15
|
+
get_converter,
|
|
13
16
|
standardize_ec,
|
|
14
17
|
wrap_norm_prefix,
|
|
15
18
|
)
|
|
16
|
-
from .preprocessing import get_rules
|
|
17
19
|
from .relations import ground_relation
|
|
18
20
|
|
|
19
21
|
__all__ = [
|
|
@@ -26,6 +28,7 @@ __all__ = [
|
|
|
26
28
|
"UnregisteredPrefixError",
|
|
27
29
|
"_is_valid_identifier",
|
|
28
30
|
"_parse_str_or_curie_or_uri_helper",
|
|
31
|
+
"get_converter",
|
|
29
32
|
"get_rules",
|
|
30
33
|
"ground_relation",
|
|
31
34
|
"standardize_ec",
|
|
@@ -12,10 +12,10 @@ from bioregistry import NormalizedNamableReference as Reference
|
|
|
12
12
|
from bioregistry.constants import FailureReturnType
|
|
13
13
|
from curies import ReferenceTuple
|
|
14
14
|
from curies.preprocessing import BlocklistError, PreprocessingConverter
|
|
15
|
+
from curies_processing import get_rules
|
|
15
16
|
from pydantic import ValidationError
|
|
16
17
|
from typing_extensions import Doc
|
|
17
18
|
|
|
18
|
-
from .preprocessing import get_rules
|
|
19
19
|
from .relations import ground_relation
|
|
20
20
|
|
|
21
21
|
__all__ = [
|
|
@@ -135,9 +135,10 @@ def _preclean_uri(s: str) -> str:
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
@lru_cache(1)
|
|
138
|
-
def
|
|
138
|
+
def get_converter() -> PreprocessingConverter:
|
|
139
|
+
"""Get a converter."""
|
|
139
140
|
return PreprocessingConverter(
|
|
140
|
-
|
|
141
|
+
records=bioregistry.manager.converter.records,
|
|
141
142
|
rules=get_rules(),
|
|
142
143
|
preclean=_preclean_uri,
|
|
143
144
|
)
|
|
@@ -27,6 +27,7 @@ from .gtdb import GTDBGetter
|
|
|
27
27
|
from .gwascentral import GWASCentralPhenotypeGetter, GWASCentralStudyGetter
|
|
28
28
|
from .hgnc import HGNCGetter, HGNCGroupGetter
|
|
29
29
|
from .icd import ICD10Getter, ICD11Getter
|
|
30
|
+
from .intact import IntactGetter
|
|
30
31
|
from .interpro import InterProGetter
|
|
31
32
|
from .itis import ITISGetter
|
|
32
33
|
from .kegg import KEGGGeneGetter, KEGGGenomeGetter, KEGGPathwayGetter
|
|
@@ -102,6 +103,7 @@ __all__ = [
|
|
|
102
103
|
"ICD10Getter",
|
|
103
104
|
"ICD11Getter",
|
|
104
105
|
"ITISGetter",
|
|
106
|
+
"IntactGetter",
|
|
105
107
|
"InterProGetter",
|
|
106
108
|
"KEGGGeneGetter",
|
|
107
109
|
"KEGGGenomeGetter",
|
|
@@ -7,7 +7,7 @@ from collections.abc import Iterable
|
|
|
7
7
|
|
|
8
8
|
from more_itertools import chunked
|
|
9
9
|
|
|
10
|
-
from pyobo.struct import Obo, Term
|
|
10
|
+
from pyobo.struct import CHARLIE_TERM, HUMAN_TERM, Obo, Reference, Term, default_reference
|
|
11
11
|
from pyobo.utils.path import ensure_path
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
@@ -16,6 +16,12 @@ __all__ = [
|
|
|
16
16
|
|
|
17
17
|
url = "https://api.github.com/repos/CASRAI-CRedIT/Dictionary/contents/Picklists/Contributor%20Roles"
|
|
18
18
|
PREFIX = "credit"
|
|
19
|
+
ROOT = default_reference(prefix=PREFIX, identifier="contributor-role", name="contributor role")
|
|
20
|
+
ROOT_TERM = (
|
|
21
|
+
Term(reference=ROOT)
|
|
22
|
+
.append_contributor(CHARLIE_TERM)
|
|
23
|
+
.append_xref(Reference(prefix="cro", identifier="0000000"))
|
|
24
|
+
)
|
|
19
25
|
|
|
20
26
|
|
|
21
27
|
class CreditGetter(Obo):
|
|
@@ -23,6 +29,7 @@ class CreditGetter(Obo):
|
|
|
23
29
|
|
|
24
30
|
ontology = PREFIX
|
|
25
31
|
static_version = "2022"
|
|
32
|
+
root_terms = [ROOT]
|
|
26
33
|
|
|
27
34
|
def iter_terms(self, force: bool = False) -> Iterable[Term]:
|
|
28
35
|
"""Iterate over terms in the ontology."""
|
|
@@ -34,14 +41,16 @@ def get_terms(force: bool = False) -> list[Term]:
|
|
|
34
41
|
path = ensure_path(PREFIX, url=url, name="picklist-api.json", force=force)
|
|
35
42
|
with open(path) as f:
|
|
36
43
|
data = json.load(f)
|
|
37
|
-
terms = [
|
|
44
|
+
terms = [
|
|
45
|
+
CHARLIE_TERM,
|
|
46
|
+
HUMAN_TERM,
|
|
47
|
+
ROOT_TERM,
|
|
48
|
+
]
|
|
38
49
|
for x in data:
|
|
39
|
-
name = x["name"].removesuffix(".md").lower()
|
|
40
|
-
|
|
41
50
|
pp = ensure_path(PREFIX, "picklist", url=x["download_url"], backend="requests")
|
|
42
51
|
with open(pp) as f:
|
|
43
52
|
header, *rest = f.read().splitlines()
|
|
44
|
-
name = header
|
|
53
|
+
name = header.removeprefix("# Contributor Roles/")
|
|
45
54
|
dd = {k.removeprefix("## "): v for k, v in chunked(rest, 2)}
|
|
46
55
|
identifier = (
|
|
47
56
|
dd["Canonical URL"]
|
|
@@ -50,7 +59,9 @@ def get_terms(force: bool = False) -> list[Term]:
|
|
|
50
59
|
)
|
|
51
60
|
desc = dd["Short definition"]
|
|
52
61
|
terms.append(
|
|
53
|
-
Term.from_triple(
|
|
62
|
+
Term.from_triple(
|
|
63
|
+
prefix=PREFIX, identifier=identifier, name=name, definition=desc
|
|
64
|
+
).append_parent(ROOT)
|
|
54
65
|
)
|
|
55
66
|
|
|
56
67
|
return terms
|
|
@@ -149,7 +149,7 @@ def get_xml_root(version: str | None = None) -> ElementTree.Element:
|
|
|
149
149
|
raise NoBuildError from e
|
|
150
150
|
|
|
151
151
|
element = parse_drugbank(version=version, username=username, password=password)
|
|
152
|
-
return element.getroot()
|
|
152
|
+
return element.getroot() # type:ignore
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
ns = "{http://www.drugbank.ca}"
|
|
@@ -79,7 +79,7 @@ def iterate_terms(version: str, force: bool = False) -> Iterable[Term]:
|
|
|
79
79
|
except ElementTree.ParseError:
|
|
80
80
|
logger.warning("malformed XML in %s", tar_info.path)
|
|
81
81
|
continue
|
|
82
|
-
yield _get_term_from_tree(tree)
|
|
82
|
+
yield _get_term_from_tree(tree) # type:ignore
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
if __name__ == "__main__":
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""Converter for IntAct complexes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from collections import defaultdict
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
|
|
8
|
+
import pandas as pd
|
|
9
|
+
from pydantic import ValidationError
|
|
10
|
+
from tqdm import tqdm
|
|
11
|
+
|
|
12
|
+
from pyobo.struct import Obo, Reference, Term
|
|
13
|
+
from pyobo.utils.path import ensure_path
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"IntactGetter",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
PREFIX = "intact"
|
|
20
|
+
COMPLEXPORTAL_MAPPINGS_UNVERSIONED = (
|
|
21
|
+
"https://ftp.ebi.ac.uk/pub/databases/intact/complex/current/various/cpx_ebi_ac_translation.txt"
|
|
22
|
+
)
|
|
23
|
+
REACTOME_MAPPINGS_UNVERSIONED = (
|
|
24
|
+
"https://ftp.ebi.ac.uk/pub/databases/intact/current/various/reactome.dat"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# TODO it looks like it's probably also the case that
|
|
29
|
+
# this semantic space contains IDs for proteins/
|
|
30
|
+
# interactors. These need to be added too
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class IntactGetter(Obo):
|
|
34
|
+
"""An ontology representation of Intact."""
|
|
35
|
+
|
|
36
|
+
bioversions_key = ontology = PREFIX
|
|
37
|
+
|
|
38
|
+
def iter_terms(self, force: bool = False) -> Iterable[Term]:
|
|
39
|
+
"""Iterate over terms in the ontology."""
|
|
40
|
+
return get_terms(force=force, version=self._version_or_raise)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def get_terms(version: str, force: bool = False) -> Iterable[Term]:
|
|
44
|
+
"""Get terms from the Contributor Roles Taxonomy via GitHub."""
|
|
45
|
+
cplx = _get_mappings(
|
|
46
|
+
COMPLEXPORTAL_MAPPINGS_UNVERSIONED, "complexportal", version=version, force=force
|
|
47
|
+
)
|
|
48
|
+
reactome = _get_mappings(
|
|
49
|
+
REACTOME_MAPPINGS_UNVERSIONED, "reactome", version=version, force=force
|
|
50
|
+
)
|
|
51
|
+
for intact_id in sorted(set(cplx).union(reactome)):
|
|
52
|
+
term = Term.from_triple(PREFIX, intact_id)
|
|
53
|
+
for complexportal_xref in sorted(cplx.get(intact_id, [])):
|
|
54
|
+
term.append_exact_match(complexportal_xref)
|
|
55
|
+
for reactome_xref in sorted(reactome.get(intact_id, [])):
|
|
56
|
+
term.append_xref(reactome_xref)
|
|
57
|
+
yield term
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _get_mappings(
|
|
61
|
+
url: str, target_prefix: str, version: str, *, force: bool = False
|
|
62
|
+
) -> dict[str, set[Reference]]:
|
|
63
|
+
path = ensure_path(PREFIX, url=url, version=version, force=force)
|
|
64
|
+
df = pd.read_csv(path, sep="\t", header=None, usecols=[0, 1])
|
|
65
|
+
|
|
66
|
+
dd = defaultdict(set)
|
|
67
|
+
for intact_id, target_identifier in df.values:
|
|
68
|
+
try:
|
|
69
|
+
obj = Reference(prefix=target_prefix, identifier=target_identifier)
|
|
70
|
+
except ValidationError:
|
|
71
|
+
tqdm.write(f"[intact:{intact_id}] invalid xref: {target_prefix}:{target_identifier}")
|
|
72
|
+
continue
|
|
73
|
+
dd[intact_id].add(obj)
|
|
74
|
+
|
|
75
|
+
return dict(dd)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
if __name__ == "__main__":
|
|
79
|
+
IntactGetter.cli()
|
|
@@ -18,7 +18,7 @@ from .struct import (
|
|
|
18
18
|
TypeDef,
|
|
19
19
|
make_ad_hoc_ontology,
|
|
20
20
|
)
|
|
21
|
-
from .struct_utils import Annotation, Stanza
|
|
21
|
+
from .struct_utils import Annotation, Stanza, StanzaType
|
|
22
22
|
from .typedef import (
|
|
23
23
|
derives_from,
|
|
24
24
|
enables,
|
|
@@ -51,6 +51,7 @@ __all__ = [
|
|
|
51
51
|
"Reference",
|
|
52
52
|
"Referenced",
|
|
53
53
|
"Stanza",
|
|
54
|
+
"StanzaType",
|
|
54
55
|
"Synonym",
|
|
55
56
|
"SynonymTypeDef",
|
|
56
57
|
"Term",
|
|
@@ -250,7 +250,7 @@ class Import(Box):
|
|
|
250
250
|
|
|
251
251
|
def get_rdf_graph_oracle(boxes: list[Box], *, prefix_map: dict[str, str]) -> Graph:
|
|
252
252
|
"""Serialize to turtle via OFN and conversion with ROBOT."""
|
|
253
|
-
|
|
253
|
+
import bioontologies.robot
|
|
254
254
|
|
|
255
255
|
ontology = Ontology(
|
|
256
256
|
iri=EXAMPLE_ONTOLOGY_IRI,
|
|
@@ -265,7 +265,7 @@ def get_rdf_graph_oracle(boxes: list[Box], *, prefix_map: dict[str, str]) -> Gra
|
|
|
265
265
|
ofn_path.write_text(text)
|
|
266
266
|
ttl_path = stub.with_suffix(".ttl")
|
|
267
267
|
try:
|
|
268
|
-
convert(ofn_path, ttl_path)
|
|
268
|
+
bioontologies.robot.convert(ofn_path, ttl_path)
|
|
269
269
|
except subprocess.CalledProcessError:
|
|
270
270
|
raise RuntimeError(f"failed to convert axioms from:\n\n{text}") from None
|
|
271
271
|
graph.parse(ttl_path)
|
|
@@ -20,15 +20,6 @@ from curies.vocabulary import SynonymScope
|
|
|
20
20
|
from more_itertools import pairwise
|
|
21
21
|
from tqdm.auto import tqdm
|
|
22
22
|
|
|
23
|
-
from .constants import DATE_FORMAT, PROVENANCE_PREFIXES
|
|
24
|
-
from .identifier_utils import (
|
|
25
|
-
NotCURIEError,
|
|
26
|
-
ParseError,
|
|
27
|
-
UnparsableIRIError,
|
|
28
|
-
_is_valid_identifier,
|
|
29
|
-
_parse_str_or_curie_or_uri_helper,
|
|
30
|
-
get_rules,
|
|
31
|
-
)
|
|
32
23
|
from .reader_utils import (
|
|
33
24
|
_chomp_axioms,
|
|
34
25
|
_chomp_references,
|
|
@@ -36,7 +27,9 @@ from .reader_utils import (
|
|
|
36
27
|
_chomp_typedef,
|
|
37
28
|
_parse_provenance_list,
|
|
38
29
|
)
|
|
39
|
-
from
|
|
30
|
+
from .. import vocabulary as v
|
|
31
|
+
from ..reference import OBOLiteral, _obo_parse_identifier
|
|
32
|
+
from ..struct import (
|
|
40
33
|
Obo,
|
|
41
34
|
Reference,
|
|
42
35
|
Synonym,
|
|
@@ -46,18 +39,26 @@ from .struct import (
|
|
|
46
39
|
default_reference,
|
|
47
40
|
make_ad_hoc_ontology,
|
|
48
41
|
)
|
|
49
|
-
from
|
|
50
|
-
from
|
|
51
|
-
from
|
|
52
|
-
from
|
|
53
|
-
from
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
from ..struct_utils import Annotation, Stanza
|
|
43
|
+
from ..typedef import comment as has_comment
|
|
44
|
+
from ..typedef import default_typedefs, has_ontology_root_term
|
|
45
|
+
from ...constants import DATE_FORMAT, PROVENANCE_PREFIXES
|
|
46
|
+
from ...identifier_utils import (
|
|
47
|
+
NotCURIEError,
|
|
48
|
+
ParseError,
|
|
49
|
+
UnparsableIRIError,
|
|
50
|
+
_is_valid_identifier,
|
|
51
|
+
_parse_str_or_curie_or_uri_helper,
|
|
52
|
+
get_rules,
|
|
53
|
+
)
|
|
54
|
+
from ...utils.cache import write_gzipped_graph
|
|
55
|
+
from ...utils.io import safe_open
|
|
56
|
+
from ...utils.misc import STATIC_VERSION_REWRITES, cleanup_version
|
|
57
57
|
|
|
58
58
|
__all__ = [
|
|
59
59
|
"from_obo_path",
|
|
60
60
|
"from_obonet",
|
|
61
|
+
"from_str",
|
|
61
62
|
]
|
|
62
63
|
|
|
63
64
|
logger = logging.getLogger(__name__)
|
|
@@ -1353,6 +1354,8 @@ def _handle_prop(
|
|
|
1353
1354
|
case None:
|
|
1354
1355
|
return None
|
|
1355
1356
|
|
|
1357
|
+
return None
|
|
1358
|
+
|
|
1356
1359
|
|
|
1357
1360
|
def _get_prop(
|
|
1358
1361
|
property_id: str,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""I/O for OBO Graph JSON."""
|
|
2
|
+
|
|
3
|
+
from .export import to_obograph, to_parsed_obograph, to_parsed_obograph_oracle, write_obograph
|
|
4
|
+
from .reader import from_obograph, from_standardized_graph, read_obograph
|
|
5
|
+
from .utils import assert_graph_equal
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"assert_graph_equal",
|
|
9
|
+
"from_obograph",
|
|
10
|
+
"from_standardized_graph",
|
|
11
|
+
"read_obograph",
|
|
12
|
+
"to_obograph",
|
|
13
|
+
"to_parsed_obograph",
|
|
14
|
+
"to_parsed_obograph_oracle",
|
|
15
|
+
"write_obograph",
|
|
16
|
+
]
|