pyobo 0.10.9__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.
Files changed (262) hide show
  1. {pyobo-0.10.9/src/pyobo.egg-info → pyobo-0.10.11}/PKG-INFO +1 -1
  2. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/conf.py +1 -1
  3. {pyobo-0.10.9 → pyobo-0.10.11}/setup.cfg +1 -1
  4. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/alts.py +13 -8
  5. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/hierarchy.py +9 -5
  6. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/metadata.py +6 -3
  7. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/names.py +12 -10
  8. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/relations.py +11 -3
  9. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/species.py +3 -3
  10. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/typedefs.py +6 -2
  11. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/xrefs.py +10 -3
  12. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/aws.py +12 -7
  13. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/lookup.py +3 -2
  14. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/constants.py +0 -9
  15. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/antibodyregistry.py +6 -5
  16. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/biogrid.py +6 -2
  17. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/ccle.py +5 -5
  18. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/expasy.py +26 -13
  19. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mesh.py +8 -6
  20. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/version.py +1 -1
  21. {pyobo-0.10.9 → pyobo-0.10.11/src/pyobo.egg-info}/PKG-INFO +1 -1
  22. {pyobo-0.10.9 → pyobo-0.10.11}/.readthedocs.yml +0 -0
  23. {pyobo-0.10.9 → pyobo-0.10.11}/LICENSE +0 -0
  24. {pyobo-0.10.9 → pyobo-0.10.11}/MANIFEST.in +0 -0
  25. {pyobo-0.10.9 → pyobo-0.10.11}/README.rst +0 -0
  26. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.Canonicalizer.rst +0 -0
  27. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.Obo.rst +0 -0
  28. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.OboNormalizer.rst +0 -0
  29. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.Reference.rst +0 -0
  30. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.Synonym.rst +0 -0
  31. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.SynonymTypeDef.rst +0 -0
  32. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.Term.rst +0 -0
  33. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.TypeDef.rst +0 -0
  34. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.ensure_path.rst +0 -0
  35. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.from_obo_path.rst +0 -0
  36. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.from_obonet.rst +0 -0
  37. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_alts_to_id.rst +0 -0
  38. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_ancestors.rst +0 -0
  39. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_children.rst +0 -0
  40. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_definition.rst +0 -0
  41. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_descendants.rst +0 -0
  42. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_equivalent.rst +0 -0
  43. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_df.rst +0 -0
  44. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_mapping.rst +0 -0
  45. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_properties_multimapping.rst +0 -0
  46. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_relations_df.rst +0 -0
  47. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_filtered_xrefs.rst +0 -0
  48. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_graph.rst +0 -0
  49. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_hierarchy.rst +0 -0
  50. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_definition_mapping.rst +0 -0
  51. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_multirelations_mapping.rst +0 -0
  52. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_name_mapping.rst +0 -0
  53. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_species_mapping.rst +0 -0
  54. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_synonyms_mapping.rst +0 -0
  55. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_id_to_alts.rst +0 -0
  56. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_ids.rst +0 -0
  57. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_name.rst +0 -0
  58. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_name_by_curie.rst +0 -0
  59. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_name_id_mapping.rst +0 -0
  60. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_ontology.rst +0 -0
  61. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_primary_curie.rst +0 -0
  62. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_primary_identifier.rst +0 -0
  63. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_priority_curie.rst +0 -0
  64. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_properties.rst +0 -0
  65. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_properties_df.rst +0 -0
  66. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_property.rst +0 -0
  67. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_relation.rst +0 -0
  68. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_relation_mapping.rst +0 -0
  69. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_relations_df.rst +0 -0
  70. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_species.rst +0 -0
  71. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_sssom_df.rst +0 -0
  72. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_subhierarchy.rst +0 -0
  73. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_synonyms.rst +0 -0
  74. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_typedef_df.rst +0 -0
  75. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_version.rst +0 -0
  76. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_xref.rst +0 -0
  77. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_xrefs.rst +0 -0
  78. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.get_xrefs_df.rst +0 -0
  79. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.ground.rst +0 -0
  80. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.has_ancestor.rst +0 -0
  81. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.has_nomenclature_plugin.rst +0 -0
  82. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.has_xref_plugin.rst +0 -0
  83. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.is_descendent.rst +0 -0
  84. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.iter_nomenclature_plugins.rst +0 -0
  85. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.iter_xref_plugins.rst +0 -0
  86. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.normalize_curie.rst +0 -0
  87. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.parse_results_from_obo.rst +0 -0
  88. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.run_nomenclature_plugin.rst +0 -0
  89. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/api/pyobo.run_xref_plugin.rst +0 -0
  90. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/index.rst +0 -0
  91. {pyobo-0.10.9 → pyobo-0.10.11}/docs/source/logo.png +0 -0
  92. {pyobo-0.10.9 → pyobo-0.10.11}/pyproject.toml +0 -0
  93. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/__init__.py +0 -0
  94. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/__main__.py +0 -0
  95. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/__init__.py +0 -0
  96. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/properties.py +0 -0
  97. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/api/utils.py +0 -0
  98. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/__init__.py +0 -0
  99. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/cli.py +0 -0
  100. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/__init__.py +0 -0
  101. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/__main__.py +0 -0
  102. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/app.py +0 -0
  103. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/cli.py +0 -0
  104. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/base.html +0 -0
  105. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/home.html +0 -0
  106. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/gilda/templates/matches.html +0 -0
  107. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/__init__.py +0 -0
  108. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/__main__.py +0 -0
  109. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/cli.py +0 -0
  110. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/mapper.py +0 -0
  111. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/templates/base.html +0 -0
  112. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/apps/mapper/templates/mapper_home.html +0 -0
  113. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/__init__.py +0 -0
  114. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/aws.py +0 -0
  115. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/cli.py +0 -0
  116. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/database.py +0 -0
  117. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/cli/utils.py +0 -0
  118. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/getters.py +0 -0
  119. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/gilda_utils.py +0 -0
  120. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/identifier_utils.py +0 -0
  121. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/mocks.py +0 -0
  122. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/normalizer.py +0 -0
  123. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/obographs.py +0 -0
  124. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/plugins.py +0 -0
  125. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/reader.py +0 -0
  126. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/registries/__init__.py +0 -0
  127. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/registries/metaregistry.json +0 -0
  128. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/registries/metaregistry.py +0 -0
  129. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resource_utils.py +0 -0
  130. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resources/__init__.py +0 -0
  131. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resources/ncbitaxon.py +0 -0
  132. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
  133. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resources/ro.py +0 -0
  134. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/resources/ro.tsv +0 -0
  135. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/__init__.py +0 -0
  136. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/agrovoc.py +0 -0
  137. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/cgnc.py +0 -0
  138. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/chebi.py +0 -0
  139. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/chembl.py +0 -0
  140. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/civic_gene.py +0 -0
  141. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/complexportal.py +0 -0
  142. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/conso.py +0 -0
  143. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/cpt.py +0 -0
  144. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/cvx.py +0 -0
  145. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/depmap.py +0 -0
  146. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/dictybase_gene.py +0 -0
  147. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/drugbank.py +0 -0
  148. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/drugbank_salt.py +0 -0
  149. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/drugcentral.py +0 -0
  150. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/famplex.py +0 -0
  151. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/flybase.py +0 -0
  152. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/geonames.py +0 -0
  153. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/gmt_utils.py +0 -0
  154. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/go.py +0 -0
  155. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/gwascentral_phenotype.py +0 -0
  156. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/gwascentral_study.py +0 -0
  157. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/hgnc.py +0 -0
  158. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/hgncgenefamily.py +0 -0
  159. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/icd10.py +0 -0
  160. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/icd11.py +0 -0
  161. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/icd_utils.py +0 -0
  162. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/interpro.py +0 -0
  163. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/itis.py +0 -0
  164. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/kegg/__init__.py +0 -0
  165. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/kegg/api.py +0 -0
  166. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/kegg/genes.py +0 -0
  167. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/kegg/genome.py +0 -0
  168. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/kegg/pathway.py +0 -0
  169. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mgi.py +0 -0
  170. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mirbase.py +0 -0
  171. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mirbase_constants.py +0 -0
  172. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mirbase_family.py +0 -0
  173. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/mirbase_mature.py +0 -0
  174. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/msigdb.py +0 -0
  175. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/ncbigene.py +0 -0
  176. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/npass.py +0 -0
  177. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/omim_ps.py +0 -0
  178. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pathbank.py +0 -0
  179. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pfam.py +0 -0
  180. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pfam_clan.py +0 -0
  181. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pid.py +0 -0
  182. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pombase.py +0 -0
  183. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/pubchem.py +0 -0
  184. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/reactome.py +0 -0
  185. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/rgd.py +0 -0
  186. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/rhea.py +0 -0
  187. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/ror.py +0 -0
  188. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/selventa/__init__.py +0 -0
  189. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/selventa/schem.py +0 -0
  190. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/selventa/scomp.py +0 -0
  191. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/selventa/sdis.py +0 -0
  192. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/selventa/sfam.py +0 -0
  193. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/sgd.py +0 -0
  194. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/slm.py +0 -0
  195. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/umls/__init__.py +0 -0
  196. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/umls/__main__.py +0 -0
  197. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
  198. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
  199. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/umls/umls.py +0 -0
  200. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/uniprot/__init__.py +0 -0
  201. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/uniprot/uniprot.py +0 -0
  202. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
  203. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/utils.py +0 -0
  204. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/wikipathways.py +0 -0
  205. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/sources/zfin.py +0 -0
  206. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/ssg/__init__.py +0 -0
  207. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/ssg/base.html +0 -0
  208. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/ssg/index.html +0 -0
  209. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/ssg/term.html +0 -0
  210. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/ssg/typedef.html +0 -0
  211. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/struct/__init__.py +0 -0
  212. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/struct/reference.py +0 -0
  213. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/struct/struct.py +0 -0
  214. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/struct/typedef.py +0 -0
  215. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/struct/utils.py +0 -0
  216. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/__init__.py +0 -0
  217. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/cache.py +0 -0
  218. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/io.py +0 -0
  219. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/iter.py +0 -0
  220. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/misc.py +0 -0
  221. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/ndex_utils.py +0 -0
  222. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/utils/path.py +0 -0
  223. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/__init__.py +0 -0
  224. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/canonicalizer.py +0 -0
  225. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/priority.py +0 -0
  226. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/__init__.py +0 -0
  227. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/biomappings.py +0 -0
  228. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/cbms2019.py +0 -0
  229. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/chembl.py +0 -0
  230. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/compath.py +0 -0
  231. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/famplex.py +0 -0
  232. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/gilda.py +0 -0
  233. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/intact.py +0 -0
  234. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/ncit.py +0 -0
  235. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/pubchem.py +0 -0
  236. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/sources/wikidata.py +0 -0
  237. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo/xrefdb/xrefs_pipeline.py +0 -0
  238. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/SOURCES.txt +0 -0
  239. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/dependency_links.txt +0 -0
  240. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/entry_points.txt +0 -0
  241. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/not-zip-safe +0 -0
  242. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/requires.txt +0 -0
  243. {pyobo-0.10.9 → pyobo-0.10.11}/src/pyobo.egg-info/top_level.txt +0 -0
  244. {pyobo-0.10.9 → pyobo-0.10.11}/tests/__init__.py +0 -0
  245. {pyobo-0.10.9 → pyobo-0.10.11}/tests/constants.py +0 -0
  246. {pyobo-0.10.9 → pyobo-0.10.11}/tests/resources/citations.txt +0 -0
  247. {pyobo-0.10.9 → pyobo-0.10.11}/tests/resources/test_chebi.obo +0 -0
  248. {pyobo-0.10.9 → pyobo-0.10.11}/tests/resources/test_msigdb.gmt +0 -0
  249. {pyobo-0.10.9 → pyobo-0.10.11}/tests/resources/test_wikipathways.gmt +0 -0
  250. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_alt_ids.py +0 -0
  251. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_caches.py +0 -0
  252. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_extract.py +0 -0
  253. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_get.py +0 -0
  254. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_get_miriam_url.py +0 -0
  255. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_gmt.py +0 -0
  256. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_ground.py +0 -0
  257. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_mapper.py +0 -0
  258. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_sources/__init__.py +0 -0
  259. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_sources/test_famplex.py +0 -0
  260. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_struct.py +0 -0
  261. {pyobo-0.10.9 → pyobo-0.10.11}/tests/test_utils.py +0 -0
  262. {pyobo-0.10.9 → pyobo-0.10.11}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyobo
