orfdata 0.30.0__tar.gz → 0.31.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.
- {orfdata-0.30.0/orfdata.egg-info → orfdata-0.31.0}/PKG-INFO +1 -1
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/proteome.md +27 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/proteome.py +13 -0
- orfdata-0.31.0/orfdata/refseq.py +123 -0
- orfdata-0.31.0/orfdata/version.py +1 -0
- {orfdata-0.30.0 → orfdata-0.31.0/orfdata.egg-info}/PKG-INFO +1 -1
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata.egg-info/SOURCES.txt +2 -0
- orfdata-0.31.0/tests/test_refseq.py +122 -0
- orfdata-0.30.0/orfdata/version.py +0 -1
- {orfdata-0.30.0 → orfdata-0.31.0}/LICENSE +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/MANIFEST.in +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/deploy.sh +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/catalogs.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/copy-yeast.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/coverage.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/examples.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/human-tissue.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/index.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/ingolia-yeast.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/measurements.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/pairing.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/pfizer-protein.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/pfizer-rna.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/reference.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/search-references.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/source-references.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/species.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/storage.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/stylesheets/docs.css +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs/viral.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/docs.sh +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/lint.sh +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/mkdocs.yml +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/__init__.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/_pinned_genome.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/_structure.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/build.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/catalog.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/catalog_cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/catalog_manifest.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/catalogs.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/catalogs.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/chains.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/datasets.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/genomes.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/ires/rfam-15.1-human-ires.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/orf-evidence/AUTHOR-LICENSE.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/orf-evidence/NOTICE.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/orf-evidence/catalog.json.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/orf-evidence/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/uorf-evidence/AUTHOR-LICENSE.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/uorf-evidence/NOTICE.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/uorf-evidence/catalog.json.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/uorf-evidence/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/viral/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/data/viral/hpv16-refseq-CDS.json.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/dataset.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/dataset_cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/datasets.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/evidence.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/evidence_summary.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/genomes.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/genomes_cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/initiation_context.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/install.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/liftover.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/liftover_cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/measurements.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/model.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/pairing.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/proteome_cli.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/reference.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/reference_mapping.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/rna.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/search_reference.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sequence.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/__init__.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/copy.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/ingolia.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/ncorf_mammals.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/openprot.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/pfizer.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/pfizer_rna.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/riborf.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/sources/wang.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata/viral.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata.egg-info/dependency_links.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata.egg-info/entry_points.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata.egg-info/requires.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/orfdata.egg-info/top_level.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/pyproject.toml +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/setup.cfg +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/test.sh +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/conftest.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/aggregate_evidence.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905474.soft +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905474_KL9_fpkm.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905476.soft +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905476_KL10_fpkm.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905478.soft +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905478_KL11_fpkm.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905479.soft +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/GSM1905479_KL12_fpkm.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/geo-series.soft +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/methods.pdf +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/paper.xml +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/pmc-metadata.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/qconcat.fasta +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/copy/workbook.xlsx +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346111.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346111.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346114.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346114.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346115.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346115.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346116.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346116.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346117.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346117.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346118.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346118.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346120.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346120.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346122.metadata.txt +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/GSM346122.quant.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ingolia/readMe.txt.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/S3.xlsx +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/ensembl107.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/ensembl107.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/human-ensembl107.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/human.bed +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/human.pep.fa +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/mouse.bed +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/ncorf_mammals/mouse.pep.fa +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/ensembl106.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/ensembl106.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.bed.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.fasta.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/openprot/mouse-openprot-2_2-altprots+isoforms-min_2_pep-GRCm39.106.tsv.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/dog/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/dog/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/dog/protein.tsv +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/dog/search.fasta +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/human/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/human/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/human/protein.tsv +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/human/search.fasta +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/mouse/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/mouse/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/mouse/protein.tsv +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer/mouse/search.fasta +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/GSE325522_family.soft.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/GSE325523_family.soft.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/GSE325525_family.soft.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/counts.csv.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/dog-annotation.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/dog-expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/dog-manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/mouse-annotation.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/mouse-expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/mouse-manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/pfizer_rna/samples.xlsx +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/canis_lupus_familiaris.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/context-keys-v0.4.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/ensembl115.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/homo_sapiens.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/mitochondrial.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/mus_musculus.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/saccharomyces_cerevisiae.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/references/uniprot_literature.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/regions/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/regions/ingolia.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/SD3.xlsx +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/ensembl107.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/ensembl107.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/ensembl107.ncrna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/human-ensembl105.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/human-ensembl105.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/human-ensembl105.ncrna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/worm-ensembl105.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/worm-ensembl105.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/worm-ensembl105.ncrna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/yeast-ensembl115.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/yeast-ensembl115.dna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/yeast-ensembl115.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/zebrafish-ensembl115.cdna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/zebrafish-ensembl115.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/riborf/zebrafish-ensembl115.ncrna.fa.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/search_reference/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/search_reference/dog.fasta +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/search_reference/ensembl83-expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/search_reference/ensembl83-human.fasta.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/search_reference/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/README.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/generate.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v1.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v1.sqlite +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v2.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v2.sqlite +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v3.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/storage/v3.sqlite +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/viral/NC_001526.4.gb.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/NOTICE.md +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/annotation.gtf.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/copies.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/expected.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/manifest.json +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/protein.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/rna.zip +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/data/wang/search.fasta.gz +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_catalog_registry.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_copy.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_cross_reference_pairing.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_ensembl_search_reference.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_evidence_rules.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_evidence_summary.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_genetic_codes.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_genomes.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_ingolia.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_initiation_context.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_liftover.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_local_build_queries.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_measurements.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_merge_catalogs.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_more_species.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_ncorf_mammals.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_openprot.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_orf_cases.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_paired_selectors.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_pairing.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_pfizer.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_pfizer_rna.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_proteome.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_reference_context.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_reference_mapping.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_reference_orf.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_region_targets.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_riborf.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_search_reference.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_selectors.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_storage.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_uorf_catalog.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_viral.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tests/test_wang.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tools/__init__.py +0 -0
- {orfdata-0.30.0 → orfdata-0.31.0}/tools/build_hpv16_cds.py +0 -0
|
@@ -43,6 +43,33 @@ Mouse, dog, yeast and other PyEnsembl species work the same way; mouse Ensembl
|
|
|
43
43
|
annotation data. An uninstalled genome raises an error naming the
|
|
44
44
|
`pyensembl install` command.
|
|
45
45
|
|
|
46
|
+
## RefSeq proteins (experimental)
|
|
47
|
+
|
|
48
|
+
Build from NCBI's protein FASTA and genome-download feature table, with pinned
|
|
49
|
+
byte checksums and an explicit `ReferenceContext`:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from orfdata import ReferenceContext
|
|
53
|
+
|
|
54
|
+
context = ReferenceContext(9615, "dog", "UU_Cfam_GSD_1.0", "NCBI RefSeq", "106",
|
|
55
|
+
assembly_accession="GCF_011100685.1")
|
|
56
|
+
reference = Proteome.from_refseq(
|
|
57
|
+
"protein.faa.gz", "feature_table.txt.gz", reference=context,
|
|
58
|
+
expected_sha256={"protein": protein_sha256, "feature_table": feature_table_sha256},
|
|
59
|
+
)
|
|
60
|
+
reference.save("dog.proteome.json.gz")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This preserves NCBI Gene IDs, versioned RNA/protein accessions, every mapped
|
|
64
|
+
occurrence and all FASTA proteins. Wrong checksums, assemblies, missing proteins
|
|
65
|
+
and conflicting assignments fail. CDS rows without protein products are counted
|
|
66
|
+
in `layers[0]["cds_without_protein"]`.
|
|
67
|
+
|
|
68
|
+
The annotated layer retains both asset hashes and identifier namespaces. Its
|
|
69
|
+
`genomic_spans` maps each protein accession to spans in occurrence order. These
|
|
70
|
+
are genomic envelopes, so occurrence CDS offsets/blocks and transcript biotypes
|
|
71
|
+
remain unknown. No annotation indexing or downloads occur.
|
|
72
|
+
|
|
46
73
|
## Choose the evidence
|
|
47
74
|
|
|
48
75
|
`with_extra_orfs(evidence=...)` selects catalogue ORFs by evidence and adds each
|
|
@@ -466,6 +466,19 @@ class Proteome:
|
|
|
466
466
|
added=len(entries))
|
|
467
467
|
return cls(reference, entries, (layer,), genome=genome)
|
|
468
468
|
|
|
469
|
+
@classmethod
|
|
470
|
+
def from_refseq(cls, protein_fasta, feature_table, *, reference, expected_sha256):
|
|
471
|
+
"""Read pinned RefSeq proteins and NCBI Gene/transcript occurrences offline.
|
|
472
|
+
|
|
473
|
+
``expected_sha256`` requires ``protein`` and ``feature_table`` byte hashes.
|
|
474
|
+
The NCBI genome-download feature table supplies accession joins, not
|
|
475
|
+
spliced CDS coordinates. All FASTA proteins must have source mappings.
|
|
476
|
+
"""
|
|
477
|
+
from .refseq import refseq_proteome
|
|
478
|
+
|
|
479
|
+
return refseq_proteome(cls, protein_fasta, feature_table,
|
|
480
|
+
reference=reference, expected_sha256=expected_sha256)
|
|
481
|
+
|
|
469
482
|
@classmethod
|
|
470
483
|
def build(cls, genome, evidence="ms", *, catalog=None, viral=(), extra_orfs=True, context=None,
|
|
471
484
|
cache=False, cache_root=None, catalogs=None):
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Pinned NCBI genome-download feature tables and reference proteins."""
|
|
2
|
+
|
|
3
|
+
import csv
|
|
4
|
+
import gzip
|
|
5
|
+
import hashlib
|
|
6
|
+
import io
|
|
7
|
+
import re
|
|
8
|
+
from collections import defaultdict
|
|
9
|
+
from dataclasses import replace
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
from .proteome import Occurrence, ProteomeEntry, _sha256
|
|
13
|
+
from .reference import ReferenceContext
|
|
14
|
+
|
|
15
|
+
_ACCESSION = re.compile(r"[A-Z]{2}_[0-9]+\.[1-9][0-9]*")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _source(path, expected):
|
|
19
|
+
if not isinstance(expected, str) or not re.fullmatch(r"[0-9a-f]{64}", expected):
|
|
20
|
+
raise ValueError("RefSeq sources require lowercase SHA-256 byte checksums")
|
|
21
|
+
raw = Path(path).read_bytes()
|
|
22
|
+
if hashlib.sha256(raw).hexdigest() != expected:
|
|
23
|
+
raise ValueError(f"RefSeq source checksum mismatch: {path}")
|
|
24
|
+
return (gzip.decompress(raw) if raw.startswith(b"\x1f\x8b") else raw).decode("ascii")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _proteins(text):
|
|
28
|
+
result, accession, chunks = {}, None, []
|
|
29
|
+
for line in text.splitlines() + [">"]:
|
|
30
|
+
if line.startswith(">"):
|
|
31
|
+
if accession is not None:
|
|
32
|
+
sequence = "".join(chunks).removesuffix("*")
|
|
33
|
+
if not sequence or not re.fullmatch(r"[A-Z]+", sequence):
|
|
34
|
+
raise ValueError(f"Invalid RefSeq protein sequence: {accession}")
|
|
35
|
+
if accession in result:
|
|
36
|
+
raise ValueError(f"Duplicate RefSeq protein accession: {accession}")
|
|
37
|
+
result[accession] = sequence
|
|
38
|
+
accession, chunks = (line[1:].split() or [None])[0], []
|
|
39
|
+
if accession is not None and not _ACCESSION.fullmatch(accession):
|
|
40
|
+
raise ValueError("RefSeq proteins require versioned accessions")
|
|
41
|
+
elif line.strip():
|
|
42
|
+
if accession is None:
|
|
43
|
+
raise ValueError("RefSeq FASTA sequence precedes its header")
|
|
44
|
+
chunks.append(line.strip())
|
|
45
|
+
if not result:
|
|
46
|
+
raise ValueError("RefSeq protein inventory is empty")
|
|
47
|
+
return result
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def refseq_proteome(cls, protein_fasta, feature_table, *, reference, expected_sha256):
|
|
51
|
+
if (not isinstance(reference, ReferenceContext) or reference.annotation_name != "NCBI RefSeq"
|
|
52
|
+
or not reference.annotation_version or not reference.assembly_accession):
|
|
53
|
+
raise ValueError("RefSeq requires explicit taxon, assembly accession and NCBI RefSeq annotation")
|
|
54
|
+
if not isinstance(expected_sha256, dict) or set(expected_sha256) != {"protein", "feature_table"}:
|
|
55
|
+
raise ValueError("RefSeq expected_sha256 requires protein and feature_table")
|
|
56
|
+
# Read exactly the verified bytes. Subsequent file changes cannot affect this build.
|
|
57
|
+
proteins = _proteins(_source(protein_fasta, expected_sha256["protein"]))
|
|
58
|
+
text = _source(feature_table, expected_sha256["feature_table"])
|
|
59
|
+
reader = csv.DictReader(io.StringIO(text), delimiter="\t")
|
|
60
|
+
required = {"# feature", "class", "assembly", "product_accession", "related_accession",
|
|
61
|
+
"GeneID", "symbol", "genomic_accession", "strand", "product_length", "start", "end"}
|
|
62
|
+
if not reader.fieldnames or not required.issubset(reader.fieldnames):
|
|
63
|
+
raise ValueError("Missing NCBI genome-download feature-table columns")
|
|
64
|
+
if len(set(reader.fieldnames)) != len(reader.fieldnames):
|
|
65
|
+
raise ValueError("Duplicate RefSeq feature-table columns")
|
|
66
|
+
occurrences, transcripts = defaultdict(dict), {}
|
|
67
|
+
untranslated = 0
|
|
68
|
+
for row in reader:
|
|
69
|
+
if None in row or any(row.get(name) is None for name in required):
|
|
70
|
+
raise ValueError("Malformed RefSeq feature-table row")
|
|
71
|
+
if row["assembly"] != reference.assembly_accession:
|
|
72
|
+
raise ValueError("RefSeq feature-table assembly disagrees with reference")
|
|
73
|
+
if row["# feature"] != "CDS":
|
|
74
|
+
continue
|
|
75
|
+
protein, transcript, gene = row["product_accession"], row["related_accession"], row["GeneID"]
|
|
76
|
+
if row["class"] == "without_protein" and not protein and not transcript:
|
|
77
|
+
untranslated += 1
|
|
78
|
+
continue
|
|
79
|
+
if (row["class"] != "with_protein" or not _ACCESSION.fullmatch(protein)
|
|
80
|
+
or not _ACCESSION.fullmatch(transcript) or not re.fullmatch(r"[1-9][0-9]*", gene)
|
|
81
|
+
or not row["genomic_accession"] or row["strand"] not in {"+", "-"}):
|
|
82
|
+
raise ValueError("Incomplete RefSeq CDS accession/gene mapping")
|
|
83
|
+
if protein not in proteins:
|
|
84
|
+
raise ValueError(f"Mapped RefSeq protein absent from FASTA: {protein}")
|
|
85
|
+
if row["product_length"] != str(len(proteins[protein])):
|
|
86
|
+
raise ValueError(f"RefSeq feature-table protein length disagrees with FASTA: {protein}")
|
|
87
|
+
assignment = (gene, protein)
|
|
88
|
+
if transcript in transcripts and transcripts[transcript] != assignment:
|
|
89
|
+
raise ValueError(f"Conflicting RefSeq transcript assignment: {transcript}")
|
|
90
|
+
transcripts[transcript] = assignment
|
|
91
|
+
if (not re.fullmatch(r"[1-9][0-9]*", row["start"])
|
|
92
|
+
or not re.fullmatch(r"[1-9][0-9]*", row["end"])
|
|
93
|
+
or int(row["start"]) > int(row["end"])):
|
|
94
|
+
raise ValueError("Invalid RefSeq source genomic span")
|
|
95
|
+
occurrence = Occurrence(transcript, gene, row["symbol"] or None, None,
|
|
96
|
+
row["genomic_accession"], row["strand"], None, None, (), True)
|
|
97
|
+
key = (transcript, gene, row["genomic_accession"], row["strand"], int(row["start"]), int(row["end"]))
|
|
98
|
+
if key in occurrences[protein] and occurrences[protein][key] != occurrence:
|
|
99
|
+
raise ValueError(f"Conflicting RefSeq source occurrence: {transcript}")
|
|
100
|
+
occurrences[protein][key] = occurrence
|
|
101
|
+
missing = set(proteins) - set(occurrences)
|
|
102
|
+
if missing:
|
|
103
|
+
raise ValueError("RefSeq FASTA proteins lack feature-table mappings: " + ", ".join(sorted(missing)[:5]))
|
|
104
|
+
source_hash, sequence_hash = _sha256(expected_sha256), _sha256(sorted(proteins.items()))
|
|
105
|
+
if (reference.source_sha256 not in (None, source_hash)
|
|
106
|
+
or reference.sequence_sha256 not in (None, sequence_hash)):
|
|
107
|
+
raise ValueError("RefSeq source/sequence checksums disagree with reference")
|
|
108
|
+
reference = replace(reference, source_sha256=source_hash, sequence_sha256=sequence_hash)
|
|
109
|
+
source = f"NCBI RefSeq:{reference.annotation_version}"
|
|
110
|
+
entries = [ProteomeEntry(accession, proteins[accession], "annotated", reference.taxon_id,
|
|
111
|
+
source, occurrences=tuple(occurrences[accession][key] for key in sorted(occurrences[accession])),
|
|
112
|
+
source_binding="feature-table-accession-join; spliced CDS coordinates unavailable")
|
|
113
|
+
for accession in sorted(proteins)]
|
|
114
|
+
layer = dict(kind="annotated", role="host", source=source, reference=reference.key,
|
|
115
|
+
added=len(entries), content_provenance=dict(expected_sha256),
|
|
116
|
+
identifier_namespaces={"gene": "NCBI Gene", "transcript": "NCBI RefSeq RNA",
|
|
117
|
+
"protein": "NCBI RefSeq protein"},
|
|
118
|
+
cds_without_protein=untranslated, mapping="feature-table-accession-join")
|
|
119
|
+
# Same accession can have multiple genomic placements. Keep their spans
|
|
120
|
+
# indexed exactly like entry.occurrences without inventing spliced CDS blocks.
|
|
121
|
+
layer['genomic_spans'] = {accession: [list(key[-2:]) for key in sorted(occurrences[accession])]
|
|
122
|
+
for accession in sorted(occurrences)}
|
|
123
|
+
return cls(reference, entries, (layer,))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.31.0"
|
|
@@ -53,6 +53,7 @@ orfdata/proteome.py
|
|
|
53
53
|
orfdata/proteome_cli.py
|
|
54
54
|
orfdata/reference.py
|
|
55
55
|
orfdata/reference_mapping.py
|
|
56
|
+
orfdata/refseq.py
|
|
56
57
|
orfdata/rna.py
|
|
57
58
|
orfdata/search_reference.py
|
|
58
59
|
orfdata/sequence.py
|
|
@@ -115,6 +116,7 @@ tests/test_proteome.py
|
|
|
115
116
|
tests/test_reference_context.py
|
|
116
117
|
tests/test_reference_mapping.py
|
|
117
118
|
tests/test_reference_orf.py
|
|
119
|
+
tests/test_refseq.py
|
|
118
120
|
tests/test_region_targets.py
|
|
119
121
|
tests/test_riborf.py
|
|
120
122
|
tests/test_search_reference.py
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""RefSeq source accession joins preserve identities without a symbol heuristic."""
|
|
2
|
+
|
|
3
|
+
import csv
|
|
4
|
+
import gzip
|
|
5
|
+
import hashlib
|
|
6
|
+
from dataclasses import replace
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
from orfdata import Proteome, ReferenceContext
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def source(tmp_path, *, rows=None, fasta=None, compressed=False):
|
|
14
|
+
fields = ['# feature', 'class', 'assembly', 'product_accession', 'related_accession',
|
|
15
|
+
'GeneID', 'symbol', 'genomic_accession', 'strand', 'product_length', 'start', 'end']
|
|
16
|
+
if rows is None:
|
|
17
|
+
rows = [dict(zip(fields, ['CDS', 'with_protein', 'GCF_011100685.1', 'XP_123.1', 'XM_123.1',
|
|
18
|
+
'123', 'GENE', 'NC_123.1', '+', '6', '1', '200'])),
|
|
19
|
+
dict(zip(fields, ['CDS', 'with_protein', 'GCF_011100685.1', 'XP_123.1', 'XM_124.2',
|
|
20
|
+
'124', 'OTHER', 'NC_124.1', '-', '6', '2', '201']))]
|
|
21
|
+
protein, features = tmp_path / 'protein.faa', tmp_path / 'feature_table.txt'
|
|
22
|
+
protein.write_text(fasta if fasta is not None else '>XP_123.1 source description\nACDEFG\n')
|
|
23
|
+
with features.open('w') as stream:
|
|
24
|
+
writer = csv.DictWriter(stream, fieldnames=fields, delimiter='\t')
|
|
25
|
+
writer.writeheader()
|
|
26
|
+
writer.writerows(rows)
|
|
27
|
+
if compressed:
|
|
28
|
+
for path in (protein, features):
|
|
29
|
+
path.write_bytes(gzip.compress(path.read_bytes(), mtime=0))
|
|
30
|
+
hashes = {role: hashlib.sha256(path.read_bytes()).hexdigest()
|
|
31
|
+
for role, path in (('protein', protein), ('feature_table', features))}
|
|
32
|
+
context = ReferenceContext(9615, 'dog', 'UU_Cfam_GSD_1.0', 'NCBI RefSeq', '106',
|
|
33
|
+
assembly_accession='GCF_011100685.1')
|
|
34
|
+
return protein, features, context, hashes, rows
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def build(args):
|
|
38
|
+
protein, features, reference, hashes, _ = args
|
|
39
|
+
return Proteome.from_refseq(protein, features, reference=reference, expected_sha256=hashes)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@pytest.mark.parametrize('compressed', [False, True])
|
|
43
|
+
def test_refseq_keeps_all_gene_occurrences_and_offline_provenance(tmp_path, compressed):
|
|
44
|
+
args = source(tmp_path, compressed=compressed)
|
|
45
|
+
result = build(args)
|
|
46
|
+
entry, = result.entries
|
|
47
|
+
assert entry.sequence == 'ACDEFG'
|
|
48
|
+
assert [o.gene_id for o in entry.occurrences] == ['123', '124']
|
|
49
|
+
assert [o.transcript_id for o in entry.occurrences] == ['XM_123.1', 'XM_124.2']
|
|
50
|
+
assert all((o.start, o.end, o.coding_blocks, o.transcript_biotype) == (None, None, (), None)
|
|
51
|
+
for o in entry.occurrences)
|
|
52
|
+
assert dict(result.layers[0]['content_provenance']) == args[3]
|
|
53
|
+
assert result.layers[0]['genomic_spans']['XP_123.1'] == [[1, 200], [2, 201]]
|
|
54
|
+
saved = tmp_path / 'proteome.json.gz'
|
|
55
|
+
result.save(saved)
|
|
56
|
+
args[0].unlink()
|
|
57
|
+
args[1].unlink()
|
|
58
|
+
replay = Proteome.load(saved)
|
|
59
|
+
assert replay.identity == result.identity
|
|
60
|
+
assert replay.entries == result.entries
|
|
61
|
+
assert replay.layers == result.layers
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def test_refseq_preserves_repeated_placements_and_untranslated_cds_count(tmp_path):
|
|
65
|
+
args = source(tmp_path)
|
|
66
|
+
rows = args[-1]
|
|
67
|
+
rows.append(dict(rows[0], start='1001', end='1200'))
|
|
68
|
+
rows.append(dict(rows[0], **{'class': 'without_protein', 'product_accession': '', 'related_accession': ''}))
|
|
69
|
+
result = build(source(tmp_path, rows=rows))
|
|
70
|
+
assert len(result.entries[0].occurrences) == 3
|
|
71
|
+
assert result.layers[0]['cds_without_protein'] == 1
|
|
72
|
+
assert result.layers[0]['genomic_spans']['XP_123.1'] == [[1, 200], [1001, 1200], [2, 201]]
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@pytest.mark.parametrize('change', [dict(assembly='GCF_011100685.2'), dict(GeneID='GENE'),
|
|
76
|
+
dict(related_accession='XM_123'), dict(product_accession='XP_123'), dict(product_length='7'),
|
|
77
|
+
dict(strand='?'), dict(start='200', end='1'), dict(genomic_accession='')])
|
|
78
|
+
def test_refseq_rejects_invalid_and_conflicting_source_fields(tmp_path, change):
|
|
79
|
+
args = source(tmp_path)
|
|
80
|
+
rows = args[-1]
|
|
81
|
+
rows[0].update(change)
|
|
82
|
+
with pytest.raises(ValueError):
|
|
83
|
+
build(source(tmp_path, rows=rows))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@pytest.mark.parametrize('fasta', ['>XP_123.1\nACDEFG\n>XP_123.1\nACDEFG\n',
|
|
87
|
+
'>XP_123\nACDEFG\n', 'ACDEFG\n', '>XP_123.1\nAC*EFG\n',
|
|
88
|
+
'>XP_123.1\nACDEFG\n>XP_999.1\nACDEFG\n', ''])
|
|
89
|
+
def test_refseq_rejects_invalid_or_unmapped_fasta_proteins(tmp_path, fasta):
|
|
90
|
+
with pytest.raises(ValueError):
|
|
91
|
+
build(source(tmp_path, fasta=fasta))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def test_refseq_rejects_checksum_changes_and_missing_sources(tmp_path):
|
|
95
|
+
args = source(tmp_path)
|
|
96
|
+
args[0].write_text('changed')
|
|
97
|
+
with pytest.raises(ValueError, match='checksum mismatch'):
|
|
98
|
+
build(args)
|
|
99
|
+
args = source(tmp_path)
|
|
100
|
+
with pytest.raises(ValueError, match='requires protein and feature_table'):
|
|
101
|
+
Proteome.from_refseq(args[0], args[1], reference=args[2], expected_sha256={'protein': args[3]['protein']})
|
|
102
|
+
with pytest.raises(ValueError, match='checksums disagree'):
|
|
103
|
+
Proteome.from_refseq(args[0], args[1], reference=replace(args[2], source_sha256='0' * 64),
|
|
104
|
+
expected_sha256=args[3])
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_refseq_rejects_one_transcript_assigned_to_different_gene(tmp_path):
|
|
108
|
+
args = source(tmp_path)
|
|
109
|
+
rows = args[-1]
|
|
110
|
+
rows[1]['related_accession'] = rows[0]['related_accession']
|
|
111
|
+
with pytest.raises(ValueError, match='Conflicting RefSeq transcript'):
|
|
112
|
+
build(source(tmp_path, rows=rows))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def test_refseq_rejects_short_or_extra_cells_at_ingest(tmp_path):
|
|
116
|
+
for row in ('CDS\twith_protein\n', '\t'.join(['CDS'] * 13) + '\n'):
|
|
117
|
+
args = source(tmp_path)
|
|
118
|
+
header = args[1].read_text().splitlines()[0]
|
|
119
|
+
args[1].write_text(header + '\n' + row)
|
|
120
|
+
args[3]['feature_table'] = hashlib.sha256(args[1].read_bytes()).hexdigest()
|
|
121
|
+
with pytest.raises(ValueError, match='Malformed RefSeq feature-table row'):
|
|
122
|
+
build(args)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.30.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|