pyobo 0.12.0__tar.gz → 0.12.1__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 (203) hide show
  1. {pyobo-0.12.0 → pyobo-0.12.1}/PKG-INFO +71 -110
  2. {pyobo-0.12.0 → pyobo-0.12.1}/README.md +68 -99
  3. {pyobo-0.12.0 → pyobo-0.12.1}/pyproject.toml +53 -5
  4. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/.DS_Store +0 -0
  5. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/properties.py +8 -12
  6. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/xrefs.py +1 -2
  7. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/database.py +30 -2
  8. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/database_utils.py +5 -11
  9. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/getters.py +18 -78
  10. pyobo-0.12.1/src/pyobo/gilda_utils.py +74 -0
  11. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/__init__.py +2 -10
  12. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/api.py +21 -12
  13. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/preprocessing.json +74 -13
  14. pyobo-0.12.1/src/pyobo/identifier_utils/preprocessing.py +27 -0
  15. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/obographs.py +5 -1
  16. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/reader.py +13 -17
  17. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/cgnc.py +9 -1
  18. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/flybase.py +5 -5
  19. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/omim_ps.py +4 -4
  20. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +1 -1
  21. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/ontology.py +3 -1
  22. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/reference.py +4 -4
  23. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/struct.py +112 -55
  24. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/cache.py +3 -4
  25. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/io.py +38 -14
  26. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/path.py +16 -19
  27. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/version.py +1 -1
  28. pyobo-0.12.0/src/pyobo/gilda_utils.py +0 -151
  29. pyobo-0.12.0/src/pyobo/identifier_utils/model.py +0 -130
  30. pyobo-0.12.0/src/pyobo/identifier_utils/preprocessing.py +0 -61
  31. {pyobo-0.12.0 → pyobo-0.12.1}/LICENSE +0 -0
  32. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/__init__.py +0 -0
  33. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/__main__.py +0 -0
  34. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/__init__.py +0 -0
  35. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/alts.py +0 -0
  36. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/combine.py +0 -0
  37. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/edges.py +0 -0
  38. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/hierarchy.py +0 -0
  39. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/metadata.py +0 -0
  40. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/names.py +0 -0
  41. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/relations.py +0 -0
  42. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/species.py +0 -0
  43. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/typedefs.py +0 -0
  44. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/api/utils.py +0 -0
  45. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/__init__.py +0 -0
  46. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/cli.py +0 -0
  47. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/lookup.py +0 -0
  48. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/cli/utils.py +0 -0
  49. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/constants.py +0 -0
  50. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/__init__.py +0 -0
  51. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/api.py +0 -0
  52. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/data.json +0 -0
  53. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/data_owl.json +0 -0
  54. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/data_rdf.json +0 -0
  55. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/identifier_utils/relations/data_rdfs.json +0 -0
  56. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/mocks.py +0 -0
  57. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ner/__init__.py +0 -0
  58. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ner/api.py +0 -0
  59. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ner/normalizer.py +0 -0
  60. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/plugins.py +0 -0
  61. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/py.typed +0 -0
  62. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/reader_utils.py +0 -0
  63. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resource_utils.py +0 -0
  64. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/__init__.py +0 -0
  65. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/goc.py +0 -0
  66. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/goc.tsv +0 -0
  67. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/ncbitaxon.py +0 -0
  68. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
  69. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/ro.py +0 -0
  70. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/ro.tsv +0 -0
  71. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/so.py +0 -0
  72. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/resources/so.tsv +0 -0
  73. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/README.md +0 -0
  74. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/__init__.py +0 -0
  75. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/agrovoc.py +0 -0
  76. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/antibodyregistry.py +0 -0
  77. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/bigg/__init__.py +0 -0
  78. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/bigg/bigg_compartment.py +0 -0
  79. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/bigg/bigg_metabolite.py +0 -0
  80. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/bigg/bigg_model.py +0 -0
  81. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/bigg/bigg_reaction.py +0 -0
  82. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/biogrid.py +0 -0
  83. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/ccle.py +0 -0
  84. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/chebi.py +0 -0
  85. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/chembl/__init__.py +0 -0
  86. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/chembl/chembl_compound.py +0 -0
  87. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/chembl/chembl_target.py +0 -0
  88. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/civic_gene.py +0 -0
  89. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/clinicaltrials.py +0 -0
  90. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/complexportal.py +0 -0
  91. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/conso.py +0 -0
  92. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/cpt.py +0 -0
  93. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/credit.py +0 -0
  94. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/cvx.py +0 -0
  95. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/depmap.py +0 -0
  96. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/dictybase_gene.py +0 -0
  97. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/drugbank/__init__.py +0 -0
  98. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/drugbank/drugbank.py +0 -0
  99. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/drugbank/drugbank_salt.py +0 -0
  100. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/drugcentral.py +0 -0
  101. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/expasy.py +0 -0
  102. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/famplex.py +0 -0
  103. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gard.py +0 -0
  104. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/geonames/__init__.py +0 -0
  105. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/geonames/features.py +0 -0
  106. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/geonames/geonames.py +0 -0
  107. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/geonames/utils.py +0 -0
  108. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gmt_utils.py +0 -0
  109. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/go.py +0 -0
  110. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gtdb.py +0 -0
  111. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gwascentral/__init__.py +0 -0
  112. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gwascentral/gwascentral_phenotype.py +0 -0
  113. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/gwascentral/gwascentral_study.py +0 -0
  114. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/hgnc/__init__.py +0 -0
  115. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/hgnc/hgnc.py +0 -0
  116. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/hgnc/hgncgenefamily.py +0 -0
  117. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/icd/__init__.py +0 -0
  118. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/icd/icd10.py +0 -0
  119. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/icd/icd11.py +0 -0
  120. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/icd/icd_utils.py +0 -0
  121. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/interpro.py +0 -0
  122. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/itis.py +0 -0
  123. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/kegg/__init__.py +0 -0
  124. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/kegg/api.py +0 -0
  125. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/kegg/genes.py +0 -0
  126. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/kegg/genome.py +0 -0
  127. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/kegg/pathway.py +0 -0
  128. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mesh.py +0 -0
  129. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mgi.py +0 -0
  130. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mirbase/__init__.py +0 -0
  131. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mirbase/mirbase.py +0 -0
  132. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mirbase/mirbase_constants.py +0 -0
  133. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mirbase/mirbase_family.py +0 -0
  134. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/mirbase/mirbase_mature.py +0 -0
  135. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/msigdb.py +0 -0
  136. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/ncbi/__init__.py +0 -0
  137. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/ncbi/ncbi_gc.py +0 -0
  138. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/ncbi/ncbigene.py +0 -0
  139. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/nih_reporter.py +0 -0
  140. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/nlm/__init__.py +0 -0
  141. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/nlm/nlm_catalog.py +0 -0
  142. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/nlm/nlm_publisher.py +0 -0
  143. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/nlm/utils.py +0 -0
  144. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/npass.py +0 -0
  145. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pathbank.py +0 -0
  146. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pfam/__init__.py +0 -0
  147. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pfam/pfam.py +0 -0
  148. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pfam/pfam_clan.py +0 -0
  149. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/__init__.py +0 -0
  150. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +0 -0
  151. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +0 -0
  152. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +0 -0
  153. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +0 -0
  154. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pharmgkb/utils.py +0 -0
  155. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pid.py +0 -0
  156. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pombase.py +0 -0
  157. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/pubchem.py +0 -0
  158. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/reactome.py +0 -0
  159. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/rgd.py +0 -0
  160. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/rhea.py +0 -0
  161. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/ror.py +0 -0
  162. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/selventa/__init__.py +0 -0
  163. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/selventa/schem.py +0 -0
  164. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/selventa/scomp.py +0 -0
  165. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/selventa/sdis.py +0 -0
  166. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/selventa/sfam.py +0 -0
  167. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/sgd.py +0 -0
  168. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/signor/__init__.py +0 -0
  169. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/signor/download.py +0 -0
  170. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/signor/signor_complexes.py +0 -0
  171. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/slm.py +0 -0
  172. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/__init__.py +0 -0
  173. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/__main__.py +0 -0
  174. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
  175. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/sty.py +0 -0
  176. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
  177. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/umls/umls.py +0 -0
  178. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/unimod.py +0 -0
  179. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/uniprot/__init__.py +0 -0
  180. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/uniprot/uniprot.py +0 -0
  181. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
  182. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/utils.py +0 -0
  183. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/wikipathways.py +0 -0
  184. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/sources/zfin.py +0 -0
  185. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ssg/__init__.py +0 -0
  186. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ssg/base.html +0 -0
  187. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ssg/index.html +0 -0
  188. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ssg/term.html +0 -0
  189. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/ssg/typedef.html +0 -0
  190. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/__init__.py +0 -0
  191. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/__init__.py +0 -0
  192. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/dsl.py +0 -0
  193. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/macros.py +0 -0
  194. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/obo_to_functional.py +0 -0
  195. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/functional/utils.py +0 -0
  196. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/struct_utils.py +0 -0
  197. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/typedef.py +0 -0
  198. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/utils.py +0 -0
  199. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/struct/vocabulary.py +0 -0
  200. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/__init__.py +0 -0
  201. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/iter.py +0 -0
  202. {pyobo-0.12.0 → pyobo-0.12.1}/src/pyobo/utils/misc.py +0 -0
  203. {pyobo-0.12.0 → pyobo-0.12.1}/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.0
