pyobo 0.10.10__tar.gz → 0.10.11__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.10.10/src/pyobo.egg-info → pyobo-0.10.11}/PKG-INFO +1 -1
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/conf.py +1 -1
- {pyobo-0.10.10 → pyobo-0.10.11}/setup.cfg +1 -1
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/alts.py +13 -8
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/hierarchy.py +9 -5
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/metadata.py +6 -3
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/names.py +8 -6
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/relations.py +11 -3
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/species.py +3 -3
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/typedefs.py +6 -2
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/xrefs.py +10 -3
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/aws.py +12 -7
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/lookup.py +3 -2
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/constants.py +0 -9
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/antibodyregistry.py +6 -5
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/biogrid.py +6 -2
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/ccle.py +5 -5
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mesh.py +8 -6
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/version.py +1 -1
- {pyobo-0.10.10 → pyobo-0.10.11/src/pyobo.egg-info}/PKG-INFO +1 -1
- {pyobo-0.10.10 → pyobo-0.10.11}/.readthedocs.yml +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/LICENSE +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/MANIFEST.in +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/README.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.Canonicalizer.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.Obo.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.OboNormalizer.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.Reference.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.Synonym.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.SynonymTypeDef.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.Term.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.TypeDef.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.ensure_path.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.from_obo_path.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.from_obonet.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_alts_to_id.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_ancestors.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_children.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_definition.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_descendants.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_equivalent.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_multimapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_relations_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_xrefs.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_graph.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_hierarchy.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_definition_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_multirelations_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_name_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_species_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_synonyms_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_to_alts.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_ids.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_name.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_name_by_curie.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_name_id_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_ontology.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_primary_curie.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_primary_identifier.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_priority_curie.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_properties.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_properties_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_property.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_relation.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_relation_mapping.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_relations_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_species.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_sssom_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_subhierarchy.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_synonyms.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_typedef_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_version.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_xref.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_xrefs.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.get_xrefs_df.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.ground.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.has_ancestor.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.has_nomenclature_plugin.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.has_xref_plugin.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.is_descendent.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.iter_nomenclature_plugins.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.iter_xref_plugins.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.normalize_curie.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.parse_results_from_obo.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.run_nomenclature_plugin.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/api/pyobo.run_xref_plugin.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/index.rst +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/docs/source/logo.png +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/pyproject.toml +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/__main__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/properties.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/api/utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/cli.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/__main__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/app.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/cli.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/base.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/home.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/matches.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/__main__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/cli.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/mapper.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/templates/base.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/apps/mapper/templates/mapper_home.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/aws.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/cli.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/database.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/cli/utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/getters.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/gilda_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/identifier_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/mocks.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/normalizer.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/obographs.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/plugins.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/reader.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/registries/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/registries/metaregistry.json +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/registries/metaregistry.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resource_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resources/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resources/ncbitaxon.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resources/ro.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/resources/ro.tsv +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/agrovoc.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/cgnc.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/chebi.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/chembl.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/civic_gene.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/complexportal.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/conso.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/cpt.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/cvx.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/depmap.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/dictybase_gene.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/drugbank.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/drugbank_salt.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/drugcentral.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/expasy.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/famplex.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/flybase.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/geonames.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/gmt_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/go.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/gwascentral_phenotype.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/gwascentral_study.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/hgnc.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/hgncgenefamily.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/icd10.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/icd11.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/icd_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/interpro.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/itis.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/kegg/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/kegg/api.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/kegg/genes.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/kegg/genome.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/kegg/pathway.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mgi.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mirbase.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mirbase_constants.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mirbase_family.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/mirbase_mature.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/msigdb.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/ncbigene.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/npass.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/omim_ps.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pathbank.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pfam.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pfam_clan.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pid.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pombase.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/pubchem.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/reactome.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/rgd.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/rhea.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/ror.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/selventa/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/selventa/schem.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/selventa/scomp.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/selventa/sdis.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/selventa/sfam.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/sgd.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/slm.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/umls/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/umls/__main__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/umls/umls.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/uniprot/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/uniprot/uniprot.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/wikipathways.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/sources/zfin.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/ssg/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/ssg/base.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/ssg/index.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/ssg/term.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/ssg/typedef.html +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/struct/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/struct/reference.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/struct/struct.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/struct/typedef.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/struct/utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/cache.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/io.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/iter.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/misc.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/ndex_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/utils/path.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/canonicalizer.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/priority.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/biomappings.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/cbms2019.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/chembl.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/compath.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/famplex.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/gilda.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/intact.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/ncit.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/pubchem.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/wikidata.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo/xrefdb/xrefs_pipeline.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/SOURCES.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/dependency_links.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/entry_points.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/not-zip-safe +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/requires.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/src/pyobo.egg-info/top_level.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/constants.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/resources/citations.txt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/resources/test_chebi.obo +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/resources/test_msigdb.gmt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/resources/test_wikipathways.gmt +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_alt_ids.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_caches.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_extract.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_get.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_get_miriam_url.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_gmt.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_ground.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_mapper.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_sources/__init__.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_sources/test_famplex.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_struct.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tests/test_utils.py +0 -0
- {pyobo-0.10.10 → pyobo-0.10.11}/tox.ini +0 -0
|
@@ -28,12 +28,15 @@ NO_ALTS = {
|
|
|
28
28
|
|
|
29
29
|
@lru_cache()
|
|
30
30
|
@wrap_norm_prefix
|
|
31
|
-
def get_id_to_alts(
|
|
31
|
+
def get_id_to_alts(
|
|
32
|
+
prefix: str, *, force: bool = False, version: Optional[str] = None
|
|
33
|
+
) -> Mapping[str, List[str]]:
|
|
32
34
|
"""Get alternate identifiers."""
|
|
33
35
|
if prefix in NO_ALTS:
|
|
34
36
|
return {}
|
|
35
37
|
|
|
36
|
-
version
|
|
38
|
+
if version is None:
|
|
39
|
+
version = get_version(prefix)
|
|
37
40
|
path = prefix_cache_join(prefix, name="alt_ids.tsv", version=version)
|
|
38
41
|
header = [f"{prefix}_id", "alt_id"]
|
|
39
42
|
|
|
@@ -51,26 +54,28 @@ def get_id_to_alts(prefix: str, force: bool = False) -> Mapping[str, List[str]]:
|
|
|
51
54
|
|
|
52
55
|
@lru_cache()
|
|
53
56
|
@wrap_norm_prefix
|
|
54
|
-
def get_alts_to_id(
|
|
57
|
+
def get_alts_to_id(
|
|
58
|
+
prefix: str, *, force: bool = False, version: Optional[str] = None
|
|
59
|
+
) -> Mapping[str, str]:
|
|
55
60
|
"""Get alternative id to primary id mapping."""
|
|
56
61
|
return {
|
|
57
62
|
alt: primary
|
|
58
|
-
for primary, alts in get_id_to_alts(prefix, force=force).items()
|
|
63
|
+
for primary, alts in get_id_to_alts(prefix, force=force, version=version).items()
|
|
59
64
|
for alt in alts
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
|
|
63
|
-
def get_primary_curie(curie: str) -> Optional[str]:
|
|
68
|
+
def get_primary_curie(curie: str, *, version: Optional[str] = None) -> Optional[str]:
|
|
64
69
|
"""Get the primary curie for an entity."""
|
|
65
70
|
prefix, identifier = normalize_curie(curie)
|
|
66
|
-
primary_identifier = get_primary_identifier(prefix, identifier)
|
|
71
|
+
primary_identifier = get_primary_identifier(prefix, identifier, version=version)
|
|
67
72
|
if primary_identifier is not None:
|
|
68
73
|
return f"{prefix}:{primary_identifier}"
|
|
69
74
|
return None
|
|
70
75
|
|
|
71
76
|
|
|
72
77
|
@wrap_norm_prefix
|
|
73
|
-
def get_primary_identifier(prefix: str, identifier: str) -> str:
|
|
78
|
+
def get_primary_identifier(prefix: str, identifier: str, *, version: Optional[str] = None) -> str:
|
|
74
79
|
"""Get the primary identifier for an entity.
|
|
75
80
|
|
|
76
81
|
:param prefix: The name of the resource
|
|
@@ -82,7 +87,7 @@ def get_primary_identifier(prefix: str, identifier: str) -> str:
|
|
|
82
87
|
if prefix in NO_ALTS: # TODO later expand list to other namespaces with no alts
|
|
83
88
|
return identifier
|
|
84
89
|
|
|
85
|
-
alts_to_id = get_alts_to_id(prefix)
|
|
90
|
+
alts_to_id = get_alts_to_id(prefix, version=version)
|
|
86
91
|
if alts_to_id and identifier in alts_to_id:
|
|
87
92
|
return alts_to_id[identifier]
|
|
88
93
|
return identifier
|
|
@@ -13,6 +13,7 @@ from .properties import get_filtered_properties_mapping
|
|
|
13
13
|
from .relations import get_filtered_relations_df
|
|
14
14
|
from ..identifier_utils import wrap_norm_prefix
|
|
15
15
|
from ..struct import TypeDef, has_member, is_a, part_of
|
|
16
|
+
from ..struct.reference import Reference
|
|
16
17
|
|
|
17
18
|
__all__ = [
|
|
18
19
|
"get_hierarchy",
|
|
@@ -24,7 +25,6 @@ __all__ = [
|
|
|
24
25
|
"get_children",
|
|
25
26
|
]
|
|
26
27
|
|
|
27
|
-
from ..struct.reference import Reference
|
|
28
28
|
|
|
29
29
|
logger = logging.getLogger(__name__)
|
|
30
30
|
|
|
@@ -154,14 +154,16 @@ def _get_hierarchy_helper(
|
|
|
154
154
|
return rv
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
def is_descendent(
|
|
157
|
+
def is_descendent(
|
|
158
|
+
prefix, identifier, ancestor_prefix, ancestor_identifier, *, version: Optional[str] = None
|
|
159
|
+
) -> bool:
|
|
158
160
|
"""Check that the first identifier has the second as a descendent.
|
|
159
161
|
|
|
160
162
|
Check that go:0070246 ! natural killer cell apoptotic process is a
|
|
161
163
|
descendant of go:0006915 ! apoptotic process::
|
|
162
164
|
>>> assert is_descendent('go', '0070246', 'go', '0006915')
|
|
163
165
|
"""
|
|
164
|
-
descendants = get_descendants(ancestor_prefix, ancestor_identifier)
|
|
166
|
+
descendants = get_descendants(ancestor_prefix, ancestor_identifier, version=version)
|
|
165
167
|
return descendants is not None and f"{prefix}:{identifier}" in descendants
|
|
166
168
|
|
|
167
169
|
|
|
@@ -224,13 +226,15 @@ def get_children(
|
|
|
224
226
|
return set(hierarchy.predecessors(curie))
|
|
225
227
|
|
|
226
228
|
|
|
227
|
-
def has_ancestor(
|
|
229
|
+
def has_ancestor(
|
|
230
|
+
prefix, identifier, ancestor_prefix, ancestor_identifier, *, version: Optional[str] = None
|
|
231
|
+
) -> bool:
|
|
228
232
|
"""Check that the first identifier has the second as an ancestor.
|
|
229
233
|
|
|
230
234
|
Check that go:0008219 ! cell death is an ancestor of go:0006915 ! apoptotic process::
|
|
231
235
|
>>> assert has_ancestor('go', '0006915', 'go', '0008219')
|
|
232
236
|
"""
|
|
233
|
-
ancestors = get_ancestors(prefix, identifier)
|
|
237
|
+
ancestors = get_ancestors(prefix, identifier, version=version)
|
|
234
238
|
return ancestors is not None and f"{ancestor_prefix}:{ancestor_identifier}" in ancestors
|
|
235
239
|
|
|
236
240
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
from functools import lru_cache
|
|
7
|
-
from typing import Mapping
|
|
7
|
+
from typing import Mapping, Optional
|
|
8
8
|
|
|
9
9
|
from .utils import get_version
|
|
10
10
|
from ..getters import get_ontology
|
|
@@ -21,9 +21,12 @@ logger = logging.getLogger(__name__)
|
|
|
21
21
|
|
|
22
22
|
@lru_cache()
|
|
23
23
|
@wrap_norm_prefix
|
|
24
|
-
def get_metadata(
|
|
24
|
+
def get_metadata(
|
|
25
|
+
prefix: str, *, force: bool = False, version: Optional[str] = None
|
|
26
|
+
) -> Mapping[str, str]:
|
|
25
27
|
"""Get metadata for the ontology."""
|
|
26
|
-
version
|
|
28
|
+
if version is None:
|
|
29
|
+
version = get_version(prefix)
|
|
27
30
|
path = prefix_cache_join(prefix, name="metadata.json", version=version)
|
|
28
31
|
|
|
29
32
|
@cached_json(path=path, force=force)
|
|
@@ -69,7 +69,7 @@ def _help_get(
|
|
|
69
69
|
NO_BUILD_PREFIXES.add(prefix)
|
|
70
70
|
return None
|
|
71
71
|
|
|
72
|
-
primary_id = get_primary_identifier(prefix, identifier)
|
|
72
|
+
primary_id = get_primary_identifier(prefix, identifier, version=version)
|
|
73
73
|
return mapping.get(primary_id)
|
|
74
74
|
|
|
75
75
|
|
|
@@ -82,7 +82,7 @@ def get_name(prefix: str, identifier: str, *, version: Optional[str] = None) ->
|
|
|
82
82
|
@lru_cache()
|
|
83
83
|
@wrap_norm_prefix
|
|
84
84
|
def get_ids(
|
|
85
|
-
prefix: str, force: bool = False, strict: bool = False, version: Optional[str] = None
|
|
85
|
+
prefix: str, *, force: bool = False, strict: bool = False, version: Optional[str] = None
|
|
86
86
|
) -> Set[str]:
|
|
87
87
|
"""Get the set of identifiers for this prefix."""
|
|
88
88
|
if prefix == "ncbigene":
|
|
@@ -150,16 +150,18 @@ def get_id_name_mapping(
|
|
|
150
150
|
|
|
151
151
|
@lru_cache()
|
|
152
152
|
@wrap_norm_prefix
|
|
153
|
-
def get_name_id_mapping(
|
|
153
|
+
def get_name_id_mapping(
|
|
154
|
+
prefix: str, *, force: bool = False, version: Optional[str] = None
|
|
155
|
+
) -> Mapping[str, str]:
|
|
154
156
|
"""Get a name to identifier mapping for the OBO file."""
|
|
155
|
-
id_name = get_id_name_mapping(prefix=prefix, force=force)
|
|
157
|
+
id_name = get_id_name_mapping(prefix=prefix, force=force, version=version)
|
|
156
158
|
return {v: k for k, v in id_name.items()}
|
|
157
159
|
|
|
158
160
|
|
|
159
161
|
@wrap_norm_prefix
|
|
160
|
-
def get_definition(prefix: str, identifier: str) -> Optional[str]:
|
|
162
|
+
def get_definition(prefix: str, identifier: str, *, version: Optional[str] = None) -> Optional[str]:
|
|
161
163
|
"""Get the definition for an entity."""
|
|
162
|
-
return _help_get(get_id_definition_mapping, prefix, identifier)
|
|
164
|
+
return _help_get(get_id_definition_mapping, prefix, identifier, version=version)
|
|
163
165
|
|
|
164
166
|
|
|
165
167
|
def get_id_definition_mapping(
|
|
@@ -48,9 +48,11 @@ def get_relations_df(
|
|
|
48
48
|
force: bool = False,
|
|
49
49
|
wide: bool = False,
|
|
50
50
|
strict: bool = True,
|
|
51
|
+
version: Optional[str] = None,
|
|
51
52
|
) -> pd.DataFrame:
|
|
52
53
|
"""Get all relations from the OBO."""
|
|
53
|
-
version
|
|
54
|
+
if version is None:
|
|
55
|
+
version = get_version(prefix)
|
|
54
56
|
path = prefix_cache_join(prefix, name="relations.tsv", version=version)
|
|
55
57
|
|
|
56
58
|
@cached_df(path=path, dtype=str, force=force)
|
|
@@ -118,9 +120,11 @@ def get_id_multirelations_mapping(
|
|
|
118
120
|
*,
|
|
119
121
|
use_tqdm: bool = False,
|
|
120
122
|
force: bool = False,
|
|
123
|
+
version: Optional[str] = None,
|
|
121
124
|
) -> Mapping[str, List[Reference]]:
|
|
122
125
|
"""Get the OBO file and output a synonym dictionary."""
|
|
123
|
-
version
|
|
126
|
+
if version is None:
|
|
127
|
+
version = get_version(prefix)
|
|
124
128
|
ontology = get_ontology(prefix, force=force, version=version)
|
|
125
129
|
return ontology.get_id_multirelations_mapping(typedef=typedef, use_tqdm=use_tqdm)
|
|
126
130
|
|
|
@@ -134,6 +138,7 @@ def get_relation_mapping(
|
|
|
134
138
|
*,
|
|
135
139
|
use_tqdm: bool = False,
|
|
136
140
|
force: bool = False,
|
|
141
|
+
version: Optional[str] = None,
|
|
137
142
|
) -> Mapping[str, str]:
|
|
138
143
|
"""Get relations from identifiers in the source prefix to target prefix with the given relation.
|
|
139
144
|
|
|
@@ -147,7 +152,8 @@ def get_relation_mapping(
|
|
|
147
152
|
>>> hgnc_mgi_orthology_mapping = pyobo.get_relation_mapping('hgnc', 'ro:HOM0000017', 'mgi')
|
|
148
153
|
>>> assert mouse_mapt_mgi_id == hgnc_mgi_orthology_mapping[human_mapt_hgnc_id]
|
|
149
154
|
"""
|
|
150
|
-
version
|
|
155
|
+
if version is None:
|
|
156
|
+
version = get_version(prefix)
|
|
151
157
|
ontology = get_ontology(prefix, force=force, version=version)
|
|
152
158
|
return ontology.get_relation_mapping(
|
|
153
159
|
relation=relation, target_prefix=target_prefix, use_tqdm=use_tqdm
|
|
@@ -163,6 +169,7 @@ def get_relation(
|
|
|
163
169
|
*,
|
|
164
170
|
use_tqdm: bool = False,
|
|
165
171
|
force: bool = False,
|
|
172
|
+
**kwargs,
|
|
166
173
|
) -> Optional[str]:
|
|
167
174
|
"""Get the target identifier corresponding to the given relationship from the source prefix/identifier pair.
|
|
168
175
|
|
|
@@ -181,6 +188,7 @@ def get_relation(
|
|
|
181
188
|
target_prefix=target_prefix,
|
|
182
189
|
use_tqdm=use_tqdm,
|
|
183
190
|
force=force,
|
|
191
|
+
**kwargs,
|
|
184
192
|
)
|
|
185
193
|
return relation_mapping.get(source_identifier)
|
|
186
194
|
|
|
@@ -22,13 +22,13 @@ logger = logging.getLogger(__name__)
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
@wrap_norm_prefix
|
|
25
|
-
def get_species(prefix: str, identifier: str) -> Optional[str]:
|
|
25
|
+
def get_species(prefix: str, identifier: str, *, version: Optional[str] = None) -> Optional[str]:
|
|
26
26
|
"""Get the species."""
|
|
27
27
|
if prefix == "uniprot":
|
|
28
28
|
raise NotImplementedError
|
|
29
29
|
|
|
30
30
|
try:
|
|
31
|
-
id_species = get_id_species_mapping(prefix)
|
|
31
|
+
id_species = get_id_species_mapping(prefix, version=version)
|
|
32
32
|
except NoBuild:
|
|
33
33
|
logger.warning("unable to look up species for prefix %s", prefix)
|
|
34
34
|
return None
|
|
@@ -37,7 +37,7 @@ def get_species(prefix: str, identifier: str) -> Optional[str]:
|
|
|
37
37
|
logger.warning("no results produced for prefix %s", prefix)
|
|
38
38
|
return None
|
|
39
39
|
|
|
40
|
-
primary_id = get_primary_identifier(prefix, identifier)
|
|
40
|
+
primary_id = get_primary_identifier(prefix, identifier, version=version)
|
|
41
41
|
return id_species.get(primary_id)
|
|
42
42
|
|
|
43
43
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
from functools import lru_cache
|
|
7
|
+
from typing import Optional
|
|
7
8
|
|
|
8
9
|
import pandas as pd
|
|
9
10
|
|
|
@@ -22,9 +23,12 @@ logger = logging.getLogger(__name__)
|
|
|
22
23
|
|
|
23
24
|
@lru_cache()
|
|
24
25
|
@wrap_norm_prefix
|
|
25
|
-
def get_typedef_df(
|
|
26
|
+
def get_typedef_df(
|
|
27
|
+
prefix: str, *, force: bool = False, version: Optional[str] = None
|
|
28
|
+
) -> pd.DataFrame:
|
|
26
29
|
"""Get an identifier to name mapping for the typedefs in an OBO file."""
|
|
27
|
-
version
|
|
30
|
+
if version is None:
|
|
31
|
+
version = get_version(prefix)
|
|
28
32
|
path = prefix_cache_join(prefix, name="typedefs.tsv", version=version)
|
|
29
33
|
|
|
30
34
|
@cached_df(path=path, dtype=str, force=force)
|
|
@@ -30,9 +30,16 @@ logger = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@wrap_norm_prefix
|
|
33
|
-
def get_xref(
|
|
33
|
+
def get_xref(
|
|
34
|
+
prefix: str,
|
|
35
|
+
identifier: str,
|
|
36
|
+
new_prefix: str,
|
|
37
|
+
*,
|
|
38
|
+
flip: bool = False,
|
|
39
|
+
version: Optional[str] = None,
|
|
40
|
+
) -> Optional[str]:
|
|
34
41
|
"""Get the xref with the new prefix if a direct path exists."""
|
|
35
|
-
filtered_xrefs = get_filtered_xrefs(prefix, new_prefix, flip=flip)
|
|
42
|
+
filtered_xrefs = get_filtered_xrefs(prefix, new_prefix, flip=flip, version=version)
|
|
36
43
|
return filtered_xrefs.get(identifier)
|
|
37
44
|
|
|
38
45
|
|
|
@@ -41,8 +48,8 @@ def get_xref(prefix: str, identifier: str, new_prefix: str, flip: bool = False)
|
|
|
41
48
|
def get_filtered_xrefs(
|
|
42
49
|
prefix: str,
|
|
43
50
|
xref_prefix: str,
|
|
44
|
-
flip: bool = False,
|
|
45
51
|
*,
|
|
52
|
+
flip: bool = False,
|
|
46
53
|
use_tqdm: bool = False,
|
|
47
54
|
force: bool = False,
|
|
48
55
|
strict: bool = False,
|
|
@@ -77,14 +77,19 @@ def upload_artifacts(
|
|
|
77
77
|
upload_artifacts_for_prefix(prefix=prefix, bucket=bucket, s3_client=s3_client)
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
def upload_artifacts_for_prefix(
|
|
80
|
+
def upload_artifacts_for_prefix(
|
|
81
|
+
*, prefix: str, bucket: str, s3_client=None, version: Optional[str] = None
|
|
82
|
+
):
|
|
81
83
|
"""Upload compiled parts for the given prefix to AWS."""
|
|
82
84
|
if s3_client is None:
|
|
83
85
|
s3_client = boto3.client("s3")
|
|
84
86
|
|
|
87
|
+
if version is None:
|
|
88
|
+
version = get_version(prefix)
|
|
89
|
+
|
|
85
90
|
logger.info("[%s] getting id->name mapping", prefix)
|
|
86
91
|
get_id_name_mapping(prefix)
|
|
87
|
-
id_name_path = prefix_cache_join(prefix, name="names.tsv", version=
|
|
92
|
+
id_name_path = prefix_cache_join(prefix, name="names.tsv", version=version)
|
|
88
93
|
if not id_name_path.exists():
|
|
89
94
|
raise FileNotFoundError
|
|
90
95
|
id_name_key = os.path.join(prefix, "cache", "names.tsv")
|
|
@@ -93,7 +98,7 @@ def upload_artifacts_for_prefix(*, prefix: str, bucket: str, s3_client=None):
|
|
|
93
98
|
|
|
94
99
|
logger.info("[%s] getting id->synonyms mapping", prefix)
|
|
95
100
|
get_id_synonyms_mapping(prefix)
|
|
96
|
-
id_synonyms_path = prefix_cache_join(prefix, name="synonyms.tsv", version=
|
|
101
|
+
id_synonyms_path = prefix_cache_join(prefix, name="synonyms.tsv", version=version)
|
|
97
102
|
if not id_synonyms_path.exists():
|
|
98
103
|
raise FileNotFoundError
|
|
99
104
|
id_synonyms_key = os.path.join(prefix, "cache", "synonyms.tsv")
|
|
@@ -102,7 +107,7 @@ def upload_artifacts_for_prefix(*, prefix: str, bucket: str, s3_client=None):
|
|
|
102
107
|
|
|
103
108
|
logger.info("[%s] getting xrefs", prefix)
|
|
104
109
|
get_xrefs_df(prefix)
|
|
105
|
-
xrefs_path = prefix_cache_join(prefix, name="xrefs.tsv", version=
|
|
110
|
+
xrefs_path = prefix_cache_join(prefix, name="xrefs.tsv", version=version)
|
|
106
111
|
if not xrefs_path.exists():
|
|
107
112
|
raise FileNotFoundError
|
|
108
113
|
xrefs_key = os.path.join(prefix, "cache", "xrefs.tsv")
|
|
@@ -111,7 +116,7 @@ def upload_artifacts_for_prefix(*, prefix: str, bucket: str, s3_client=None):
|
|
|
111
116
|
|
|
112
117
|
logger.info("[%s] getting relations", prefix)
|
|
113
118
|
get_relations_df(prefix)
|
|
114
|
-
relations_path = prefix_cache_join(prefix, name="relations.tsv", version=
|
|
119
|
+
relations_path = prefix_cache_join(prefix, name="relations.tsv", version=version)
|
|
115
120
|
if not relations_path.exists():
|
|
116
121
|
raise FileNotFoundError
|
|
117
122
|
relations_key = os.path.join(prefix, "cache", "relations.tsv")
|
|
@@ -120,7 +125,7 @@ def upload_artifacts_for_prefix(*, prefix: str, bucket: str, s3_client=None):
|
|
|
120
125
|
|
|
121
126
|
logger.info("[%s] getting properties", prefix)
|
|
122
127
|
get_properties_df(prefix)
|
|
123
|
-
properties_path = prefix_cache_join(prefix, name="properties.tsv", version=
|
|
128
|
+
properties_path = prefix_cache_join(prefix, name="properties.tsv", version=version)
|
|
124
129
|
if not properties_path.exists():
|
|
125
130
|
raise FileNotFoundError
|
|
126
131
|
properties_key = os.path.join(prefix, "cache", "properties.tsv")
|
|
@@ -129,7 +134,7 @@ def upload_artifacts_for_prefix(*, prefix: str, bucket: str, s3_client=None):
|
|
|
129
134
|
|
|
130
135
|
logger.info("[%s] getting alternative identifiers", prefix)
|
|
131
136
|
get_id_to_alts(prefix)
|
|
132
|
-
alts_path = prefix_cache_join(prefix, name="alt_ids.tsv", version=
|
|
137
|
+
alts_path = prefix_cache_join(prefix, name="alt_ids.tsv", version=version)
|
|
133
138
|
if not alts_path.exists():
|
|
134
139
|
raise FileNotFoundError
|
|
135
140
|
alts_key = os.path.join(prefix, "cache", "alt_ids.tsv")
|
|
@@ -76,9 +76,10 @@ def xrefs(prefix: str, target: str, force: bool, no_strict: bool, version: Optio
|
|
|
76
76
|
@prefix_argument
|
|
77
77
|
@verbose_option
|
|
78
78
|
@force_option
|
|
79
|
-
|
|
79
|
+
@version_option
|
|
80
|
+
def metadata(prefix: str, force: bool, version: Optional[str]):
|
|
80
81
|
"""Print the metadata for the given namespace."""
|
|
81
|
-
metadata = get_metadata(prefix, force=force)
|
|
82
|
+
metadata = get_metadata(prefix, force=force, version=version)
|
|
82
83
|
click.echo(json.dumps(metadata, indent=2))
|
|
83
84
|
|
|
84
85
|
|
|
@@ -4,17 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
import re
|
|
7
|
-
from functools import partial
|
|
8
|
-
from typing import Callable
|
|
9
7
|
|
|
10
|
-
import bioversions
|
|
11
8
|
import pystow
|
|
12
9
|
|
|
13
10
|
__all__ = [
|
|
14
11
|
"RAW_DIRECTORY",
|
|
15
12
|
"DATABASE_DIRECTORY",
|
|
16
13
|
"SPECIES_REMAPPING",
|
|
17
|
-
"version_getter",
|
|
18
14
|
]
|
|
19
15
|
|
|
20
16
|
logger = logging.getLogger(__name__)
|
|
@@ -85,11 +81,6 @@ SPECIES_RECORD = "5334738"
|
|
|
85
81
|
SPECIES_FILE = "species.tsv.gz"
|
|
86
82
|
|
|
87
83
|
|
|
88
|
-
def version_getter(name: str) -> Callable[[], str]:
|
|
89
|
-
"""Make a function appropriate for getting versions."""
|
|
90
|
-
return partial(bioversions.get_version, name)
|
|
91
|
-
|
|
92
|
-
|
|
93
84
|
NCBITAXON_PREFIX = "NCBITaxon"
|
|
94
85
|
DATE_FORMAT = "%d:%m:%Y %H:%M"
|
|
95
86
|
PROVENANCE_PREFIXES = {
|
|
@@ -24,9 +24,10 @@ URL = "http://antibodyregistry.org/php/fileHandler.php"
|
|
|
24
24
|
CHUNKSIZE = 20_000
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def get_chunks(force: bool = False) -> pd.DataFrame:
|
|
27
|
+
def get_chunks(*, force: bool = False, version: Optional[str] = None) -> pd.DataFrame:
|
|
28
28
|
"""Get the BioGRID identifiers mapping dataframe."""
|
|
29
|
-
version
|
|
29
|
+
if version is None:
|
|
30
|
+
version = bioversions.get_version(PREFIX)
|
|
30
31
|
df = ensure_df(
|
|
31
32
|
PREFIX,
|
|
32
33
|
url=URL,
|
|
@@ -47,7 +48,7 @@ class AntibodyRegistryGetter(Obo):
|
|
|
47
48
|
|
|
48
49
|
def iter_terms(self, force: bool = False) -> Iterable[Term]:
|
|
49
50
|
"""Iterate over terms in the ontology."""
|
|
50
|
-
return iter_terms(force=force)
|
|
51
|
+
return iter_terms(force=force, version=self._version_or_raise)
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
def get_obo(*, force: bool = False) -> Obo:
|
|
@@ -74,9 +75,9 @@ SKIP = {
|
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
|
|
77
|
-
def iter_terms(force: bool = False) -> Iterable[Term]:
|
|
78
|
+
def iter_terms(*, force: bool = False, version: Optional[str] = None) -> Iterable[Term]:
|
|
78
79
|
"""Iterate over antibodies."""
|
|
79
|
-
chunks = get_chunks(force=force)
|
|
80
|
+
chunks = get_chunks(force=force, version=version)
|
|
80
81
|
needs_curating = set()
|
|
81
82
|
# df['vendor'] = df['vendor'].map(bioregistry.normalize_prefix)
|
|
82
83
|
it = tqdm(chunks, desc=f"{PREFIX}, chunkssize={CHUNKSIZE}")
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
"""Extract and convert BioGRID identifiers."""
|
|
4
4
|
|
|
5
|
+
from functools import partial
|
|
5
6
|
from typing import Mapping, Optional
|
|
6
7
|
|
|
7
8
|
import bioversions
|
|
8
9
|
import pandas as pd
|
|
9
10
|
|
|
10
|
-
from pyobo.constants import version_getter
|
|
11
11
|
from pyobo.resources.ncbitaxon import get_ncbitaxon_id
|
|
12
12
|
from pyobo.utils.cache import cached_mapping
|
|
13
13
|
from pyobo.utils.path import ensure_df, prefix_directory_join
|
|
@@ -61,7 +61,11 @@ def get_df() -> pd.DataFrame:
|
|
|
61
61
|
|
|
62
62
|
@cached_mapping(
|
|
63
63
|
path=prefix_directory_join(
|
|
64
|
-
PREFIX,
|
|
64
|
+
PREFIX,
|
|
65
|
+
"cache",
|
|
66
|
+
"xrefs",
|
|
67
|
+
name="ncbigene.tsv",
|
|
68
|
+
version=partial(bioversions.get_version, PREFIX),
|
|
65
69
|
),
|
|
66
70
|
header=["biogrid_id", "ncbigene_id"],
|
|
67
71
|
)
|
|
@@ -50,7 +50,7 @@ def iter_terms(version: Optional[str] = None, force: bool = False) -> Iterable[T
|
|
|
50
50
|
yield term
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
def
|
|
53
|
+
def get_ccle_static_version() -> str:
|
|
54
54
|
"""Get the default version of CCLE's cell lines."""
|
|
55
55
|
return "2019"
|
|
56
56
|
|
|
@@ -58,21 +58,21 @@ def get_version() -> str:
|
|
|
58
58
|
def get_url(version: Optional[str] = None) -> str:
|
|
59
59
|
"""Get the cBioPortal URL for the given version of CCLE's cell lines."""
|
|
60
60
|
if version is None:
|
|
61
|
-
version =
|
|
61
|
+
version = get_ccle_static_version()
|
|
62
62
|
return f"https://cbioportal-datahub.s3.amazonaws.com/ccle_broad_{version}.tar.gz"
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
def get_inner(version: Optional[str] = None) -> str:
|
|
66
66
|
"""Get the inner tarfile path."""
|
|
67
67
|
if version is None:
|
|
68
|
-
version =
|
|
68
|
+
version = get_ccle_static_version()
|
|
69
69
|
return f"ccle_broad_{version}/data_clinical_sample.txt"
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def ensure(version: Optional[str] = None, **kwargs) -> Path:
|
|
73
73
|
"""Ensure the given version is downloaded."""
|
|
74
74
|
if version is None:
|
|
75
|
-
version =
|
|
75
|
+
version = get_ccle_static_version()
|
|
76
76
|
url = get_url(version=version)
|
|
77
77
|
return pystow.ensure("pyobo", "raw", PREFIX, version, url=url, **kwargs)
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ def ensure(version: Optional[str] = None, **kwargs) -> Path:
|
|
|
80
80
|
def ensure_df(version: Optional[str] = None, force: bool = False) -> pd.DataFrame:
|
|
81
81
|
"""Get the CCLE clinical sample dataframe."""
|
|
82
82
|
if version is None:
|
|
83
|
-
version =
|
|
83
|
+
version = get_ccle_static_version()
|
|
84
84
|
path = ensure(version=version, force=force)
|
|
85
85
|
inner_path = get_inner(version=version)
|
|
86
86
|
with tarfile.open(path) as tf:
|
|
@@ -318,21 +318,23 @@ def _get_descriptor_qualifiers(descriptor: Element) -> List[Mapping[str, str]]:
|
|
|
318
318
|
]
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
def get_mesh_category_curies(
|
|
321
|
+
def get_mesh_category_curies(
|
|
322
|
+
letter: str, *, skip: Optional[Collection[str]] = None, version: Optional[str] = None
|
|
323
|
+
) -> List[str]:
|
|
322
324
|
"""Get the MeSH LUIDs for a category, by letter (e.g., "A").
|
|
323
325
|
|
|
324
326
|
:param letter: The MeSH tree, A for anatomy, C for disease, etc.
|
|
325
327
|
:param skip: An optional collection of MeSH tree codes to skip, such as "A03"
|
|
328
|
+
:param version: The MeSH version to use. Defaults to latest
|
|
326
329
|
:returns: A list of MeSH CURIE strings for the top level of each MeSH tree.
|
|
327
330
|
|
|
328
331
|
.. seealso:: https://meshb.nlm.nih.gov/treeView
|
|
329
332
|
"""
|
|
330
|
-
|
|
333
|
+
if version is None:
|
|
334
|
+
import bioversions
|
|
331
335
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
raise ValueError
|
|
335
|
-
tree_to_mesh = get_tree_to_mesh_id(mesh_version)
|
|
336
|
+
version = bioversions.get_version("mesh")
|
|
337
|
+
tree_to_mesh = get_tree_to_mesh_id(version=version)
|
|
336
338
|
rv = []
|
|
337
339
|
for i in range(1, 100):
|
|
338
340
|
key = f"{letter}{i:02}"
|
|
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
|