FA-12586 / Genomic coordinate mapping / Open access
CDS exon phase mistakes remaining bases for consumed bases · case 01
CDS exon phase mistakes remaining bases for consumed bases.
ROOT CAUSE
The carried coding remainder is used directly as the next segment phase.
VERIFIED REPAIR
Return the number of leading bases needed to complete the split codon, modulo three.
Unsuccessful approach: Using three minus the remainder without modulo three invents a full-codon skip at aligned junctions.
Case contract
Given lengths of preceding coding segments in transcript order, report GFF-like leading completion phase (3-total modulo 3) modulo 3. This model assumes the initial segment starts on a codon boundary.
Why this case matters
An abstract offline coordinate model isolates this software mapping defect; it does not model biological interpretation.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(lengths):
return sum(lengths)%3
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one carried base',solve([3*N+1]),2)
check('two carried bases',solve([3*N+2]),1)
check('aligned exon',solve([3*N]),0)
check('no preceding exon',solve([]),0)
check('multiple segments',solve([3*N+1,4]),1)
check('split closes codon',solve([3*N+1,2]),0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one carried base | 1 | 2 | Failed |
| two carried bases | 2 | 1 | Failed |
| aligned exon | 0 | 0 | Passed |
| no preceding exon | 0 | 0 | Passed |
| multiple segments | 2 | 1 | Failed |
| split closes codon | 0 | 0 | Passed |
SHA-256 / 95cb317d4b3a9ce87e46d6f229efe26a87e6bfe6be80115f27642745cf8d2551
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(lengths):
return 3-sum(lengths)%3
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one carried base',solve([3*N+1]),2)
check('two carried bases',solve([3*N+2]),1)
check('aligned exon',solve([3*N]),0)
check('no preceding exon',solve([]),0)
check('multiple segments',solve([3*N+1,4]),1)
check('split closes codon',solve([3*N+1,2]),0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one carried base | 2 | 2 | Passed |
| two carried bases | 1 | 1 | Passed |
| aligned exon | 3 | 0 | Failed |
| no preceding exon | 3 | 0 | Failed |
| multiple segments | 1 | 1 | Passed |
| split closes codon | 3 | 0 | Failed |
SHA-256 / 8ea2b41e73dece5b57452933487b19d618cfed678f622610daab4ed293936755
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(lengths):
return (-sum(lengths))%3
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('one carried base',solve([3*N+1]),2)
check('two carried bases',solve([3*N+2]),1)
check('aligned exon',solve([3*N]),0)
check('no preceding exon',solve([]),0)
check('multiple segments',solve([3*N+1,4]),1)
check('split closes codon',solve([3*N+1,2]),0)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| one carried base | 2 | 2 | Passed |
| two carried bases | 1 | 1 | Passed |
| aligned exon | 0 | 0 | Passed |
| no preceding exon | 0 | 0 | Passed |
| multiple segments | 1 | 1 | Passed |
| split closes codon | 0 | 0 | Passed |
SHA-256 / 6add019219780c9c0f9d3430c2f13102367449ea062a28e3a56abfca8dc05005
Verification & scope
Synthetic coordinate fixtures only; not a production annotation or alignment implementation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:58.146336+00:00.
Case digest / 2770de9ae26774de178c77f92c81c4cd974905ca34cd955b844dd25e20fb2c01