3
+ Version: 0.12.1
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
@@ -37,7 +37,7 @@ Requires-Dist: humanize
37
37
  Requires-Dist: tabulate
38
38
  Requires-Dist: cachier
39
39
  Requires-Dist: pystow>=0.7.0
40
- Requires-Dist: bioversions>=0.7.0
40
+ Requires-Dist: bioversions>=0.8.0
41
41
  Requires-Dist: bioregistry>=0.12.7
42
42
  Requires-Dist: bioontologies>=0.7.1
43
43
  Requires-Dist: ssslm>=0.0.13
@@ -45,7 +45,7 @@ Requires-Dist: zenodo-client>=0.3.6
45
45
  Requires-Dist: class-resolver>=0.6.0
46
46
  Requires-Dist: psycopg2-binary
47
47
  Requires-Dist: pydantic>=2.0
48
- Requires-Dist: curies>=0.10.10
48
+ Requires-Dist: curies>=0.10.13
49
49
  Requires-Dist: python-dateutil
50
50
  Requires-Dist: networkx>=3.4
51
51
  Requires-Dist: drugbank-downloader
@@ -55,14 +55,8 @@ Requires-Dist: clinicaltrials-downloader>=0.0.2
55
55
  Requires-Dist: nih-reporter-downloader>=0.0.1
56
56
  Requires-Dist: typing-extensions
57
57
  Requires-Dist: rdflib
58
- Requires-Dist: sphinx>=8 ; extra == 'docs'
59
- Requires-Dist: sphinx-rtd-theme>=3.0 ; extra == 'docs'
60
- Requires-Dist: sphinx-click ; extra == 'docs'
61
- Requires-Dist: sphinx-automodapi ; extra == 'docs'
62
58
  Requires-Dist: ssslm[gilda] ; extra == 'gilda'
63
59
  Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
64
- Requires-Dist: pytest ; extra == 'tests'
65
- Requires-Dist: coverage[toml] ; extra == 'tests'
66
60
  Maintainer: Charles Tapley Hoyt
67
61
  Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
68
62
  Requires-Python: >=3.10
@@ -71,10 +65,8 @@ Project-URL: Documentation, https://pyobo.readthedocs.io
71
65
  Project-URL: Funding, https://github.com/sponsors/cthoyt
72
66
  Project-URL: Homepage, https://github.com/biopragmatics/pyobo
73
67
  Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
74
- Provides-Extra: docs
75
68
  Provides-Extra: gilda
76
69
  Provides-Extra: gilda-slim
77
- Provides-Extra: tests
78
70
  Description-Content-Type: text/markdown
79
71
 
