orfdata 0.28.0__tar.gz → 0.29.0__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 (242) hide show
  1. {orfdata-0.28.0 → orfdata-0.29.0}/MANIFEST.in +2 -0
  2. {orfdata-0.28.0/orfdata.egg-info → orfdata-0.29.0}/PKG-INFO +10 -1
  3. {orfdata-0.28.0 → orfdata-0.29.0}/README.md +7 -0
  4. orfdata-0.29.0/docs/viral.md +45 -0
  5. {orfdata-0.28.0 → orfdata-0.29.0}/mkdocs.yml +1 -0
  6. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/__init__.py +3 -0
  7. orfdata-0.29.0/orfdata/data/viral/NOTICE.md +31 -0
  8. orfdata-0.29.0/orfdata/data/viral/hpv16-refseq-CDS.json.gz +0 -0
  9. orfdata-0.29.0/orfdata/version.py +1 -0
  10. orfdata-0.29.0/orfdata/viral.py +111 -0
  11. {orfdata-0.28.0 → orfdata-0.29.0/orfdata.egg-info}/PKG-INFO +10 -1
  12. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata.egg-info/SOURCES.txt +9 -1
  13. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata.egg-info/requires.txt +2 -0
  14. {orfdata-0.28.0 → orfdata-0.29.0}/pyproject.toml +3 -3
  15. orfdata-0.29.0/tests/data/viral/NC_001526.4.gb.gz +0 -0
  16. orfdata-0.29.0/tests/test_viral.py +110 -0
  17. orfdata-0.29.0/tools/__init__.py +1 -0
  18. orfdata-0.29.0/tools/build_hpv16_cds.py +89 -0
  19. orfdata-0.28.0/orfdata/version.py +0 -1
  20. {orfdata-0.28.0 → orfdata-0.29.0}/LICENSE +0 -0
  21. {orfdata-0.28.0 → orfdata-0.29.0}/deploy.sh +0 -0
  22. {orfdata-0.28.0 → orfdata-0.29.0}/docs/catalogs.md +0 -0
  23. {orfdata-0.28.0 → orfdata-0.29.0}/docs/copy-yeast.md +0 -0
  24. {orfdata-0.28.0 → orfdata-0.29.0}/docs/coverage.md +0 -0
  25. {orfdata-0.28.0 → orfdata-0.29.0}/docs/examples.md +0 -0
  26. {orfdata-0.28.0 → orfdata-0.29.0}/docs/human-tissue.md +0 -0
  27. {orfdata-0.28.0 → orfdata-0.29.0}/docs/index.md +0 -0
  28. {orfdata-0.28.0 → orfdata-0.29.0}/docs/ingolia-yeast.md +0 -0
  29. {orfdata-0.28.0 → orfdata-0.29.0}/docs/measurements.md +0 -0
  30. {orfdata-0.28.0 → orfdata-0.29.0}/docs/pairing.md +0 -0
  31. {orfdata-0.28.0 → orfdata-0.29.0}/docs/pfizer-protein.md +0 -0
  32. {orfdata-0.28.0 → orfdata-0.29.0}/docs/pfizer-rna.md +0 -0
  33. {orfdata-0.28.0 → orfdata-0.29.0}/docs/proteome.md +0 -0
  34. {orfdata-0.28.0 → orfdata-0.29.0}/docs/reference.md +0 -0
  35. {orfdata-0.28.0 → orfdata-0.29.0}/docs/search-references.md +0 -0
  36. {orfdata-0.28.0 → orfdata-0.29.0}/docs/source-references.md +0 -0
  37. {orfdata-0.28.0 → orfdata-0.29.0}/docs/species.md +0 -0
  38. {orfdata-0.28.0 → orfdata-0.29.0}/docs/storage.md +0 -0
  39. {orfdata-0.28.0 → orfdata-0.29.0}/docs/stylesheets/docs.css +0 -0
  40. {orfdata-0.28.0 → orfdata-0.29.0}/docs.sh +0 -0
  41. {orfdata-0.28.0 → orfdata-0.29.0}/lint.sh +0 -0
  42. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/_pinned_genome.py +0 -0
  43. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/_structure.py +0 -0
  44. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/build.py +0 -0
  45. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/catalog.py +0 -0
  46. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/catalog_cli.py +0 -0
  47. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/catalog_manifest.py +0 -0
  48. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/catalogs.py +0 -0
  49. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/cli.py +0 -0
  50. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/catalogs.json +0 -0
  51. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/chains.json +0 -0
  52. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/datasets.json +0 -0
  53. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/genomes.json +0 -0
  54. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/ires/rfam-15.1-human-ires.json +0 -0
  55. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/orf-evidence/AUTHOR-LICENSE.txt +0 -0
  56. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/orf-evidence/NOTICE.txt +0 -0
  57. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/orf-evidence/catalog.json.gz +0 -0
  58. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/orf-evidence/manifest.json +0 -0
  59. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/uorf-evidence/AUTHOR-LICENSE.txt +0 -0
  60. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/uorf-evidence/NOTICE.txt +0 -0
  61. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/uorf-evidence/catalog.json.gz +0 -0
  62. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/data/uorf-evidence/manifest.json +0 -0
  63. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/dataset.py +0 -0
  64. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/dataset_cli.py +0 -0
  65. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/datasets.py +0 -0
  66. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/evidence.py +0 -0
  67. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/evidence_summary.py +0 -0
  68. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/genomes.py +0 -0
  69. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/genomes_cli.py +0 -0
  70. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/initiation_context.py +0 -0
  71. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/install.py +0 -0
  72. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/liftover.py +0 -0
  73. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/liftover_cli.py +0 -0
  74. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/measurements.py +0 -0
  75. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/model.py +0 -0
  76. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/pairing.py +0 -0
  77. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/proteome.py +0 -0
  78. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/proteome_cli.py +0 -0
  79. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/reference.py +0 -0
  80. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/reference_mapping.py +0 -0
  81. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/rna.py +0 -0
  82. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/search_reference.py +0 -0
  83. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sequence.py +0 -0
  84. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/__init__.py +0 -0
  85. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/copy.py +0 -0
  86. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/ingolia.py +0 -0
  87. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/ncorf_mammals.py +0 -0
  88. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/openprot.py +0 -0
  89. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/pfizer.py +0 -0
  90. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/pfizer_rna.py +0 -0
  91. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/riborf.py +0 -0
  92. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata/sources/wang.py +0 -0
  93. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata.egg-info/dependency_links.txt +0 -0
  94. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata.egg-info/entry_points.txt +0 -0
  95. {orfdata-0.28.0 → orfdata-0.29.0}/orfdata.egg-info/top_level.txt +0 -0
  96. {orfdata-0.28.0 → orfdata-0.29.0}/setup.cfg +0 -0
  97. {orfdata-0.28.0 → orfdata-0.29.0}/test.sh +0 -0
  98. {orfdata-0.28.0 → orfdata-0.29.0}/tests/conftest.py +0 -0
  99. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/aggregate_evidence.json +0 -0
  100. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905474.soft +0 -0
  101. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905474_KL9_fpkm.txt.gz +0 -0
  102. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905476.soft +0 -0
  103. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905476_KL10_fpkm.txt.gz +0 -0
  104. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905478.soft +0 -0
  105. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905478_KL11_fpkm.txt.gz +0 -0
  106. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905479.soft +0 -0
  107. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/GSM1905479_KL12_fpkm.txt.gz +0 -0
  108. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/NOTICE.md +0 -0
  109. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/expected.json +0 -0
  110. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/geo-series.soft +0 -0
  111. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/manifest.json +0 -0
  112. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/methods.pdf +0 -0
  113. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/paper.xml +0 -0
  114. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/pmc-metadata.json +0 -0
  115. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/qconcat.fasta +0 -0
  116. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/copy/workbook.xlsx +0 -0
  117. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346111.metadata.txt +0 -0
  118. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346111.quant.txt.gz +0 -0
  119. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346114.metadata.txt +0 -0
  120. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346114.quant.txt.gz +0 -0
  121. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346115.metadata.txt +0 -0
  122. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346115.quant.txt.gz +0 -0
  123. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346116.metadata.txt +0 -0
  124. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346116.quant.txt.gz +0 -0
  125. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346117.metadata.txt +0 -0
  126. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346117.quant.txt.gz +0 -0
  127. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346118.metadata.txt +0 -0
  128. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346118.quant.txt.gz +0 -0
  129. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346120.metadata.txt +0 -0
  130. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346120.quant.txt.gz +0 -0
  131. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346122.metadata.txt +0 -0
  132. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/GSM346122.quant.txt.gz +0 -0
  133. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/NOTICE.md +0 -0
  134. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/expected.json +0 -0
  135. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/manifest.json +0 -0
  136. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ingolia/readMe.txt.gz +0 -0
  137. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/README.md +0 -0
  138. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/S3.xlsx +0 -0
  139. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/ensembl107.cdna.fa.gz +0 -0
  140. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/ensembl107.gtf.gz +0 -0
  141. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/mouse.bed +0 -0
  142. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/ncorf_mammals/mouse.pep.fa +0 -0
  143. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/README.md +0 -0
  144. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/ensembl106.cdna.fa.gz +0 -0
  145. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/ensembl106.gtf.gz +0 -0
  146. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.bed.zip +0 -0
  147. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.fasta.zip +0 -0
  148. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.tsv.zip +0 -0
  149. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/NOTICE.md +0 -0
  150. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/dog/expected.json +0 -0
  151. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/dog/manifest.json +0 -0
  152. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/dog/protein.tsv +0 -0
  153. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/dog/search.fasta +0 -0
  154. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/human/expected.json +0 -0
  155. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/human/manifest.json +0 -0
  156. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/human/protein.tsv +0 -0
  157. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/human/search.fasta +0 -0
  158. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/mouse/expected.json +0 -0
  159. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/mouse/manifest.json +0 -0
  160. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/mouse/protein.tsv +0 -0
  161. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer/mouse/search.fasta +0 -0
  162. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/GSE325522_family.soft.gz +0 -0
  163. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/GSE325523_family.soft.gz +0 -0
  164. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/GSE325525_family.soft.gz +0 -0
  165. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/NOTICE.md +0 -0
  166. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/counts.csv.gz +0 -0
  167. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/dog-annotation.gtf.gz +0 -0
  168. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/dog-expected.json +0 -0
  169. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/dog-manifest.json +0 -0
  170. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/mouse-annotation.gtf.gz +0 -0
  171. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/mouse-expected.json +0 -0
  172. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/mouse-manifest.json +0 -0
  173. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/pfizer_rna/samples.xlsx +0 -0
  174. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/README.md +0 -0
  175. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/canis_lupus_familiaris.json +0 -0
  176. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/context-keys-v0.4.json +0 -0
  177. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/ensembl115.json +0 -0
  178. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/homo_sapiens.json +0 -0
  179. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/mitochondrial.json +0 -0
  180. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/mus_musculus.json +0 -0
  181. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/saccharomyces_cerevisiae.json +0 -0
  182. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/references/uniprot_literature.json +0 -0
  183. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/regions/NOTICE.md +0 -0
  184. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/regions/ingolia.json +0 -0
  185. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/riborf/README.md +0 -0
  186. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/riborf/SD3.xlsx +0 -0
  187. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/riborf/ensembl107.cdna.fa.gz +0 -0
  188. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/riborf/ensembl107.gtf.gz +0 -0
  189. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/riborf/ensembl107.ncrna.fa.gz +0 -0
  190. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/search_reference/NOTICE.md +0 -0
  191. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/search_reference/dog.fasta +0 -0
  192. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/search_reference/ensembl83-expected.json +0 -0
  193. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/search_reference/ensembl83-human.fasta.gz +0 -0
  194. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/search_reference/expected.json +0 -0
  195. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/README.md +0 -0
  196. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/generate.py +0 -0
  197. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v1.json +0 -0
  198. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v1.sqlite +0 -0
  199. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v2.json +0 -0
  200. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v2.sqlite +0 -0
  201. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v3.json +0 -0
  202. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/storage/v3.sqlite +0 -0
  203. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/NOTICE.md +0 -0
  204. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/annotation.gtf.gz +0 -0
  205. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/copies.zip +0 -0
  206. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/expected.json +0 -0
  207. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/manifest.json +0 -0
  208. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/protein.zip +0 -0
  209. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/rna.zip +0 -0
  210. {orfdata-0.28.0 → orfdata-0.29.0}/tests/data/wang/search.fasta.gz +0 -0
  211. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_catalog_registry.py +0 -0
  212. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_copy.py +0 -0
  213. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_cross_reference_pairing.py +0 -0
  214. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_ensembl_search_reference.py +0 -0
  215. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_evidence_rules.py +0 -0
  216. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_evidence_summary.py +0 -0
  217. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_genetic_codes.py +0 -0
  218. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_genomes.py +0 -0
  219. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_ingolia.py +0 -0
  220. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_initiation_context.py +0 -0
  221. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_liftover.py +0 -0
  222. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_local_build_queries.py +0 -0
  223. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_measurements.py +0 -0
  224. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_merge_catalogs.py +0 -0
  225. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_ncorf_mammals.py +0 -0
  226. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_openprot.py +0 -0
  227. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_orf_cases.py +0 -0
  228. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_paired_selectors.py +0 -0
  229. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_pairing.py +0 -0
  230. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_pfizer.py +0 -0
  231. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_pfizer_rna.py +0 -0
  232. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_proteome.py +0 -0
  233. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_reference_context.py +0 -0
  234. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_reference_mapping.py +0 -0
  235. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_reference_orf.py +0 -0
  236. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_region_targets.py +0 -0
  237. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_riborf.py +0 -0
  238. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_search_reference.py +0 -0
  239. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_selectors.py +0 -0
  240. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_storage.py +0 -0
  241. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_uorf_catalog.py +0 -0
  242. {orfdata-0.28.0 → orfdata-0.29.0}/tests/test_wang.py +0 -0
@@ -1,4 +1,6 @@
1
1
  include lint.sh test.sh deploy.sh docs.sh mkdocs.yml
2
+ recursive-include tools *.py
3
+ recursive-include tests/data/viral *.gz
2
4
  recursive-include docs *.md *.css
3
5
  recursive-include tests *.py *.json *.md *.tsv *.fasta
4
6
  recursive-include tests/data/copy *.xlsx *.gz *.soft *.xml *.pdf
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orfdata
3
- Version: 0.28.0
3
+ Version: 0.29.0
4
4
  Summary: Reference proteomes with evidence-backed noncanonical ORFs on PyEnsembl genomes
5
5
  Author: OpenVax
6
6
  License-Expression: Apache-2.0
@@ -11,6 +11,7 @@ Provides-Extra: pyensembl
11
11
  Requires-Dist: pyensembl>=2.27.2; extra == "pyensembl"
12
12
  Provides-Extra: build-data
13
13
  Requires-Dist: openpyxl>=3.1; extra == "build-data"
14
+ Requires-Dist: biopython<2,>=1.80; extra == "build-data"
14
15
  Provides-Extra: data
15
16
  Requires-Dist: datacache<2,>=1.25.1; extra == "data"
16
17
  Provides-Extra: columnar
@@ -21,6 +22,7 @@ Requires-Dist: ruff; extra == "dev"
21
22
  Requires-Dist: build; extra == "dev"
