FAILURE MAP
← Case archive

FA-12571 / Genomic coordinate mapping / Open access

Inserted query bases acquire fabricated reference coordinates · case 01

Inserted query bases acquire fabricated reference coordinates.

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

ROOT CAUSE

Inserted bases are projected onto the next reference position.

VERIFIED REPAIR

Represent insertions as unmapped while still advancing the query cursor.

Unsuccessful approach: Skipping insertion query advancement shifts all downstream query coordinates.

Case contract

Map query bases through M/I/D; query insertion bases have no reference coordinate.

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(ops, start, pos):
    q=0;r=start
    for op,size in ops:
     if op=='M':
      if q <= pos < q+size: return r+pos-q
      q+=size;r+=size
     elif op=='I':
      if q <= pos < q+size: return r
      q+=size
     elif op=='D': r+=size
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
o=[('M',2),('I',N+1),('M',3)]
check('first inserted',solve(o,50,2),None)
check('last inserted',solve(o,50,N+2),None)
check('first downstream',solve(o,50,N+3),52)
check('last downstream',solve(o,50,N+5),54)
check('before insertion',solve(o,50,1),51)
check('past end',solve(o,50,N+6),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
first inserted52NoneFailed
last inserted52NoneFailed
first downstream5252Passed
last downstream5454Passed
before insertion5151Passed
past endNoneNonePassed

SHA-256 / f5114ae981bb83c0e684fd79753f35463659c95f07908c4caf17f185aa73b291

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(ops, start, pos):
    q=0;r=start
    for op,size in ops:
     if op=='M':
      if q <= pos < q+size: return r+pos-q
      q+=size;r+=size
     elif op=='I':
      if q <= pos < q+size: return None
      q+=0
     elif op=='D': r+=size
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
o=[('M',2),('I',N+1),('M',3)]
check('first inserted',solve(o,50,2),None)
check('last inserted',solve(o,50,N+2),None)
check('first downstream',solve(o,50,N+3),52)
check('last downstream',solve(o,50,N+5),54)
check('before insertion',solve(o,50,1),51)
check('past end',solve(o,50,N+6),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
first insertedNoneNonePassed
last insertedNoneNonePassed
first downstream5452Failed
last downstreamNone54Failed
before insertion5151Passed
past endNoneNonePassed

SHA-256 / 033d2305a6f0e8b950b01c0881a6b25dbaa3be0e1230b10eb8f03a1e39beba62

3 / The verified repair

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

N = 1
observations = []
def solve(ops, start, pos):
    q=0;r=start
    for op,size in ops:
     if op=='M':
      if q <= pos < q+size: return r+pos-q
      q+=size;r+=size
     elif op=='I':
      if q <= pos < q+size: return None
      q+=size
     elif op=='D': r+=size
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
o=[('M',2),('I',N+1),('M',3)]
check('first inserted',solve(o,50,2),None)
check('last inserted',solve(o,50,N+2),None)
check('first downstream',solve(o,50,N+3),52)
check('last downstream',solve(o,50,N+5),54)
check('before insertion',solve(o,50,1),51)
check('past end',solve(o,50,N+6),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
first insertedNoneNonePassed
last insertedNoneNonePassed
first downstream5252Passed
last downstream5454Passed
before insertion5151Passed
past endNoneNonePassed

SHA-256 / 33049784696ab671ad5574af44aeabe9fd70978bd5a3e29a7e6791cce4273661

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

Case digest / 8712e6310170f49f7396bd03e31dcc94fa52e5bac65dbe8d86a8c2dbf4542773