80
72
  <!--
@@ -120,14 +112,7 @@ identifiers. It also means all identifiers are strings, no exceptions.
120
112
 
121
113
  Note! The first time you run these, they have to download and cache all
122
114
  resources. We're not in the business of redistributing data, so all scripts
123
- should be completely reproducible. There's some AWS tools for
124
- hosting/downloading pre-compiled versions in `pyobo.aws` if you don't have time
125
- for that.
126
-
127
- Note! PyOBO can perform grounding in a limited number of cases, but it is _not_
128
- a general solution for named entity recognition (NER) or grounding. It's
129
- suggested to check `Gilda <https://github.com/indralab/gilda>`\_ for a
130
- no-nonsense solution.
115
+ should be completely reproducible.
131
116
 
132
117
  ### Mapping Identifiers and CURIEs
133
118
 
@@ -136,19 +121,11 @@ Get mapping of ChEBI identifiers to names:
136
121
  ```python
137
122
  import pyobo
138
123
 
139
- chebi_id_to_name = pyobo.get_id_name_mapping('chebi')
124
+ chebi_id_to_name = pyobo.get_id_name_mapping("chebi")
125
+ assert "fluazifop-P-butyl" == chebi_id_to_name["132964"]
140
126
 
141
- name = chebi_id_to_name['132964']
142
- assert name == 'fluazifop-P-butyl'
143
- ```
144
-
145
- Or, you don't have time for two lines:
146
-
147
- ```python
148
- import pyobo
149
-
150
- name = pyobo.get_name('chebi', '132964')
151
- assert name == 'fluazifop-P-butyl'
127
+ # or more directly
128
+ assert "fluazifop-P-butyl" == pyobo.get_name("chebi", "132964")
152
129
  ```
153
130
 
154
131
  Get reverse mapping of ChEBI names to identifiers:
@@ -156,10 +133,8 @@ Get reverse mapping of ChEBI names to identifiers:
156
133
  ```python
157
134
  import pyobo
158
135
 
159
- chebi_name_to_id = pyobo.get_name_id_mapping('chebi')
160
-
161
- identifier = chebi_name_to_id['fluazifop-P-butyl']
162
- assert identifier == '132964'
136
+ chebi_name_to_id = pyobo.get_name_id_mapping("chebi")
137
+ assert "132964" == chebi_name_to_id["fluazifop-P-butyl"]
163
138
  ```
164
139
 
165
140
  Maybe you live in CURIE world and just want to normalize something like
@@ -168,8 +143,7 @@ Maybe you live in CURIE world and just want to normalize something like
168
143
  ```python
169
144
  import pyobo
170
145
 
171
- name = pyobo.get_name_by_curie('CHEBI:132964')
172
- assert name == 'fluazifop-P-butyl'
146
+ assert "fluazifop-P-butyl" == pyobo.get_name_by_curie("CHEBI:132964")
173
147
  ```
174
148
 
175
149
  Sometimes you accidentally got an old CURIE. It can be mapped to the more recent
@@ -181,11 +155,11 @@ from pyobo import Reference
181
155
 
182
156
  # Look up DNA-binding transcription factor activity (go:0003700)
183
157
  # based on an old id
184
- primary_curie = pyobo.get_primary_curie('go:0001071')
185
- assert primary_curie == 'go:0003700'
158
+ primary_curie = pyobo.get_primary_curie("go:0001071")
159
+ assert primary_curie == "go:0003700"
186
160
 
187
161
  # If it's already the primary, it just gets returned
188
- assert Reference.from_curie('go:0003700') == pyobo.get_primary_curie('go:0003700')
162
+ assert Reference.from_curie("go:0003700") == pyobo.get_primary_curie("go:0003700")
189
163
  ```
190
164
 
191
165
  ### Mapping Species
@@ -196,11 +170,10 @@ WikiPathway identifiers to species (as NCBI taxonomy identifiers):
196
170
  ```python
197
171
  import pyobo
198
172
 
199
- wikipathways_id_to_species = pyobo.get_id_species_mapping('wikipathways')
173
+ wikipathways_id_to_species = pyobo.get_id_species_mapping("wikipathways")
200
174
 
201
175
  # Apoptosis (Homo sapiens)
202
- taxonomy_id = wikipathways_id_to_species['WP254']
203
- assert taxonomy_id == '9606'
176
+ assert "9606" == wikipathways_id_to_species["WP254"]
204
177
  ```
205
178
 
206
179
  Or, you don't have time for two lines:
@@ -209,8 +182,8 @@ Or, you don't have time for two lines:
209
182
  import pyobo
210
183
 
211
184
  # Apoptosis (Homo sapiens)
212
- taxonomy_id = pyobo.get_species('wikipathways', 'WP254')
213
- assert taxonomy_id == '9606'
185
+ taxonomy_id = pyobo.get_species("wikipathways", "WP254")
186
+ assert taxonomy_id == "9606"
214
187
  ```
215
188
 
216
189
  ### Grounding
@@ -222,13 +195,13 @@ it up and its preferred label.
222
195
  ```python
223
196
  import pyobo
224
197
 
225
- reference = pyobo.ground('chebi', 'Fusilade II')
226
- assert reference.prefix == 'chebi'
227
- assert reference.identifier == '132964'
228
- assert reference.name == 'fluazifop-P-butyl'
198
+ reference = pyobo.ground("chebi", "Fusilade II")
199
+ assert reference.prefix == "chebi"
200
+ assert reference.identifier == "132964"
201
+ assert reference.name == "fluazifop-P-butyl"
229
202
 
230
203
  # When failure happens...
231
- reference = pyobo.ground('chebi', 'Definitely not a real name')
204
+ reference = pyobo.ground("chebi", "Definitely not a real name")
232
205
  assert reference is None
233
206
  ```
234
207
 
@@ -240,10 +213,10 @@ false positives in case of conflicts):
240
213
  import pyobo
241
214
 
242
215
  # looking for phenotypes/pathways
243
- reference = pyobo.ground(['efo', 'go'], 'ERAD')
244
- assert reference.prefix == 'go'
245
- assert reference.identifier == '0030433'
246
- assert reference.name == 'ubiquitin-dependent ERAD pathway'
216
+ reference = pyobo.ground(["efo", "go"], "ERAD")
217
+ assert reference.prefix == "go"
218
+ assert reference.identifier == "0030433"
219
+ assert reference.name == "ubiquitin-dependent ERAD pathway"
247
220
  ```
248
221
 
249
222
  ### Cross-referencing
@@ -253,10 +226,10 @@ Get xrefs from ChEBI to PubChem:
253
226
  ```python
254
227
  import pyobo
255
228
 
256
- chebi_id_to_pubchem_compound_id = pyobo.get_filtered_xrefs('chebi', 'pubchem.compound')
229
+ chebi_id_to_pubchem_compound_id = pyobo.get_filtered_xrefs("chebi", "pubchem.compound")
257
230
 
258
- pubchem_compound_id = chebi_id_to_pubchem_compound_id['132964']
259
- assert pubchem_compound_id == '3033674'
231
+ pubchem_compound_id = chebi_id_to_pubchem_compound_id["132964"]
232
+ assert pubchem_compound_id == "3033674"
260
233
  ```
261
234
 
262
235
  If you don't have time for two lines:
@@ -264,8 +237,8 @@ If you don't have time for two lines:
264
237
  ```python
265
238
  import pyobo
266
239
 
267
- pubchem_compound_id = pyobo.get_xref('chebi', '132964', 'pubchem.compound')
268
- assert pubchem_compound_id == '3033674'
240
+ pubchem_compound_id = pyobo.get_xref("chebi", "132964", "pubchem.compound")
241
+ assert pubchem_compound_id == "3033674"
269
242
  ```
270
243
 
271
244
  Get xrefs from Entrez to HGNC, but they're only available through HGNC, so you
@@ -274,13 +247,13 @@ need to flip them:
274
247
  ```python
275
248
  import pyobo
276
249
 
277
- hgnc_id_to_ncbigene_id = pyobo.get_filtered_xrefs('hgnc', 'ncbigene')
250
+ hgnc_id_to_ncbigene_id = pyobo.get_filtered_xrefs("hgnc", "ncbigene")
278
251
  ncbigene_id_to_hgnc_id = {
279
252
  ncbigene_id: hgnc_id
280
253
  for hgnc_id, ncbigene_id in hgnc_id_to_ncbigene_id.items()
281
254
  }
282
- mapt_hgnc = ncbigene_id_to_hgnc_id['4137']
283
- assert mapt_hgnc == '6893'
255
+ mapt_hgnc = ncbigene_id_to_hgnc_id["4137"]
256
+ assert mapt_hgnc == "6893"
284
257
  ```
285
258
 
286
259
  Since this is a common pattern, there's a keyword argument `flip` that does this
@@ -289,9 +262,9 @@ for you:
289
262
  ```python
290
263
  import pyobo
291
264
 
292
- ncbigene_id_to_hgnc_id = pyobo.get_filtered_xrefs('hgnc', 'ncbigene', flip=True)
293
- mapt_hgnc_id = ncbigene_id_to_hgnc_id['4137']
294
- assert mapt_hgnc_id == '6893'
265
+ ncbigene_id_to_hgnc_id = pyobo.get_filtered_xrefs("hgnc", "ncbigene", flip=True)
266
+ mapt_hgnc_id = ncbigene_id_to_hgnc_id["4137"]
267
+ assert mapt_hgnc_id == "6893"
295
268
  ```
296
269
 
297
270
  If you don't have time for two lines (I admit this one is a bit confusing) and
@@ -300,8 +273,8 @@ need to flip it:
300
273
  ```python
301
274
  import pyobo
302
275
 
303
- hgnc_id = pyobo.get_xref('hgnc', '4137', 'ncbigene', flip=True)
304
- assert hgnc_id == '6893'
276
+ hgnc_id = pyobo.get_xref("hgnc", "4137", "ncbigene", flip=True)
277
+ assert hgnc_id == "6893"
305
278
  ```
306
279
 
307
280
  ### Properties
@@ -313,11 +286,11 @@ basis.
313
286
  import pyobo
314
287
 
315
288
  # I don't make the rules. I wouldn't have chosen this as the key for this property. It could be any string
316
- chebi_smiles_property = 'http://purl.obolibrary.org/obo/chebi/smiles'
317
- chebi_id_to_smiles = pyobo.get_filtered_properties_mapping('chebi', chebi_smiles_property)
289
+ chebi_smiles_property = "http://purl.obolibrary.org/obo/chebi/smiles"
290
+ chebi_id_to_smiles = pyobo.get_filtered_properties_mapping("chebi", chebi_smiles_property)
318
291
 
319
- smiles = chebi_id_to_smiles['132964']
320
- assert smiles == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
292
+ smiles = chebi_id_to_smiles["132964"]
293
+ assert smiles == "C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F"
321
294
  ```
322
295
 
323
296
  If you don't have time for two lines:
