pyobo 0.12.15__tar.gz → 0.12.16__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 (211) hide show
  1. {pyobo-0.12.15 → pyobo-0.12.16}/PKG-INFO +9 -6
  2. {pyobo-0.12.15 → pyobo-0.12.16}/pyproject.toml +10 -7
  3. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/xrefs.py +5 -1
  4. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/cli.py +2 -0
  5. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/lookup.py +44 -23
  6. pyobo-0.12.16/src/pyobo/cli/obo_lexical_review.py +207 -0
  7. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/getters.py +5 -4
  8. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/ror.py +8 -203
  9. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/ontology.py +2 -2
  10. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obograph/export.py +2 -2
  11. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/struct.py +6 -6
  12. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/path.py +0 -1
  13. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/version.py +1 -1
  14. {pyobo-0.12.15 → pyobo-0.12.16}/LICENSE +0 -0
  15. {pyobo-0.12.15 → pyobo-0.12.16}/README.md +0 -0
  16. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/.DS_Store +0 -0
  17. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/__init__.py +0 -0
  18. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/__main__.py +0 -0
  19. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/__init__.py +0 -0
  20. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/alts.py +0 -0
  21. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/combine.py +0 -0
  22. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/edges.py +0 -0
  23. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/embedding.py +0 -0
  24. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/hierarchy.py +0 -0
  25. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/metadata.py +0 -0
  26. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/names.py +0 -0
  27. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/properties.py +0 -0
  28. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/relations.py +0 -0
  29. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/species.py +0 -0
  30. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/typedefs.py +0 -0
  31. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/api/utils.py +0 -0
  32. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/__init__.py +0 -0
  33. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/database.py +0 -0
  34. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/database_utils.py +0 -0
  35. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/cli/utils.py +0 -0
  36. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/constants.py +0 -0
  37. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/gilda_utils.py +0 -0
  38. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/__init__.py +0 -0
  39. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/api.py +0 -0
  40. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/__init__.py +0 -0
  41. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/api.py +0 -0
  42. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/data.json +0 -0
  43. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/data_owl.json +0 -0
  44. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/data_rdf.json +0 -0
  45. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/identifier_utils/relations/data_rdfs.json +0 -0
  46. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/mocks.py +0 -0
  47. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ner/__init__.py +0 -0
  48. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ner/api.py +0 -0
  49. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ner/normalizer.py +0 -0
  50. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ner/scispacy_utils.py +0 -0
  51. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/plugins.py +0 -0
  52. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/py.typed +0 -0
  53. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resource_utils.py +0 -0
  54. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/__init__.py +0 -0
  55. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/ncbitaxon.py +0 -0
  56. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
  57. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/ro.py +0 -0
  58. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/ro.tsv +0 -0
  59. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/so.py +0 -0
  60. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/resources/so.tsv +0 -0
  61. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/README.md +0 -0
  62. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/__init__.py +0 -0
  63. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/agrovoc.py +0 -0
  64. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/antibodyregistry.py +0 -0
  65. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/bigg/__init__.py +0 -0
  66. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/bigg/bigg_compartment.py +0 -0
  67. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/bigg/bigg_metabolite.py +0 -0
  68. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/bigg/bigg_model.py +0 -0
  69. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/bigg/bigg_reaction.py +0 -0
  70. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/biogrid.py +0 -0
  71. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/ccle.py +0 -0
  72. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/cgnc.py +0 -0
  73. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chebi.py +0 -0
  74. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/__init__.py +0 -0
  75. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/chembl_cell.py +0 -0
  76. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/chembl_compound.py +0 -0
  77. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/chembl_mechanism.py +0 -0
  78. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/chembl_target.py +0 -0
  79. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/chembl/chembl_tissue.py +0 -0
  80. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/civic_gene.py +0 -0
  81. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/clinicaltrials.py +0 -0
  82. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/complexportal.py +0 -0
  83. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/conso.py +0 -0
  84. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/cpt.py +0 -0
  85. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/credit.py +0 -0
  86. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/cvx.py +0 -0
  87. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/depmap.py +0 -0
  88. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/dictybase_gene.py +0 -0
  89. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/drugbank/__init__.py +0 -0
  90. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/drugbank/drugbank.py +0 -0
  91. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/drugbank/drugbank_salt.py +0 -0
  92. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/drugcentral.py +0 -0
  93. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/expasy.py +0 -0
  94. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/famplex.py +0 -0
  95. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/flybase.py +0 -0
  96. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gard.py +0 -0
  97. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/geonames/__init__.py +0 -0
  98. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/geonames/features.py +0 -0
  99. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/geonames/geonames.py +0 -0
  100. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/geonames/utils.py +0 -0
  101. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gmt_utils.py +0 -0
  102. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/go.py +0 -0
  103. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/goldbook.py +0 -0
  104. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gtdb.py +0 -0
  105. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gwascentral/__init__.py +0 -0
  106. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gwascentral/gwascentral_phenotype.py +0 -0
  107. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/gwascentral/gwascentral_study.py +0 -0
  108. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/hgnc/__init__.py +0 -0
  109. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/hgnc/hgnc.py +0 -0
  110. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/hgnc/hgncgenefamily.py +0 -0
  111. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/iana_media_type.py +0 -0
  112. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/icd/__init__.py +0 -0
  113. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/icd/icd10.py +0 -0
  114. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/icd/icd11.py +0 -0
  115. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/icd/icd_utils.py +0 -0
  116. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/iconclass.py +0 -0
  117. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/intact.py +0 -0
  118. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/interpro.py +0 -0
  119. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/itis.py +0 -0
  120. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/kegg/__init__.py +0 -0
  121. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/kegg/api.py +0 -0
  122. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/kegg/genes.py +0 -0
  123. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/kegg/genome.py +0 -0
  124. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/kegg/pathway.py +0 -0
  125. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mesh.py +0 -0
  126. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mgi.py +0 -0
  127. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mirbase/__init__.py +0 -0
  128. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mirbase/mirbase.py +0 -0
  129. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mirbase/mirbase_constants.py +0 -0
  130. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mirbase/mirbase_family.py +0 -0
  131. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/mirbase/mirbase_mature.py +0 -0
  132. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/msigdb.py +0 -0
  133. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/ncbi/__init__.py +0 -0
  134. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/ncbi/ncbi_gc.py +0 -0
  135. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/ncbi/ncbigene.py +0 -0
  136. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/nih_reporter.py +0 -0
  137. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/nlm/__init__.py +0 -0
  138. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/nlm/nlm_catalog.py +0 -0
  139. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/nlm/nlm_publisher.py +0 -0
  140. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/nlm/utils.py +0 -0
  141. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/npass.py +0 -0
  142. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/omim_ps.py +0 -0
  143. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pathbank.py +0 -0
  144. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pfam/__init__.py +0 -0
  145. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pfam/pfam.py +0 -0
  146. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pfam/pfam_clan.py +0 -0
  147. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/__init__.py +0 -0
  148. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +0 -0
  149. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +0 -0
  150. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +0 -0
  151. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +0 -0
  152. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +0 -0
  153. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pharmgkb/utils.py +0 -0
  154. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pid.py +0 -0
  155. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pombase.py +0 -0
  156. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/pubchem.py +0 -0
  157. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/reactome.py +0 -0
  158. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/rgd.py +0 -0
  159. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/rhea.py +0 -0
  160. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/selventa/__init__.py +0 -0
  161. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/selventa/schem.py +0 -0
  162. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/selventa/scomp.py +0 -0
  163. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/selventa/sdis.py +0 -0
  164. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/selventa/sfam.py +0 -0
  165. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/sgd.py +0 -0
  166. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/signor/__init__.py +0 -0
  167. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/signor/download.py +0 -0
  168. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/signor/signor_complexes.py +0 -0
  169. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/slm.py +0 -0
  170. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/spdx.py +0 -0
  171. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/__init__.py +0 -0
  172. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/__main__.py +0 -0
  173. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
  174. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/sty.py +0 -0
  175. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
  176. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/umls/umls.py +0 -0
  177. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/unimod.py +0 -0
  178. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/uniprot/__init__.py +0 -0
  179. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/uniprot/uniprot.py +0 -0
  180. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
  181. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/utils.py +0 -0
  182. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/wikipathways.py +0 -0
  183. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/sources/zfin.py +0 -0
  184. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ssg/__init__.py +0 -0
  185. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ssg/base.html +0 -0
  186. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ssg/index.html +0 -0
  187. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ssg/term.html +0 -0
  188. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/ssg/typedef.html +0 -0
  189. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/__init__.py +0 -0
  190. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/__init__.py +0 -0
  191. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/dsl.py +0 -0
  192. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/macros.py +0 -0
  193. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/obo_to_functional.py +0 -0
  194. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/functional/utils.py +0 -0
  195. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obo/__init__.py +0 -0
  196. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obo/reader.py +0 -0
  197. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obo/reader_utils.py +0 -0
  198. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obograph/__init__.py +0 -0
  199. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obograph/reader.py +0 -0
  200. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/obograph/utils.py +0 -0
  201. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/reference.py +0 -0
  202. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/struct_utils.py +0 -0
  203. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/typedef.py +0 -0
  204. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/utils.py +0 -0
  205. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/struct/vocabulary.py +0 -0
  206. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/__init__.py +0 -0
  207. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/cache.py +0 -0
  208. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/io.py +0 -0
  209. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/iter.py +0 -0
  210. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/misc.py +0 -0
  211. {pyobo-0.12.15 → pyobo-0.12.16}/src/pyobo/utils/ndex_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobo
3
- Version: 0.12.15
3
+ Version: 0.12.16
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
@@ -36,9 +36,8 @@ Requires-Dist: humanize
36
36
  Requires-Dist: tabulate
37
37
  Requires-Dist: cachier
38
38
  Requires-Dist: pystow>=0.7.5
39
- Requires-Dist: bioversions>=0.8.101
39
+ Requires-Dist: bioversions>=0.8.243
40
40
  Requires-Dist: bioregistry>=0.12.30
41
- Requires-Dist: bioontologies>=0.7.2
42
41
  Requires-Dist: ssslm>=0.0.13
43
42
  Requires-Dist: zenodo-client>=0.4.1
44
43
  Requires-Dist: class-resolver>=0.6.0
@@ -52,10 +51,14 @@ Requires-Dist: chembl-downloader
52
51
  Requires-Dist: umls-downloader>=0.1.3
53
52
  Requires-Dist: clinicaltrials-downloader>=0.0.2
54
53
  Requires-Dist: nih-reporter-downloader>=0.0.1
54
+ Requires-Dist: ror-downloader>=0.0.4
55
55
  Requires-Dist: typing-extensions
56
56
  Requires-Dist: rdflib
57
57
  Requires-Dist: obographs>=0.0.8
58
- Requires-Dist: sssom-pydantic>=0.1.1
58
+ Requires-Dist: sssom-pydantic>=0.2.0
59
+ Requires-Dist: pytz
60
+ Requires-Dist: robot-obo-tool
61
+ Requires-Dist: pyperclip
59
62
  Requires-Dist: psycopg2-binary ; extra == 'drugcentral'
