Skip to content

Support T2T-CHM13v2.0 and pinned rapid-release assemblies natively (#541) - #544

Merged
iskandr merged 2 commits into
mainfrom
feat/t2t-chm13-pinned-assemblies-541
Nov 22, 2026
Merged

iskandr merged 2 commits into
mainfrom
feat/t2t-chm13-pinned-assemblies-541

Conversation

@iskandr

@iskandr iskandr commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements native support for T2T-CHM13v2.0 (GCA_009914755.4 / hs1, Ensembl rapid-release 2022_07) and checksum-pinned rapid-release assemblies directly in pyensembl (v2.36.0).

Closes #541.

Changes

  • Bundled pinned assembly catalog (pyensembl/pinned_assemblies.json + packaged Ensembl GRCh38 rCRS NC_012920.1 mitochondrion files in pyensembl/data/):
    • Pins Ensembl rapid-release 2022_07 GTF/cDNA/protein URLs by exact SHA-256 and byte size.
    • Includes full assembly aliases (T2T-CHM13v2.0, hs1, GCA_009914755.4, GCF_009914755.1, chm13v2.0*, T2T-CHM13v1.1, t2t-chm13), UCSC/GenBank/RefSeq contig alias tables, explicit rejection of coordinate-incompatible older/draft versions (T2T-CHM13v1.0, GCA_009914755.2, etc.), and CP068254.1 vs NC_012920.1 (_rCRS) mitochondrion disambiguation.
  • Public lazy API (pyensembl/pinned_genomes.py, exported via PEP 562 from pyensembl):
    • PinnedGenome, PinnedAssembly, ReferenceAlias, ContigAlias, RCRS_ACCESSION, pinned_assemblies(), pinned_reference_aliases(), resolve_pinned_assembly(), find_pinned_reference_name(), is_rcrs_reference(), contig_aliases(), normalize_pinned_contig(), pinned_contig_spellings(), pinned_contig_lengths(), mitochondrion_note().
    • PinnedGenome.download() verifies SHA-256 + byte size before caching and merges the packaged NC_012920.1 rCRS mitochondrion annotation while keeping CHM13's native unannotated MT (CP068254.1) separate. PinnedGenome.verify_sources() verifies all pinned assets and the merged GTF offline.
  • Core & CLI integration:
    • normalize_reference_name(), find_species_by_reference(), genome_for_reference_name(), available_releases(), and pyensembl install/list/inspect/verify/available/delete-* all support pinned assemblies.
  • Version bump: 2.35.0 -> 2.36.0 with RELEASE_NOTES.md.

Verification

  • ./lint.sh: ruff + mypy passed.
  • ./test.sh: 1186 passed (94% coverage), including tests/test_pinned_assemblies.py.
  • python -m build --sdist --wheel && twine check: zero warnings, all data assets included.

)

- Add bundled pinned assembly catalog (T2T-CHM13v2.0 / GCA_009914755.4 / hs1,
  Ensembl rapid-release 2022_07) with SHA-256 + byte-size asset pins, UCSC/
  GenBank/RefSeq contig alias tables, explicit rejection of coordinate-
  incompatible draft/older versions (e.g. T2T-CHM13v1.0), and packaged rCRS
  (NC_012920.1) mitochondrial annotation distinct from CHM13's native MT
  (CP068254.1).
- Add PinnedGenome and lazy top-level helper exports in pyensembl/pinned_genomes.py.
- Wire pinned assemblies into normalize_reference_name, find_species_by_reference,
  genome_for_reference_name, available_releases, and the pyensembl CLI (install,
  list, inspect, verify, available, delete-*).
- Bump version to 2.36.0 and update RELEASE_NOTES.md.
@coveralls

coveralls commented Nov 21, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 93.656% (-0.2%) from 93.859% — feat/t2t-chm13-pinned-assemblies-541 into main

@iskandr
iskandr merged commit 9a4c466 into main Nov 22, 2026
9 checks passed
@iskandr
iskandr deleted the feat/t2t-chm13-pinned-assemblies-541 branch November 22, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support T2T-CHM13v2.0 (GCA_009914755.4 / hs1) and pinned rapid-release assemblies natively

2 participants