3
- Version: 0.10.9
3
+ Version: 0.10.11
4
4
  Summary: Handling and writing OBO
5
5
  Home-page: https://github.com/pyobo/pyobo
6
6
  Download-URL: https://github.com/pyobo/pyobo/releases
@@ -58,7 +58,7 @@ author = "Charles Tapley Hoyt"
58
58
  #
59
59
 
60
60
  # The full version, including alpha/beta/rc tags.
61
- release = "0.10.9"
61
+ release = "0.10.11"
62
62
 
63
63
  # The short X.Y version.
64
64
  parsed_version = re.match(
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = pyobo
3
- version = 0.10.9
3
+ version = 0.10.11
4
4
  description = Handling and writing OBO
5
5
  long_description = file: README.rst
6
6
  url = https://github.com/pyobo/pyobo
@@ -28,12 +28,15 @@ NO_ALTS = {
28
28
 
29
29
  @lru_cache()
30
30
  @wrap_norm_prefix
31
- def get_id_to_alts(prefix: str, force: bool = False) -> Mapping[str, List[str]]:
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 = get_version(prefix)
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(prefix: str, force: bool = False) -> Mapping[str, str]:
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(prefix, identifier, ancestor_prefix, ancestor_identifier) -> bool:
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(prefix, identifier, ancestor_prefix, ancestor_identifier) -> bool:
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(prefix: str, force: bool = False) -> Mapping[str, str]:
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 = get_version(prefix)
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)
@@ -30,11 +30,11 @@ __all__ = [
30
30
  logger = logging.getLogger(__name__)
31
31
 
32
32
 
33
- def get_name_by_curie(curie: str) -> Optional[str]:
33
+ def get_name_by_curie(curie: str, *, version: Optional[str] = None) -> Optional[str]:
34
34
  """Get the name for a CURIE, if possible."""
35
35
  prefix, identifier = normalize_curie(curie)
36
36
  if prefix and identifier:
37
- return get_name(prefix, identifier)
37
+ return get_name(prefix, identifier, version=version)
38
38
  return None
39
39
 
40
40
 
@@ -69,20 +69,20 @@ 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
 
76
76
  @wrap_norm_prefix
77
- def get_name(prefix: str, identifier: str) -> Optional[str]:
77
+ def get_name(prefix: str, identifier: str, *, version: Optional[str] = None) -> Optional[str]:
78
78
  """Get the name for an entity."""
79
- return _help_get(get_id_name_mapping, prefix, identifier)
79
+ return _help_get(get_id_name_mapping, prefix, identifier, version=version)
80
80
 
81
81
 
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(prefix: str, force: bool = False) -> Mapping[str, str]:
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 = get_version(prefix)
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 = get_version(prefix)
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 = get_version(prefix)
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(prefix: str, force: bool = False) -> pd.DataFrame:
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 = get_version(prefix)
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(prefix: str, identifier: str, new_prefix: str, flip: bool = False) -> Optional[str]:
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(*, prefix: str, bucket: str, s3_client=None):
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=get_version(prefix))
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=get_version(prefix))
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=get_version(prefix))
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=get_version(prefix))
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=get_version(prefix))
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=get_version(prefix))
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
- def metadata(prefix: str, force: bool):
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 = bioversions.get_version(PREFIX)
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, "cache", "xrefs", name="ncbigene.tsv", version=version_getter(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 get_version() -> str:
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 = get_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 = get_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 = get_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 = get_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:
@@ -4,11 +4,11 @@
4
4
 
5
5
  import logging
6
6
  from collections import defaultdict
7
- from typing import Dict, Iterable, Mapping, Optional, Set, Tuple
7
+ from typing import Any, Dict, Iterable, Mapping, Optional, Set, Tuple
8
8
 
9
9
  from .utils import get_go_mapping
10
10
  from ..struct import Obo, Reference, Synonym, Term
11
- from ..struct.typedef import enables, has_member
11
+ from ..struct.typedef import enables, has_member, term_replaced_by
12
12
  from ..utils.path import ensure_path
13
13
 
14
14
  __all__ = [
@@ -93,12 +93,29 @@ def get_terms(version: str, force: bool = False) -> Iterable[Term]:
93
93
 
94
94
  database_path = ensure_path(PREFIX, url=EXPASY_DATABASE_URL, version=version)
95
95
  with open(database_path) as file:
96
- _data = get_database(file)
96
+ id_to_data = get_database(file)
97
97
 
98
98
  ec2go = get_ec2go(version=version)
99
99
 
100
100
  ec_code_to_alt_ids = {}
101
- for ec_code, data in _data.items():
101
+ for ec_code, data in id_to_data.items():
102
+ if data.get("deleted"):
103
+ terms[ec_code] = Term(
104
+ reference=Reference(prefix=PREFIX, identifier=ec_code), is_obsolete=True
105
+ )
106
+ continue
107
+
108
+ transfer_ids = data.get("transfer_id")
109
+ if transfer_ids:
110
+ term = terms[ec_code] = Term(
111
+ reference=Reference(prefix=PREFIX, identifier=ec_code), is_obsolete=True
112
+ )
113
+ for transfer_id in transfer_ids:
114
+ term.append_relationship(
115
+ term_replaced_by, Reference(prefix=PREFIX, identifier=transfer_id)
116
+ )
117
+ continue
118
+
102
119
  parent_ec_code = data["parent"]["identifier"]
103
120
  parent_term = terms[parent_ec_code]
104
121
 
@@ -210,7 +227,7 @@ def get_database(lines: Iterable[str]) -> Mapping:
210
227
  for groups in _group_by_id(lines):
211
228
  _, expasy_id = groups[0]
212
229
 
213
- rv[expasy_id] = ec_data_entry = {
230
+ ec_data_entry: Dict[str, Any] = {
214
231
  "concept": {
215
232
  "namespace": PREFIX,
216
233
  "identifier": expasy_id,
@@ -230,10 +247,10 @@ def get_database(lines: Iterable[str]) -> Mapping:
230
247
  if descriptor == "//":
231
248
  continue
232
249
  elif descriptor == DE and value == "Deleted entry.":
233
- continue
250
+ ec_data_entry["deleted"] = True
234
251
  elif descriptor == DE and value.startswith("Transferred entry: "):
235
- value = value[len("Transferred entry: ") :].rstrip()
236
- ec_data_entry["transfer_id"] = value
252
+ value = value[len("Transferred entry: ") :].rstrip().rstrip(".")
253
+ ec_data_entry["transfer_id"] = value.split(" and ")
237
254
  elif descriptor == DE:
238
255
  ec_data_entry["concept"]["name"] = value.rstrip(".") # type:ignore
239
256
  elif descriptor == AN:
@@ -259,11 +276,7 @@ def get_database(lines: Iterable[str]) -> Mapping:
259
276
  )
260
277
  )
261
278
 
262
- for expasy_id, data in rv.items():
263
- transfer_id = data.pop("transfer_id", None)
264
- if transfer_id is not None:
265
- rv[expasy_id]["alt_ids"].append(transfer_id) # type:ignore
266
-
279
+ rv[expasy_id] = ec_data_entry
267
280
  return rv
268
281
 
269
282