60
63
  Requires-Dist: ssslm[gilda] ; extra == 'gilda'
61
64
  Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
@@ -72,10 +75,10 @@ Maintainer: Charles Tapley Hoyt
72
75
  Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
73
76
  Requires-Python: >=3.10
74
77
  Project-URL: Bug Tracker, https://github.com/biopragmatics/pyobo/issues
75
- Project-URL: Documentation, https://pyobo.readthedocs.io
76
- Project-URL: Funding, https://github.com/sponsors/cthoyt
77
78
  Project-URL: Homepage, https://github.com/biopragmatics/pyobo
78
79
  Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
80
+ Project-URL: Documentation, https://pyobo.readthedocs.io
81
+ Project-URL: Funding, https://github.com/sponsors/cthoyt
79
82
  Provides-Extra: drugcentral
80
83
  Provides-Extra: gilda
81
84
  Provides-Extra: gilda-slim
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "pyobo"
7
- version = "0.12.15"
7
+ version = "0.12.16"
8
8
  description = "A python package for handling and generating OBO"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -69,9 +69,8 @@ dependencies = [
69
69
  "tabulate",
70
70
  "cachier",
71
71
  "pystow>=0.7.5",
72
- "bioversions>=0.8.101",
72
+ "bioversions>=0.8.243",
73
73
  "bioregistry>=0.12.30",
74
- "bioontologies>=0.7.2",
75
74
  "ssslm>=0.0.13",
76
75
  "zenodo-client>=0.4.1",
77
76
  "class_resolver>=0.6.0",
@@ -86,10 +85,14 @@ dependencies = [
86
85
  "umls_downloader>=0.1.3",
87
86
  "clinicaltrials_downloader>=0.0.2",
88
87
  "nih-reporter-downloader>=0.0.1",
88
+ "ror-downloader>=0.0.4",
89
89
  "typing_extensions",
90
90
  "rdflib",
91
91
  "obographs>=0.0.8",
92
- "sssom_pydantic>=0.1.1",
92
+ "sssom_pydantic>=0.2.0",
93
+ "pytz",
94
+ "robot-obo-tool",
95
+ "pyperclip",
93
96
  ]
94
97
 
95
98
  # see https://peps.python.org/pep-0735/ and https://docs.astral.sh/uv/concepts/dependencies/#dependency-groups
@@ -99,11 +102,11 @@ tests = [
99
102
  "coverage[toml]",
100
103
  ]
101
104
  docs = [
102
- "sphinx>=8",
105
+ "sphinx>=8,<9",
103
106
  "sphinx-rtd-theme>=3.0",
104
107
  "sphinx-click",
105
108
  "sphinx_automodapi",
106
- "sphinx_toolbox",
109
+ "sphinx_toolbox<=4.0.0",
107
110
  ]
108
111
  lint = [
109
112
  "ruff",
@@ -315,7 +318,7 @@ known-first-party = [
315
318
  docstring-code-format = true
316
319
 
317
320
  [tool.bumpversion]
318
- current_version = "0.12.15"
321
+ current_version = "0.12.16"
319
322
  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-]+)*))?"