@@ -325,8 +298,8 @@ If you don't have time for two lines:
325
298
  ```python
326
299
  import pyobo
327
300
 
328
- smiles = pyobo.get_property('chebi', '132964', 'http://purl.obolibrary.org/obo/chebi/smiles')
329
- assert smiles == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
301
+ smiles = pyobo.get_property("chebi", "132964", "http://purl.obolibrary.org/obo/chebi/smiles")
302
+ assert smiles == "C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F"
330
303
  ```
331
304
 
332
305
  ### Hierarchy
@@ -338,12 +311,12 @@ import pyobo
338
311
  from pyobo import Reference
339
312
 
340
313
  # check that go:0008219 ! cell death is an ancestor of go:0006915 ! apoptotic process
341
- assert Reference.from_curie('go:0008219') in pyobo.get_ancestors('go', '0006915')
314
+ assert Reference.from_curie("go:0008219") in pyobo.get_ancestors("go", "0006915")
342
315
 
343
316
  # check that go:0070246 ! natural killer cell apoptotic process is a
344
317
  # descendant of go:0006915 ! apoptotic process
345
- apopototic_process_descendants = pyobo.get_descendants('go', '0006915')
346
- assert Reference.from_curie('go:0070246') in apopototic_process_descendants
318
+ apopototic_process_descendants = pyobo.get_descendants("go", "0006915")
319
+ assert Reference.from_curie("go:0070246") in apopototic_process_descendants
347
320
  ```
348
321
 
349
322
  Get the sub-hierarchy below a given node:
@@ -353,11 +326,11 @@ import pyobo
353
326
  from pyobo import Reference
354
327
 
355
328
  # get the descendant graph of go:0006915 ! apoptotic process
356
- apopototic_process_subhierarchy = pyobo.get_subhierarchy('go', '0006915')
329
+ apopototic_process_subhierarchy = pyobo.get_subhierarchy("go", "0006915")
357
330
 
358
331
  # check that go:0070246 ! natural killer cell apoptotic process is a
359
332
  # descendant of go:0006915 ! apoptotic process through the subhierarchy
360
- assert Reference.from_curie('go:0070246') in apopototic_process_subhierarchy
333
+ assert Reference.from_curie("go:0070246") in apopototic_process_subhierarchy
361
334
  ```
362
335
 
363
336
  Get a hierarchy with properties preloaded in the node data dictionaries:
@@ -366,12 +339,12 @@ Get a hierarchy with properties preloaded in the node data dictionaries:
366
339
  import pyobo
367
340
  from pyobo import Reference
368
341
 
369
- prop = 'http://purl.obolibrary.org/obo/chebi/smiles'
370
- chebi_hierarchy = pyobo.get_hierarchy('chebi', properties=[prop])
342
+ prop = "http://purl.obolibrary.org/obo/chebi/smiles"
343
+ chebi_hierarchy = pyobo.get_hierarchy("chebi", properties=[prop])
371
344
 
372
- assert Reference.from_curie('chebi:132964') in chebi_hierarchy
373
- assert prop in chebi_hierarchy.nodes['chebi:132964']
374
- assert chebi_hierarchy.nodes['chebi:132964'][prop] == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
345
+ assert Reference.from_curie("chebi:132964") in chebi_hierarchy
346
+ assert prop in chebi_hierarchy.nodes["chebi:132964"]
347
+ assert chebi_hierarchy.nodes["chebi:132964"][prop] == "C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F"
375
348
  ```
376
349
 
377
350
  ### Relations
@@ -381,9 +354,9 @@ way)
381
354
 
382
355
  ```python
383
356
  >>> import pyobo
384
- >>> human_mapt_hgnc_id = '6893'
385
- >>> mouse_mapt_mgi_id = '97180'
386
- >>> hgnc_mgi_orthology_mapping = pyobo.get_relation_mapping('hgnc', 'ro:HOM0000017', 'mgi')
357
+ >>> human_mapt_hgnc_id = "6893"
358
+ >>> mouse_mapt_mgi_id = "97180"
359
+ >>> hgnc_mgi_orthology_mapping = pyobo.get_relation_mapping("hgnc", "ro:HOM0000017", "mgi")
387
360
  >>> assert mouse_mapt_mgi_id == hgnc_mgi_orthology_mapping[human_mapt_hgnc_id]
388
361
  ```
389
362
 
@@ -392,9 +365,9 @@ If you want to do it in one line, use:
392
365
  ```python
393
366
 
394
367
  >>> import pyobo
395
- >>> human_mapt_hgnc_id = '6893'
396
- >>> mouse_mapt_mgi_id = '97180'
397
- >>> assert mouse_mapt_mgi_id == pyobo.get_relation('hgnc', 'ro:HOM0000017', 'mgi', human_mapt_hgnc_id)
368
+ >>> human_mapt_hgnc_id = "6893"
369
+ >>> mouse_mapt_mgi_id = "97180"
370
+ >>> assert mouse_mapt_mgi_id == pyobo.get_relation("hgnc", "ro:HOM0000017", "mgi", human_mapt_hgnc_id)
398
371
  ```
399
372
 
400
373
  ### Writings Tests that Use PyOBO
@@ -410,8 +383,8 @@ import pyobo
410
383
  from pyobo.mocks import get_mock_id_name_mapping
411
384
 
412
385
  mock_id_name_mapping = get_mock_id_name_mapping({
413
- 'chebi': {
414
- '132964': 'fluazifop-P-butyl',
386
+ "chebi": {
387
+ "132964": "fluazifop-P-butyl",
415
388
  },
416
389
  })
417
390
 
@@ -419,33 +392,21 @@ class MyTestCase(unittest.TestCase):
419
392
  def my_test(self):
420
393
  with mock_id_name_mapping:
421
394
  # use functions directly, or use your functions that wrap them
422
- pyobo.get_name('chebi', '1234')
395
+ pyobo.get_name("chebi", "1234")
423
396
  ```
424
397
 
425
- ## Curation of the Bioregistry
398
+ ## Preprocessing CURIEs, URIs, and unqualified identifiers
426
399
 
427
400
  In order to normalize references and identify resources, PyOBO uses the
428
401
  [Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
429
402
  of PyOBO, but has since been externalized for more general reuse.
430
403
 
431
404
  At
432
- [src/pyobo/registries/metaregistry.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/registries/metaregistry.json)
433
- is the curated "metaregistry". This is a source of information that contains all
434
- sorts of fixes for missing/wrong information in MIRIAM, OLS, and OBO Foundry;
435
- entries that don't appear in any of them; additional synonym information for
436
- each namespace/prefix; rules for normalizing xrefs and CURIEs, etc.
437
-
438
- Other entries in the metaregistry:
439
-
440
- - The `"remappings"->"full"` entry is a dictionary from strings that might
441
- follow `xref:` in a given OBO file that need to be completely replaced, due to
442
- incorrect formatting
443
- - The `"remappings"->"prefix"` entry contains a dictionary of prefixes for xrefs
444
- that need to be remapped. Several rules, for example, remove superfluous
445
- spaces that occur inside CURIEs or and others address instances of the GOGO
446
- issue.
447
- - The `"blacklists"` entry contains rules for throwing out malformed xrefs based
448
- on full string, just prefix, or just suffix.
405
+ [src/pyobo/identifier_utils/preprocessing.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/src/pyobo/identifier_utils/preprocessing.json)
406
+ is the curated set of pre-processing rules. These are used in combination with
407
+ the `curies` package to do pre-processing steps on CURIEs, URIs, and unqualified
408
+ identifiers beyond what is possible with the Bioregistry. See
409
+ https://curies.readthedocs.io/en/latest/preprocessing.html.
449
410
 
450
411
  ## Troubleshooting
451
412