22
23
  Requires-Dist: twine; extra == "dev"
23
24
  Requires-Dist: openpyxl>=3.1; extra == "dev"
25
+ Requires-Dist: biopython<2,>=1.80; extra == "dev"
24
26
  Requires-Dist: pyensembl>=2.27.2; extra == "dev"
25
27
  Requires-Dist: datacache<2,>=1.25.1; extra == "dev"
26
28
  Provides-Extra: docs
@@ -102,6 +104,13 @@ Human evidence is never transferred to another species. Viral proteomes can be a
102
104
  orfdata also provides [RNA, ribosome and protein measurements](https://openvax.github.io/orfdata/measurements/)
103
105
  for human, mouse, dog and yeast.
104
106
 
107
+ `viral_orfs(reference_dna, contig="HPV16")` loads source-defined viral CDSs as
108
+ existing RNA/ORF models, offline and qualified by exact reference sequence.
109
+ The first [coding reference](https://openvax.github.io/orfdata/viral/) contains
110
+ the nine RefSeq NC_001526.4 HPV16 CDSs, with native and GDC placements;
111
+ `viral_references()` lists the available identities and coverage. Broader
112
+ imports remain in [the viral roadmap](https://github.com/openvax/orfdata/issues/91).
113
+
105
114
  ## Measurement datasets
106
115
 
107
116
  RNA, ribosome and protein measurements are separate, downloadable datasets with
@@ -72,6 +72,13 @@ Human evidence is never transferred to another species. Viral proteomes can be a
72
72
  orfdata also provides [RNA, ribosome and protein measurements](https://openvax.github.io/orfdata/measurements/)
73
73
  for human, mouse, dog and yeast.
74
74
 
75
+ `viral_orfs(reference_dna, contig="HPV16")` loads source-defined viral CDSs as
76
+ existing RNA/ORF models, offline and qualified by exact reference sequence.
77
+ The first [coding reference](https://openvax.github.io/orfdata/viral/) contains
78
+ the nine RefSeq NC_001526.4 HPV16 CDSs, with native and GDC placements;
79
+ `viral_references()` lists the available identities and coverage. Broader
80
+ imports remain in [the viral roadmap](https://github.com/openvax/orfdata/issues/91).
81
+
75
82
  ## Measurement datasets
76
83
 
77
84
  RNA, ribosome and protein measurements are separate, downloadable datasets with
@@ -0,0 +1,45 @@
1
+ # Viral coding references
2
+
3
+ `viral_orfs()` returns existing `TranscriptORF` objects for source-annotated
4
+ viral CDSs. Supply the complete reference DNA that the RNA was aligned to:
5
+
6
+ ```python
7
+ from orfdata import viral_orfs, viral_references
8
+
9
+ print([(r["id"], r["coding_models"]) for r in viral_references()])
10
+ # [('NC_001526.4', 9), ('GRCh38.d1.vd1:HPV16', 9)]
11
+
12
+ orfs = viral_orfs(reference_dna, contig="HPV16")
13
+ for orf in orfs:
14
+ print(orf.orf_id, orf.gene_name, orf.coding_blocks, orf.protein_sequence)
15
+ ```
16
+
17
+ The small bundled catalogue loads offline without PyEnsembl, Biopython or a
18
+ human genome. Its nine HPV16 CDSs come from RefSeq NC_001526.4. The loader
19
+ requires an exact full-DNA hash and separately qualifies native and GDC
20
+ circular rotations. A contig name or related strain is insufficient.
21
+ An unavailable reference raises `ValueError`, distinct from a valid empty query.
22
+ `viral_references()` exposes exact identities, coding coverage, source pins
23
+ and product names without loading other data.
24
+
25
+ Each model uses a `SourceRNA` containing only the available CDS, including
26
+ ordered splice blocks. Full transcript ends are not asserted. The existing
27
+ `TranscriptORF.at()` validates its source protein and coding boundaries.
28
+ These models have `orf_type="reference_CDS"`. Their internal kind `extra_orf`
29
+ describes a source-defined ORF outside a loaded PyEnsembl annotation, not a
30
+ claim that a RefSeq CDS is biologically noncanonical. No Ribo-seq or MS
31
+ support is inferred from the reference annotation.
32
+
33
+ The nine annotations are not an exhaustive HPV16 ORF catalogue. Other HPV
34
+ types/lineages, EBV/KSHV, CMV, hepatitis viruses including HDV, HTLV-1/HIV,
35
+ and polyomaviruses remain explicit coverage work in
36
+ [issues #91–98](https://github.com/openvax/orfdata/issues/91).
37
+
38
+ Isovar owns reconstructed sample RNA and read evidence. It can use these
39
+ coding paths to anchor a frame on observed sequence, preserving variants
40
+ and incomplete starts/stops. ORFdata does not assemble sample RNA, replace
41
+ missing bases, infer protein abundance or establish viral tumor causality.
42
+ RNA and coding-reference matches are not direct protein evidence.
43
+
44
+ Source attribution and rebuilding instructions are in
45
+ [`orfdata/data/viral/NOTICE.md`](https://github.com/openvax/orfdata/blob/main/orfdata/data/viral/NOTICE.md).
@@ -21,6 +21,7 @@ nav:
21
21
  - Home: index.md
22
22
  - Proteomes:
23
23
  - Build a reference proteome: proteome.md
24
+ - Viral coding references: viral.md
24
25
  - Noncanonical ORFs:
25
26
  - ORFs and evidence: reference.md
26
27
  - Examples: examples.md
@@ -70,8 +70,11 @@ from .rna import IRES, ProteinProduct, RNAFeature, SourceRNA, products_from_unip
70
70
  from .search_reference import SearchMembership, SearchReference, SearchReferenceSpec, SearchSequence
71
71
  from .sequence import GeneticCode, genetic_code
72
72
  from .version import __version__
73
+ from .viral import viral_orfs, viral_references
73
74
 
74
75
  __all__ = [
76
+ "viral_orfs",
77
+ "viral_references",
75
78
  "__version__",
76
79
  "Proteome",
77
80
  "ProteomeEntry",
@@ -0,0 +1,31 @@
1
+ # HPV16 coding reference
2
+
3
+ Source: NCBI RefSeq **NC_001526.4**, complete GenBank record:
4
+ https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?id=NC_001526.4&db=nuccore&report=genbank&retmode=text
5
+
6
+ Source record SHA256:
7
+ `282be442f226cc809fefbda616ac136b8d20dfde23fad09558f3f653a3de96a4`.
8
+ Source authors and annotation provenance remain in the versioned record,
9
+ preserved as a compressed test fixture. NCBI database usage policies apply:
10
+ https://www.ncbi.nlm.nih.gov/home/about/policies/ . No endorsement is implied.
11
+
12
+ The catalogue contains nine source-annotated CDSs, including two joined paths.
13
+ It does not claim all reported HPV16 ORFs or complete transcript models.
14
+ RNA support does not establish translation or protein expression.
15
+
16
+ Native DNA MD5: `08d2b3849496d12cc45fd4df713d5c2f`.
17
+ GDC GRCh38.d1.vd1 HPV16 DNA MD5: `f2463721818c29998ef5ab917e6df74a`.
18
+ GDC DNA is the source circle rotated by 864 bases. Both placements retain
19
+ their own SHA256 and ordered, 1-based inclusive coding blocks.
20
+ GDC reference files: https://gdc.cancer.gov/about-data/gdc-data-processing/gdc-reference-files .
21
+
22
+ Rebuild with `orfdata[build-data]` installed:
23
+
24
+ ```sh
25
+ python tools/build_hpv16_cds.py tests/data/viral/NC_001526.4.gb.gz \
26
+ orfdata/data/viral/hpv16-refseq-CDS.json.gz
27
+ ```
28
+
29
+ The builder checks source DNA identity, the exact GDC rotation and all nine
30
+ source translations. The resource checksum is pinned in `orfdata/viral.py`.
31
+ Broader coverage: https://github.com/openvax/orfdata/issues/91 through 98.
@@ -0,0 +1 @@
1
+ __version__ = "0.29.0"
@@ -0,0 +1,111 @@
1
+ """Offline, sequence-qualified viral CDSs bound to the existing RNA/ORF models."""
2
+
3
+ import copy
4
+ import gzip
5
+ import hashlib
6
+ import json
7
+ from functools import lru_cache
8
+ from importlib.resources import files
9
+
10
+ from .model import TranscriptORF
11
+ from .reference import ReferenceContext
12
+ from .rna import SourceRNA
13
+
14
+ _CATALOG_SHA256 = "52ab8181b9d3f199dde3afabc8440ee9a8c912291c6425c99fb4225e29ad1a70"
15
+ _COMPLEMENT = str.maketrans("ACGT", "TGCA")
16
+
17
+
18
+ @lru_cache(maxsize=1)
19
+ def _catalog():
20
+ raw = files("orfdata").joinpath("data/viral/hpv16-refseq-CDS.json.gz").read_bytes()
21
+ if hashlib.sha256(raw).hexdigest() != _CATALOG_SHA256:
22
+ raise ValueError("Bundled viral CDS catalogue checksum mismatch")
23
+ data = json.loads(gzip.decompress(raw))
24
+ if data["schema"] != "orfdata.viral_cds.v1":
25
+ raise ValueError("Unsupported viral CDS catalogue schema")
26
+ return data
27
+
28
+
29
+ def viral_references():
30
+ """List released viral coding-reference identities, without network access.
31
+
32
+ Returns
33
+ -------
34
+ tuple of dict
35
+ Exact sequence hashes, accession/source pins, coding-model counts and
36
+ coverage scope. A listed reference is not a complete transcript or
37
+ exhaustive ORF catalogue. Returned dictionaries are independent copies.
38
+ """
39
+ data = _catalog()
40
+ return tuple(dict(**{key: copy.deepcopy(value) for key, value in row.items()
41
+ if key != "coding_blocks"},
42
+ coding_models=len(row["coding_blocks"]), scope=data["scope"],
43
+ catalogue_sha256=_CATALOG_SHA256,
44
+ products=[dict(protein_id=cds["protein_id"], gene=cds["gene"],
45
+ product=cds["product"]) for cds in data["cds"]])
46
+ for row in data["references"])
47
+
48
+
49
+ def viral_orfs(reference_sequence, *, contig=None):
50
+ """Load source-defined CDSs for one exactly matching viral DNA reference.
51
+
52
+ Parameters
53
+ ----------
54
+ reference_sequence : str
55
+ Complete forward reference DNA, not sample RNA. No annotation is
56
+ transferred to mismatching strains or by contig name alone.
57
+ contig : str, optional
58
+ The caller's name for this exact DNA in an alignment reference. The
59
+ original versioned source identity remains on every ORF's context.
60
+
61
+ Returns
62
+ -------
63
+ tuple of TranscriptORF
64
+ Source CDS fragments represented with SourceRNA and TranscriptORF.at.
65
+ Their genomic blocks are 1-based inclusive and their RNA sequence is
66
+ only the available CDS. Full transcript boundaries are not asserted.
67
+ No ribosome, peptide or sample protein-expression evidence is inferred.
68
+
69
+ Raises
70
+ ------
71
+ ValueError
72
+ No released coding reference matches, or a source model fails to bind
73
+ and translate exactly. Discovery is available through viral_references.
74
+ """
75
+ sequence = str(reference_sequence).upper()
76
+ fingerprint = hashlib.sha256(sequence.encode("ascii")).hexdigest()
77
+ data = _catalog()
78
+ matches = [row for row in data["references"] if row["sequence_sha256"] == fingerprint
79
+ and row["length"] == len(sequence)]
80
+ if len(matches) != 1:
81
+ raise ValueError("No unique released viral coding reference matches this DNA; "
82
+ "inspect viral_references() for available sequence identities")
83
+ reference = matches[0]
84
+ source = reference["source"]
85
+ label = contig if contig is not None else reference["id"]
86
+ if not isinstance(label, str) or not label:
87
+ raise ValueError("contig must be a nonempty name")
88
+ context = ReferenceContext(
89
+ taxon_id=reference["taxon_id"], species=reference["species"],
90
+ genome_build=reference["id"], annotation_name="NCBI RefSeq",
91
+ annotation_version=source["accession"], sequence_sha256=fingerprint,
92
+ source_sha256=source["sha256"])
93
+ result = []
94
+ for cds in data["cds"]:
95
+ protein_id = cds["protein_id"]
96
+ blocks = reference["coding_blocks"][protein_id]
97
+ coding = "".join(sequence[a - 1:b] if cds["strand"] == "+" else
98
+ sequence[a - 1:b].translate(_COMPLEMENT)[::-1] for a, b in blocks)
99
+ if cds["phase"] != 0:
100
+ raise ValueError(f"Unsupported partial source codon: {protein_id}")
101
+ rna = SourceRNA(
102
+ id=f"{source['accession']}:CDS:{protein_id}", sequence=coding, reference=context,
103
+ source=f"NCBI RefSeq {source['accession']}", contig=label, strand=cds["strand"],
104
+ exons=blocks, gene_name=cds["gene"], biotype="source_CDS_fragment")
105
+ orf = TranscriptORF.at(rna, 0, orf_id=protein_id, source=rna.source,
106
+ protein=cds["protein_sequence"], translation_table=cds["translation_table"],
107
+ orf_type="reference_CDS", start_complete=cds["start_complete"])
108
+ if orf.coding_sequence != coding or orf.stop_complete != cds["stop_complete"]:
109
+ raise ValueError(f"Source coding boundaries do not translate exactly: {protein_id}")
110
+ result.append(orf)
111
+ return tuple(result)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orfdata
3
- Version: 0.28.0
3
+ Version: 0.29.0
4
4
  Summary: Reference proteomes with evidence-backed noncanonical ORFs on PyEnsembl genomes
5
5
  Author: OpenVax
6
6
  License-Expression: Apache-2.0
@@ -11,6 +11,7 @@ Provides-Extra: pyensembl
11
11
  Requires-Dist: pyensembl>=2.27.2; extra == "pyensembl"
12
12
  Provides-Extra: build-data
13
13
  Requires-Dist: openpyxl>=3.1; extra == "build-data"
14
+ Requires-Dist: biopython<2,>=1.80; extra == "build-data"
14
15
  Provides-Extra: data
15
16
  Requires-Dist: datacache<2,>=1.25.1; extra == "data"
16
17
  Provides-Extra: columnar
@@ -21,6 +22,7 @@ Requires-Dist: ruff; extra == "dev"
21
22
  Requires-Dist: build; extra == "dev"
22
23
  Requires-Dist: twine; extra == "dev"
23
24
  Requires-Dist: openpyxl>=3.1; extra == "dev"
25
+ Requires-Dist: biopython<2,>=1.80; extra == "dev"
24
26
  Requires-Dist: pyensembl>=2.27.2; extra == "dev"
25
27
  Requires-Dist: datacache<2,>=1.25.1; extra == "dev"
26
28
  Provides-Extra: docs
@@ -102,6 +104,13 @@ Human evidence is never transferred to another species. Viral proteomes can be a
102
104
  orfdata also provides [RNA, ribosome and protein measurements](https://openvax.github.io/orfdata/measurements/)
103
105
  for human, mouse, dog and yeast.
104
106
 
107
+ `viral_orfs(reference_dna, contig="HPV16")` loads source-defined viral CDSs as
108
+ existing RNA/ORF models, offline and qualified by exact reference sequence.
109
+ The first [coding reference](https://openvax.github.io/orfdata/viral/) contains
110
+ the nine RefSeq NC_001526.4 HPV16 CDSs, with native and GDC placements;
111
+ `viral_references()` lists the available identities and coverage. Broader
112
+ imports remain in [the viral roadmap](https://github.com/openvax/orfdata/issues/91).
113
+
105
114
  ## Measurement datasets
106
115
 
107
116
  RNA, ribosome and protein measurements are separate, downloadable datasets with
@@ -24,6 +24,7 @@ docs/search-references.md
24
24
  docs/source-references.md
25
25
  docs/species.md
26
26
  docs/storage.md
27
+ docs/viral.md
27
28
  docs/stylesheets/docs.css
28
29
  orfdata/__init__.py
29
30
  orfdata/_pinned_genome.py
@@ -56,6 +57,7 @@ orfdata/rna.py
56
57
  orfdata/search_reference.py
57
58
  orfdata/sequence.py
58
59
  orfdata/version.py
60
+ orfdata/viral.py
59
61
  orfdata.egg-info/PKG-INFO
60
62
  orfdata.egg-info/SOURCES.txt
61
63
  orfdata.egg-info/dependency_links.txt
@@ -75,6 +77,8 @@ orfdata/data/uorf-evidence/AUTHOR-LICENSE.txt
75
77
  orfdata/data/uorf-evidence/NOTICE.txt
76
78
  orfdata/data/uorf-evidence/catalog.json.gz
77
79
  orfdata/data/uorf-evidence/manifest.json
80
+ orfdata/data/viral/NOTICE.md
81
+ orfdata/data/viral/hpv16-refseq-CDS.json.gz
78
82
  orfdata/sources/__init__.py
79
83
  orfdata/sources/copy.py
80
84
  orfdata/sources/ingolia.py
@@ -116,6 +120,7 @@ tests/test_search_reference.py
116
120
  tests/test_selectors.py
117
121
  tests/test_storage.py
118
122
  tests/test_uorf_catalog.py
123
+ tests/test_viral.py
119
124
  tests/test_wang.py
120
125
  tests/data/aggregate_evidence.json
121
126
  tests/data/copy/GSM1905474.soft
@@ -221,6 +226,7 @@ tests/data/storage/v2.json
221
226
  tests/data/storage/v2.sqlite
222
227
  tests/data/storage/v3.json
223
228
  tests/data/storage/v3.sqlite
229
+ tests/data/viral/NC_001526.4.gb.gz
224
230
  tests/data/wang/NOTICE.md
225
231
  tests/data/wang/annotation.gtf.gz
226
232
  tests/data/wang/copies.zip
@@ -228,4 +234,6 @@ tests/data/wang/expected.json
228
234
  tests/data/wang/manifest.json
229
235
  tests/data/wang/protein.zip
230
236
  tests/data/wang/rna.zip
231
- tests/data/wang/search.fasta.gz
237
+ tests/data/wang/search.fasta.gz
238
+ tools/__init__.py
239
+ tools/build_hpv16_cds.py
@@ -1,6 +1,7 @@
1
1
 
2
2
  [build-data]
3
3
  openpyxl>=3.1
4
+ biopython<2,>=1.80
4
5
 
5
6
  [columnar]
6
7
  pyarrow>=14
@@ -14,6 +15,7 @@ ruff
14
15
  build
15
16
  twine
16
17
  openpyxl>=3.1
18
+ biopython<2,>=1.80
17
19
  pyensembl>=2.27.2
18
20
  datacache<2,>=1.25.1
19
21
 
@@ -14,10 +14,10 @@ dependencies = []
14
14
 
15
15
  [project.optional-dependencies]
16
16
  pyensembl = ["pyensembl>=2.27.2"]
17
- build-data = ["openpyxl>=3.1"]
17
+ build-data = ["openpyxl>=3.1", "biopython>=1.80,<2"]
18
18
  data = ["datacache>=1.25.1,<2"]
19
19
  columnar = ["pyarrow>=14"]
20
- dev = ["pytest", "ruff", "build", "twine", "openpyxl>=3.1", "pyensembl>=2.27.2", "datacache>=1.25.1,<2"]
20
+ dev = ["pytest", "ruff", "build", "twine", "openpyxl>=3.1", "biopython>=1.80,<2", "pyensembl>=2.27.2", "datacache>=1.25.1,<2"]
21
21
  docs = ["mkdocs>=1.6,<2", "mkdocs-material>=9.5,<10"]
22
22
 
23
23
  [project.scripts]
@@ -30,7 +30,7 @@ version = {attr = "orfdata.version.__version__"}
30
30
  include = ["orfdata*"]
31
31
 
32
32
  [tool.setuptools.package-data]
33
- orfdata = ["data/uorf-evidence/*", "data/orf-evidence/*", "data/ires/*", "data/datasets.json", "data/catalogs.json", "data/chains.json", "data/genomes.json"]
33
+ orfdata = ["data/uorf-evidence/*", "data/orf-evidence/*", "data/ires/*", "data/viral/*", "data/datasets.json", "data/catalogs.json", "data/chains.json", "data/genomes.json"]
34
34
 
35
35
  [tool.ruff]
36
36
  target-version = "py39"
@@ -0,0 +1,110 @@
1
+ """Qualify real, versioned viral CDS paths independently of sample assembly."""
2
+
3
+ import gzip
4
+ import hashlib
5
+ import io
6
+ import json
7
+ from importlib.resources import files
8
+ from pathlib import Path
9
+
10
+ import pytest
11
+ from Bio import SeqIO
12
+
13
+ from orfdata import SourceRNA, viral_orfs, viral_references
14
+ from tools.build_hpv16_cds import build
15
+
16
+ FIXTURE = Path(__file__).parent / "data/viral/NC_001526.4.gb.gz"
17
+ EXPECTED = {
18
+ "YP_009268708.1": 92, "NP_041327.2": 649, "NP_041328.1": 365,
19
+ "NP_041330.2": 83, "NP_041331.2": 473, "NP_041332.2": 505,
20
+ "NP_041325.1": 158, "YP_009268707.1": 50, "NP_041326.1": 98,
21
+ }
22
+
23
+
24
+ @pytest.fixture
25
+ def source():
26
+ raw = gzip.decompress(FIXTURE.read_bytes())
27
+ assert hashlib.sha256(raw).hexdigest() == "282be442f226cc809fefbda616ac136b8d20dfde23fad09558f3f653a3de96a4"
28
+ return raw, SeqIO.read(io.StringIO(raw.decode()), "genbank")
29
+
30
+
31
+ def test_catalogue_rebuilds_from_the_pinned_public_annotation(source):
32
+ raw, _ = source
33
+ packaged = json.loads(gzip.decompress(files("orfdata").joinpath(
34
+ "data/viral/hpv16-refseq-CDS.json.gz").read_bytes()))
35
+ assert build(raw) == packaged
36
+ assert len(packaged["cds"]) == 9
37
+
38
+
39
+ def test_native_source_paths_match_all_nine_source_proteins(source):
40
+ _, record = source
41
+ orfs = viral_orfs(str(record.seq))
42
+ definitions = {f.qualifiers["protein_id"][0]: f for f in record.features if f.type == "CDS"}
43
+ assert {orf.orf_id: len(orf.protein_sequence) for orf in orfs} == EXPECTED
44
+ for orf in orfs:
45
+ feature = definitions[orf.orf_id]
46
+ assert isinstance(orf.transcript, SourceRNA)
47
+ assert orf.transcript.biotype == "source_CDS_fragment"
48
+ assert orf.transcript.genome is None
49
+ assert orf.protein_sequence == feature.qualifiers["translation"][0]
50
+ assert orf.coding_sequence == str(feature.extract(record.seq))
51
+ assert orf.start_complete and orf.stop_complete
52
+ assert orf.context.annotation_version == "NC_001526.4"
53
+ assert orf.context.taxon_id == 333760
54
+ assert not orf.evidence.has_evidence("ms")
55
+ assert not orf.evidence.has_evidence("ribosome")
56
+
57
+
58
+ def test_gdc_rotation_is_exact_and_retains_spliced_coding_positions(source):
59
+ _, record = source
60
+ native = str(record.seq)
61
+ gdc = native[-864:] + native[:-864]
62
+ assert hashlib.md5(gdc.encode()).hexdigest() == "f2463721818c29998ef5ab917e6df74a"
63
+ orfs = {orf.orf_id: orf for orf in viral_orfs(gdc, contig="HPV16")}
64
+ assert orfs["YP_009268708.1"].coding_blocks == ((865, 880), (3358, 3620))
65
+ assert orfs["YP_009268707.1"].coding_blocks == ((83, 226), (409, 417))
66
+ assert orfs["NP_041326.1"].coding_blocks == ((562, 858),)
67
+ for orf in orfs.values():
68
+ assert orf.transcript.contig == "HPV16"
69
+ assert orf.context.genome_build == "GRCh38.d1.vd1:HPV16"
70
+ assert orf.protein_sequence == next(o.protein_sequence for o in viral_orfs(native)
71
+ if o.orf_id == orf.orf_id)
72
+
73
+
74
+ def test_mutated_same_name_reference_and_partial_dna_are_not_qualified(source):
75
+ _, record = source
76
+ native = str(record.seq)
77
+ changed = ("A" if native[0] != "A" else "C") + native[1:]
78
+ for sequence in (changed, native[1:], native[::-1]):
79
+ with pytest.raises(ValueError, match="No unique released"):
80
+ viral_orfs(sequence, contig="HPV16")
81
+
82
+
83
+ def test_discovery_is_offline_and_returned_metadata_cannot_change_loading(source):
84
+ _, record = source
85
+ references = viral_references()
86
+ assert {row["id"] for row in references} == {"NC_001526.4", "GRCh38.d1.vd1:HPV16"}
87
+ assert all(row["coding_models"] == 9 for row in references)
88
+ assert all(row["catalogue_sha256"] and row["source"]["sha256"] for row in references)
89
+ references[0]["source"]["accession"] = "changed"
90
+ assert viral_references()[0]["source"]["accession"] == "NC_001526.4"
91
+ assert viral_orfs(str(record.seq))[0].context.annotation_version == "NC_001526.4"
92
+
93
+
94
+ def test_corrupt_packaged_catalogue_fails_before_returning_models(monkeypatch):
95
+ import orfdata.viral as module
96
+
97
+ class CorruptResource:
98
+ def joinpath(self, path):
99
+ return self
100
+
101
+ def read_bytes(self):
102
+ return b"corrupt catalogue"
103
+
104
+ module._catalog.cache_clear()
105
+ try:
106
+ monkeypatch.setattr(module, "files", lambda name: CorruptResource())
107
+ with pytest.raises(ValueError, match="checksum mismatch"):
108
+ viral_references()
109
+ finally:
110
+ module._catalog.cache_clear()
@@ -0,0 +1 @@
1
+ """Source catalogue builders, excluded from the installed runtime package."""
@@ -0,0 +1,89 @@
1
+ """Rebuild the small HPV16 CDS catalogue from its versioned RefSeq GenBank record.
2
+
3
+ Requires Biopython only for building, not for loading the released catalogue.
4
+ The GDC placement is an exact circular rotation, verified against the DNA MD5
5
+ of the pinned GDC reference, not an alignment-based annotation transfer.
6
+ """
7
+
8
+ import argparse
9
+ import gzip
10
+ import hashlib
11
+ import io
12
+ import json
13
+ from pathlib import Path
14
+
15
+ from Bio import SeqIO
16
+
17
+ ACCESSION = "NC_001526.4"
18
+ NATIVE_MD5 = "08d2b3849496d12cc45fd4df713d5c2f"
19
+ GDC_MD5 = "f2463721818c29998ef5ab917e6df74a"
20
+ ROTATION = 864
21
+ SOURCE = ("https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?"
22
+ "id=NC_001526.4&db=nuccore&report=genbank&retmode=text")
23
+
24
+
25
+ def build(genbank):
26
+ record = SeqIO.read(io.StringIO(genbank.decode()), "genbank")
27
+ native = str(record.seq).upper()
28
+ gdc = native[-ROTATION:] + native[:-ROTATION]
29
+ if record.id != ACCESSION or hashlib.md5(native.encode()).hexdigest() != NATIVE_MD5:
30
+ raise ValueError("The source is not the pinned NC_001526.4 DNA")
31
+ if hashlib.md5(gdc.encode()).hexdigest() != GDC_MD5:
32
+ raise ValueError("The circular rotation does not match the GDC DNA")
33
+ definitions = []
34
+ native_blocks, gdc_blocks = {}, {}
35
+ for feature in record.features:
36
+ if feature.type != "CDS":
37
+ continue
38
+ q = feature.qualifiers
39
+ if feature.location.strand != 1 or int(q.get("codon_start", [1])[0]) != 1:
40
+ raise ValueError("This source builder requires complete plus-strand CDSs")
41
+ protein_id = q["protein_id"][0]
42
+ blocks = [[int(part.start) + 1, int(part.end)] for part in feature.location.parts]
43
+ moved = [[(a - 1 + ROTATION) % len(native) + 1,
44
+ (b - 1 + ROTATION) % len(native) + 1] for a, b in blocks]
45
+ if any(a > b for a, b in moved):
46
+ raise ValueError("A rotated coding block crosses the origin; qualify it explicitly")
47
+ coding = feature.extract(record.seq)
48
+ protein = q["translation"][0]
49
+ table = int(q.get("transl_table", [1])[0])
50
+ if str(coding.translate(table=table, cds=True)) != protein:
51
+ raise ValueError(f"Source translation mismatch: {protein_id}")
52
+ definitions.append(dict(protein_id=protein_id, gene=q.get("gene", [None])[0],
53
+ product=q["product"][0], protein_sequence=protein,
54
+ translation_table=table, strand="+", phase=0,
55
+ start_complete=True, stop_complete=True))
56
+ native_blocks[protein_id] = blocks
57
+ gdc_blocks[protein_id] = moved
58
+ if len(definitions) != 9:
59
+ raise ValueError("Expected the nine annotated CDSs in this source version")
60
+ source = dict(accession=ACCESSION, url=SOURCE, sha256=hashlib.sha256(genbank).hexdigest())
61
+ references = []
62
+ for name, sequence, blocks, offset in (
63
+ (ACCESSION, native, native_blocks, 0),
64
+ ("GRCh38.d1.vd1:HPV16", gdc, gdc_blocks, ROTATION)):
65
+ references.append(dict(id=name, taxon_id=333760, species="human_papillomavirus_16",
66
+ length=len(sequence), sequence_md5=hashlib.md5(sequence.encode()).hexdigest(),
67
+ sequence_sha256=hashlib.sha256(sequence.encode()).hexdigest(),
68
+ source=source, native_to_reference_rotation=offset, coding_blocks=blocks))
69
+ return dict(schema="orfdata.viral_cds.v1", source=source,
70
+ scope="Nine source-annotated HPV16 CDSs; not all HPV ORFs or complete transcript models",
71
+ references=references, cds=definitions)
72
+
73
+
74
+ def main():
75
+ parser = argparse.ArgumentParser(description=__doc__)
76
+ parser.add_argument("genbank", type=Path)
77
+ parser.add_argument("output", type=Path)
78
+ args = parser.parse_args()
79
+ raw = args.genbank.read_bytes()
80
+ if args.genbank.suffix == ".gz":
81
+ raw = gzip.decompress(raw)
82
+ payload = json.dumps(build(raw), sort_keys=True, separators=(",", ":")).encode() + b"\n"
83
+ args.output.parent.mkdir(parents=True, exist_ok=True)
84
+ args.output.write_bytes(gzip.compress(payload, mtime=0))
85
+ print(hashlib.sha256(args.output.read_bytes()).hexdigest())
86
+
87
+
88
+ if __name__ == "__main__":
89
+ main()
@@ -1 +0,0 @@
1
- __version__ = "0.28.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes