• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pirl-unc / tcrsift / 26508828495
84%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 11:39AM UTC
Jobs 4
Files 29
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 May 2026 11:37AM UTC coverage: 77.446% (+0.2%) from 77.235%
26508828495

push

github

web-flow
Fix #91: trim VDJ_nt contig overshoot + add NT→AA round-trip checks (#93)

Closes #91. CellRanger-produced ``VDJ_*_nt`` typically has a +1
trailing nucleotide past the J segment — a contig annotation
artifact that does not encode any AA. The assembler was passing it
through verbatim, then concatenating ``leader_nt + vdj_nt +
constant_nt`` for ``full_*_nt``. Result: the +1 nt frame-shifted
everything past the VDJ→C boundary. ``full_*_nt`` and
``single_chain_nt`` translated correctly through the variable region
and then garbled. 0/118 selected clones in B1-2/B1-3 had a
translatable ``single_chain_nt``.

Fix at the source in ``_assemble_clone``: trim ``VDJ_*_nt`` to
``3 * len(VDJ_*_aa)`` at read time, so the canonical stored
``vdj_*_nt`` is always a clean ORF and every downstream NT
concatenation translates back to the assembled AA.

The root cause this PR addresses is broader than the trim itself:
per-component unit tests passed (each NT translated to its AA in
isolation), but no integration check verified that the spliced NT
translates to the spliced AA. Same shape as the #90 j_gene-drop
bug, which was also invisible to unit tests and only caught by E2E
validation.

New ``_validate_nt_aa_roundtrip`` (called from validate_sequences
as step 4) enforces, per clone:

  - translate(vdj_*_nt) == vdj_*_aa  (no stop)
  - translate(constant_*_nt[:-3]) == constant_*_aa  (drop trailing stop)
  - translate(full_*_nt[:-3]) == full_*_aa  ← would catch #91 on day one
  - translate(single_chain_nt[:-3]) == single_chain_aa

Each check appends a load-bearing ValidationMessage (with .idx and
.severity) so existing strict-mode and ``strict="skip"`` paths in
``create_tcr_sequence_pdf`` handle round-trip failures the same way
as length / parity / etc.

Tests: 5 new E2E tests in TestAssembleEndToEndNTRoundTrip. The
fixture mirrors the CellRanger artifact (back-translated VDJ_aa
plus a synthetic +1 nt) so it would have failed against pre-fix
code. Also a synthetic-frame-break... (continued)

6428 of 8300 relevant lines covered (77.45%)

3.1 hits per line

Coverage Regressions

Lines Coverage ∆ File
40
89.12
1.62% assemble.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.11 - 26508828495.1 27 May 2026 11:39AM UTC 29
77.44
GitHub Action Run
2 python-3.12 - 26508828495.2 27 May 2026 11:39AM UTC 29
77.44
GitHub Action Run
3 python-3.10 - 26508828495.3 27 May 2026 11:39AM UTC 29
77.44
GitHub Action Run
4 python-3.9 - 26508828495.4 27 May 2026 11:39AM UTC 29
77.41
GitHub Action Run
Source Files on build 26508828495
  • Tree
  • List 29
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26508828495
  • e2a27670 on github
  • Prev Build on main (#26507556513)
  • Next Build on main (#26512622428)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc