arda-mapper 2.31.0 — the germline boundary in nucleotides
Cdr3Markup gains v_end_nt and j_start_nt beside v_end and j_start. The residue counts are
unchanged — dpost slices the non-templated middle with them, and that contract is what they are for.
An exonuclease does not stop on a codon boundary, so the last residue a germline touches is usually
part germline and part N region, and an alignment on the protein can only round that to a whole
residue. What the protein still fixes is which nucleotides are admissible: 17 of the 20 residues open
every one of their codons with the same base. Against a germline GGA (Gly) an observed Glu can only
be GAA or GAG, both of which begin with the germline's G, so the germline demonstrably reaches
one nucleotide further — and an aligner reading the observed sequence counts it as germline whether it
was templated or an insertion reproduced it. Where a residue's codons disagree, they are weighed by
how far each would let the germline reach: a templated nucleotide is free, one that matches by chance
costs 1/4.
Measured against isalgo/airr_control's human.trb.ntvj, on the 8,133 VDJdb human TRB junctions
whose boundary every control observation agrees on:
| quantity | 2.30.1 | 2.31.0 |
|---|---|---|
v.end, VDJdb residue convention (nt + 1) // 3, exact |
5,839 (71.79 %) | 7,556 (92.91 %) |
j.start, VDJdb residue convention ceil(nt / 3), exact |
7,968 (97.97 %) | 7,968 (97.97 %) |
| V boundary in nucleotides, exact | 2,355 (28.96 %) | 6,538 (80.39 %) |
| J boundary in nucleotides, exact | 2,462 (30.27 %) | 6,057 (74.47 %) |
VDJdb's legacy k-mer scanner measures 71.8 % on the same set — the same number as 2.30.1, because both
answer in whole residues. j.start cannot move and does not: VDJdb defines it as the first fully
J-templated residue, which is the same residue whether the germline reaches one or two nucleotides into
the one before it.
The two sides are bounded by different things. The V residue count is right on 83.99 % of records and
the extension on 95.71 % of those, so V is limited by the protein alignment. The J count is right
on 97.97 % and the extension on 76.02 %, because the nucleotide a J boundary turns on is the
codon's third — the one position the genetic code leaves free.
This is antigenomics/vdjtools#182; vdjtools 4.7.0 consumes it as model.germline_boundary.