320
323
  serialize = [
321
324
  "{major}.{minor}.{patch}-{release}+{build}",
@@ -124,7 +124,11 @@ def get_semantic_mappings(
124
124
  )
125
125
  if converter is None:
126
126
  converter = get_converter()
127
- return [row_to_semantic_mapping(row, converter=converter) for _, row in df.iterrows()]
127
+ return [
128
+ # TODO upstream this into sssom-pydantic?
129
+ row_to_semantic_mapping({k: v for k, v in row.items() if pd.notna(v)}, converter=converter)
130
+ for _, row in df.iterrows()
131
+ ]
128
132
 
129
133
 
130
134
  def get_mappings_df(
@@ -10,6 +10,7 @@ import click
10
10
 
11
11
  from .database import main as database_main
12
12
  from .lookup import lookup
13
+ from .obo_lexical_review import obo_lexical_review
13
14
  from ..constants import GLOBAL_SKIP, RAW_DIRECTORY
14
15
  from ..plugins import has_nomenclature_plugin
15
16
 
@@ -101,6 +102,7 @@ def _no_download() -> set[str]:
101
102
 
102
103
  main.add_command(lookup)
103
104
  main.add_command(database_main)
105
+ main.add_command(obo_lexical_review)
104
106
 
105
107
  if __name__ == "__main__":
106
108
  main()
@@ -1,8 +1,12 @@
1
1
  """CLI for PyOBO lookups."""
2
2
 
3
+ from __future__ import annotations
4
+
5
+ import inspect
3
6
  import json
4
7
  import sys
5
- from collections.abc import Mapping
8
+ from collections.abc import Iterable, Mapping
9
+ from typing import TYPE_CHECKING
6
10
 
7
11
  import click
8
12
  from more_click import verbose_option
@@ -17,7 +21,10 @@ from .utils import (
17
21
  strict_option,
18
22
  version_option,
19
23
  )
20
- from ..constants import LookupKwargs
24
+ from ..constants import GetOntologyKwargs, LookupKwargs
25
+
26
+ if TYPE_CHECKING:
27
+ from curies import Reference
21
28
 
22
29
  __all__ = [
23
30
  "lookup",
@@ -31,9 +38,12 @@ def lookup():
31
38
 
32
39
  def lookup_annotate(f: Clickable) -> Clickable:
33
40
  """Add appropriate decorators to lookup CLI functions."""
41
+ signature = inspect.signature(f)
42
+ param = signature.parameters["kwargs"]
43
+ if param.kind is not inspect.Parameter.VAR_KEYWORD:
44
+ raise ValueError("programmer error")
34
45
  for decorator in [
35
46
  lookup.command(),
36
- prefix_argument,
37
47
  verbose_option,
38
48
  force_option,
39
49
  force_process_option,
@@ -41,6 +51,15 @@ def lookup_annotate(f: Clickable) -> Clickable:
41
51
  version_option,
42
52
  ]:
43
53
  f = decorator(f)
54
+
55
+ if param.annotation is None:
56
+ pass
57
+ if param.annotation in {"Unpack[LookupKwargs]", Unpack[LookupKwargs]}:
58
+ f = prefix_argument(f)
59
+ elif param.annotation in {"Unpack[GetOntologyKwargs]", Unpack[GetOntologyKwargs]}:
60
+ pass
61
+ else:
62
+ raise ValueError(f"unknown parameter type for {f}: {param.annotation}")
44
63
  return f
45
64
 
46
65
 
@@ -249,33 +268,35 @@ def hierarchy(
249
268
 
250
269
 
251
270
  @lookup_annotate
252
- @click.argument("identifier")
253
- def ancestors(
254
- identifier: str,
255
- **kwargs: Unpack[LookupKwargs],
256
- ) -> None:
271
+ @click.argument("curie")
272
+ def ancestors(curie: str, **kwargs: Unpack[GetOntologyKwargs]) -> None:
257
273
  """Look up ancestors."""
258
- from ..api import get_ancestors, get_name
274
+ from ..api import get_ancestors
259
275
 
260
- # note, prefix is passed via kwargs
261
- ancestors = get_ancestors(identifier=identifier, **kwargs)
262
- for ancestor in sorted(ancestors or []):
263
- click.echo(f"{ancestor.curie}\t{get_name(ancestor, version=kwargs['version'])}")
276
+ ancestors = get_ancestors(curie, **kwargs)
277
+ _list_curies(ancestors, **kwargs)
264
278
 
265
279
 
266
280
  @lookup_annotate
267
- @click.argument("identifier")
268
- def descendants(
269
- identifier: str,
270
- **kwargs: Unpack[LookupKwargs],
271
- ) -> None:
281
+ @click.argument("curie")
282
+ def descendants(curie: str, **kwargs: Unpack[GetOntologyKwargs]) -> None:
272
283
  """Look up descendants."""
273
- from ..api import get_descendants, get_name
284
+ from ..api import get_descendants
285
+
286
+ descendants = get_descendants(curie, **kwargs)
287
+ _list_curies(descendants, **kwargs)
288
+
289
+
290
+ def _list_curies(
291
+ references: Iterable[Reference] | None, **kwargs: Unpack[GetOntologyKwargs]
292
+ ) -> None:
293
+ if not references:
294
+ return
295
+
296
+ from ..api import get_name
274
297
 
275
- # note, prefix is passed via kwargs
276
- descendants = get_descendants(identifier=identifier, **kwargs)
277
- for descendant in sorted(descendants or []):
278
- click.echo(f"{descendant.curie}\t{get_name(descendant, version=kwargs['version'])}")
298
+ for reference in sorted(references or []):
299
+ click.echo(f"{reference.curie}\t{get_name(reference, version=kwargs['version'])}")
279
300
 
280
301
 
281
302
  @lookup_annotate
@@ -0,0 +1,207 @@
1
+ # /// script
2
+ # requires-python = ">=3.11"
3
+ # dependencies = [
4
+ # "click>=8.3.1",
5
+ # "obographs>=0.0.8",
6
+ # "pyperclip>=1.11.0",
7
+ # "robot-obo-tool>=0.0.1",
8
+ # "ssslm[gilda-slim]>=0.1.3",
9
+ # "tabulate>=0.9.0",
10
+ # "tqdm>=4.67.3",
11
+ # ]
12
+ # ///
13
+
14
+ """Implement lexical review for an ontology."""
15
+
16
+ from __future__ import annotations
17
+
18
+ from typing import TYPE_CHECKING
19
+
20
+ import click
21
+
22
+ if TYPE_CHECKING:
23
+ import obographs
24
+ import ssslm
25
+
26
+ INDEX_URL = "https://github.com/biopragmatics/biolexica/raw/main/lexica/obo/obo.ssslm.tsv.gz"
27
+ UPPER = {"ncit"}
28
+
29
+
30
+ @click.command()
31
+ @click.argument("prefix")
32
+ @click.option(
33
+ "--location",
34
+ help="Local path or URL to an OBO Graph JSON file or OWL file. If not given, will try and look up through the OBO PURL system",
35
+ )
36
+ @click.option(
37
+ "--uri-prefix",
38
+ help="Local path to an OBO Graph JSON file. If not given, will try and look up through the OBO PURL system",
39
+ )
40
+ @click.option("--index-url", default=INDEX_URL, show_default=True)
41
+ @click.option("--show-passed", is_flag=True)
42
+ @click.option("--skip-upper", is_flag=True, help=f"if true, skip upper level ontologies {UPPER}")
43
+ @click.option("--index-force", is_flag=True, help="if true, force re-downloading the lexical index")
44
+ def obo_lexical_review(
45
+ prefix: str,
46
+ location: str | None,
47
+ uri_prefix: str | None,
48
+ index_url: str,
49
+ show_passed: bool,
50
+ skip_upper: bool,
51
+ index_force: bool,
52
+ ) -> None:
53
+ """Make a lexical review of an ontology."""
54
+ import sys
55
+ import time
56
+
57
+ import pyperclip
58
+ import pystow
59
+ import ssslm
60
+ from tabulate import tabulate
61
+
62
+ module = pystow.module("pyobo", "obo-lexical-review")
63
+
64
+ args = " ".join(sys.argv[1:])
65
+ output = f"Analysis of {prefix} run on {time.asctime()} with the following command:\n\n```console\n$ uvx pyobo obo-lexical-review {args}\n```\n\n"
66
+
67
+ graph_document, uri_prefix = _get_graph_document(
68
+ prefix=prefix,
69
+ uri_prefix=uri_prefix,
70
+ ontology_path=location,
71
+ )
72
+
73
+ click.echo(f"Loading lexical index from {index_url} using SSSLM")
74
+ path = module.ensure(url=index_url, force=index_force)
75
+ grounder = ssslm.make_grounder(path)
76
+ click.echo("Done loading lexical index")
77
+
78
+ passed, failed = _get_calls(
79
+ graph_document=graph_document,
80
+ matcher=grounder,
81
+ uri_prefix=uri_prefix,
82
+ skip_upper=skip_upper,
83
+ )
84
+
85
+ total = len(passed) + len(failed)
86
+
87
+ if passed and show_passed:
88
+ passed_table = tabulate(passed, headers=["LUID", "Name"], tablefmt="github")
89
+ passed_msg = f"## Passed Nodes ({len(passed):,}/{total:,}; {len(passed) / total:.1%})\n\n{passed_table}\n\n"
90
+ output += passed_msg
91
+
92
+ if failed:
93
+ rows = []
94
+ for luid, name, matches in failed:
95
+ rows.append((luid, name, *_parts(matches[0])))
96
+ for match in matches[1:]:
97
+ rows.append(("", "", *_parts(match)))
98
+ failed_table = tabulate(
99
+ rows, headers=[prefix, "name", "obo-curie", "obo-name", "obo-score"], tablefmt="github"
100
+ )
101
+ failed_message = f"## Failed Nodes ({len(failed):,}/{total:,}; {len(failed) / total:.1%})\n\n{failed_table}\n\n"
102
+ output += failed_message
103
+
104
+ click.echo(output)
105
+ click.echo("Finished! automatically copied to the clipboard, e.g., for pasting into GitHub)")
106
+ pyperclip.copy(output)
107
+
108
+
109
+ def _parts(match: ssslm.Match) -> tuple[str, str, float]:
110
+ return (
111
+ f"[`{match.curie}`](https://semantic.farm/{match.curie})",
112
+ match.name or "",
113
+ round(match.score, 3),
114
+ )
115
+
116
+
117
+ def _get_graph_document(
118
+ prefix: str, uri_prefix: str | None = None, ontology_path: str | None = None
119
+ ) -> tuple[obographs.GraphDocument, str]:
120
+ from pathlib import Path
121
+
122
+ import obographs
123
+ import robot_obo_tool
124
+
125
+ if uri_prefix is None:
126
+ uri_prefix = f"http://purl.obolibrary.org/obo/{prefix}_"
127
+ click.echo(f"Inferred URI prefix from given OBO CURIE prefix: {uri_prefix}")
128
+ if ontology_path is None:
129
+ ontology_path = f"https://purl.obolibrary.org/obo/{prefix.lower()}.json"
130
+ click.echo(f"No ontology path given, guessing it's available at {ontology_path}")
131
+ if ontology_path.endswith(".json"):
132
+ click.echo(f"reading OBO Graph JSON from {ontology_path}")
133
+ graph_documents = obographs.read(ontology_path, squeeze=False, timeout=60)
134
+ else:
135
+ import tempfile
136
+
137
+ with tempfile.TemporaryDirectory() as tmpdir:
138
+ tmppath = Path(tmpdir).joinpath("temp.json")
139
+ click.echo(
140
+ "given ontology path does not end with JSON. implicitly converting to OBO Graph JSON using ROBOT"
141
+ )
142
+ robot_obo_tool.convert(
143
+ input_path=ontology_path,
144
+ output_path=tmppath,
145
+ check=False,
146
+ merge=False,
147
+ reason=False,
148
+ )
149
+ click.echo("reading converted OBO Graph JSON")
150
+ graph_documents = obographs.read(tmppath, squeeze=False)
151
+
152
+ return graph_documents, uri_prefix
153
+
154
+
155
+ def _get_calls(
156
+ *,
157
+ graph_document: obographs.GraphDocument,
158
+ matcher: ssslm.Matcher,
159
+ uri_prefix: str,
160
+ skip_upper: bool = False,
161
+ ) -> tuple[list[tuple[str, str]], list[tuple[str, str, list[ssslm.Match]]]]:
162
+ """Get matches."""
163
+ from tqdm import tqdm
164
+
165
+ passed = []
166
+ failed = []
167
+ total = 0
168
+ skipped = 0
169
+ for graph in tqdm(graph_document.graphs, unit="graph"):
170
+ for node in tqdm(sorted(graph.nodes, key=lambda n: n.id), unit="node", leave=False):
171
+ if node.id is None:
172
+ continue
173
+
174
+ total += 1
175
+ if not node.id.startswith(uri_prefix):
176
+ skipped += 1
177
+ continue
178
+
179
+ if not node.lbl:
180
+ continue
181
+
182
+ local_unique_identifier = node.id[len(uri_prefix) :]
183
+
184
+ matches: list[ssslm.Match] = []
185
+ matches.extend(matcher.get_matches(node.lbl))
186
+ if node.meta is not None and node.meta.synonyms is not None:
187
+ matches.extend(
188
+ match
189
+ for synonym in node.meta.synonyms
190
+ for match in matcher.get_matches(synonym.val)
191
+ )
192
+
193
+ # there are a lot of NCIT matches, which aren't that informative
194
+ # since OBO doesn't mind duplicating these terms
195
+ if skip_upper:
196
+ matches = [m for m in matches if m.prefix not in UPPER]
197
+
198
+ if not matches:
199
+ passed.append((local_unique_identifier, node.lbl))
200
+ else:
201
+ failed.append((local_unique_identifier, node.lbl, matches))
202
+
203
+ return passed, failed
204
+
205
+
206
+ if __name__ == "__main__":
207
+ obo_lexical_review()
@@ -17,7 +17,6 @@ from pathlib import Path
17
17
  from textwrap import indent
18
18
  from typing import Any, TypeVar
19
19
 
20
- import bioontologies.robot
21
20
  import bioregistry
22
21
  import click
23
22
  import pystow.utils
@@ -80,10 +79,10 @@ REQUIRES_NO_ROBOT_CHECK = {
80
79
 
81
80
 
82
81
  def _convert_to_obo(path: Path) -> Path:
83
- import bioontologies.robot
82
+ import robot_obo_tool
84
83
 
85
84
  _converted_obo_path = path.with_suffix(".obo")
86
- bioontologies.robot.convert(path, _converted_obo_path, check=False)
85
+ robot_obo_tool.convert(path, _converted_obo_path, check=False)
87
86
  return _converted_obo_path
88
87
 
89
88
 
@@ -338,6 +337,8 @@ def iter_helper_helper(
338
337
 
339
338
  :yields: A prefix and the result of the callable ``f``
340
339
  """
340
+ from robot_obo_tool import ROBOTError
341
+
341
342
  strict = kwargs.get("strict", True)
342
343
  prefixes = list(
343
344
  _prefixes(
@@ -382,7 +383,7 @@ def iter_helper_helper(
382
383
  if "DrugBank" not in str(e):
383
384
  raise
384
385
  logger.warning("[drugbank] invalid credentials")
385
- except (subprocess.CalledProcessError, bioontologies.robot.ROBOTError):
386
+ except (subprocess.CalledProcessError, ROBOTError):
386
387
  logger.warning("[%s] ROBOT was unable to convert OWL to OBO", prefix)
387
388
  except ValueError as e:
388
389
  if _is_xml(e):