FAILURE MAP
← Case archive

FA-12581 / Genomic coordinate mapping / Open access

Coding coordinates include untranslated transcript prefix · case 01

Coding coordinates include untranslated transcript prefix.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Coding position uses full transcript offset as its origin.

VERIFIED REPAIR

Subtract coding start and reject both untranslated regions before calculating codon and within-codon offset.

Unsuccessful approach: Subtracting the origin without excluding downstream untranslated bases invents codons.

Case contract

For half-open coding transcript range [start,end), return [zero-based codon,within-codon offset]; outside coding range return None.

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(start, end, pos):
    return [pos//3,pos%3]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=N+4;e=s+9
check('coding origin',solve(s,e,s),[0,0])
check('second codon',solve(s,e,s+3),[1,0])
check('within codon',solve(s,e,s+5),[1,2])
check('last coding base',solve(s,e,e-1),[2,2])
check('upstream untranslated',solve(s,e,s-1),None)
check('downstream untranslated',solve(s,e,e),None)
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 fixtureActualExpectedOutcome
coding origin[1, 2][0, 0]Failed
second codon[2, 2][1, 0]Failed
within codon[3, 1][1, 2]Failed
last coding base[4, 1][2, 2]Failed
upstream untranslated[1, 1]NoneFailed
downstream untranslated[4, 2]NoneFailed

SHA-256 / 7e7d464c6c83d3f8d4d07feae7eacc4173bc2a25d6347de25e78162c15e08af0

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(start, end, pos):
    return [(pos-start)//3,(pos-start)%3] if pos>=start else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=N+4;e=s+9
check('coding origin',solve(s,e,s),[0,0])
check('second codon',solve(s,e,s+3),[1,0])
check('within codon',solve(s,e,s+5),[1,2])
check('last coding base',solve(s,e,e-1),[2,2])
check('upstream untranslated',solve(s,e,s-1),None)
check('downstream untranslated',solve(s,e,e),None)
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 fixtureActualExpectedOutcome
coding origin[0, 0][0, 0]Passed
second codon[1, 0][1, 0]Passed
within codon[1, 2][1, 2]Passed
last coding base[2, 2][2, 2]Passed
upstream untranslatedNoneNonePassed
downstream untranslated[3, 0]NoneFailed

SHA-256 / caa6d361087fb4d5cfdedd2f337205db861887a829c20d3d25c2af2dcceff664

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(start, end, pos):
    return [(pos-start)//3,(pos-start)%3] if start<=pos<end else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=N+4;e=s+9
check('coding origin',solve(s,e,s),[0,0])
check('second codon',solve(s,e,s+3),[1,0])
check('within codon',solve(s,e,s+5),[1,2])
check('last coding base',solve(s,e,e-1),[2,2])
check('upstream untranslated',solve(s,e,s-1),None)
check('downstream untranslated',solve(s,e,e),None)
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 fixtureActualExpectedOutcome
coding origin[0, 0][0, 0]Passed
second codon[1, 0][1, 0]Passed
within codon[1, 2][1, 2]Passed
last coding base[2, 2][2, 2]Passed
upstream untranslatedNoneNonePassed
downstream untranslatedNoneNonePassed

SHA-256 / 2a893fd7930826e59ce7eadd34565584b7ca5a8e2646602bf3bc067bb3872913

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.145581+00:00.

Case digest / 02a0f5c34e80558fc7dfdb2a7105c4a8cd834fcb75adb27159e5181bd3d889a1