FA-11896 / Scientific pipeline provenance / Open access
Equal read counts hide mismatched mate identities · case 01
Equal read counts hide mismatched mate identities.
ROOT CAUSE
Pairing uses position without checking read identity.
VERIFIED REPAIR
Match unique IDs across mate streams and report sorted paired and orphan IDs.
Unsuccessful approach: Comparing sorted IDs only checks equal counts and overlooks unmatched reads.
Case contract
Each mate stream has unique read IDs; return paired intersection and symmetric-difference orphan IDs as sorted lists.
Why this case matters
A deterministic offline model of scientific workflow bookkeeping; the fixtures test provenance contracts without modeling instruments or biological inference.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(left, right):
return {'paired': sorted(left[:min(len(left),len(right))]), 'orphans': []}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='read'+str(N)
check('same size different mates', solve([a,'b'], [a,'c']), {'paired':[a], 'orphans':['b','c']})
check('reordered mates', solve(['b',a], [a,'b']), {'paired':sorted(['b',a]), 'orphans':[]})
check('left orphan', solve([a,'b'], [a]), {'paired':[a], 'orphans':['b']})
check('right orphan', solve([a], [a,'b']), {'paired':[a], 'orphans':['b']})
check('no reads', solve([], []), {'paired':[], 'orphans':[]})
check('no overlap', solve(['a'], ['b']), {'paired':[], 'orphans':['a','b']})
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 |
|---|---|---|---|
| same size different mates | {'orphans': [], 'paired': ['b', 'read1']} | {'orphans': ['b', 'c'], 'paired': ['read1']} | Failed |
| reordered mates | {'orphans': [], 'paired': ['b', 'read1']} | {'orphans': [], 'paired': ['b', 'read1']} | Passed |
| left orphan | {'orphans': [], 'paired': ['read1']} | {'orphans': ['b'], 'paired': ['read1']} | Failed |
| right orphan | {'orphans': [], 'paired': ['read1']} | {'orphans': ['b'], 'paired': ['read1']} | Failed |
| no reads | {'orphans': [], 'paired': []} | {'orphans': [], 'paired': []} | Passed |
| no overlap | {'orphans': [], 'paired': ['a']} | {'orphans': ['a', 'b'], 'paired': []} | Failed |
SHA-256 / 79caaaadb5ea23d6e9d0b4908cbedb116d6951b15749fe8e0caf84f3569c2644
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(left, right):
return {'paired': sorted(left) if len(left)==len(right) else [], 'orphans': sorted(set(left)^set(right))}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='read'+str(N)
check('same size different mates', solve([a,'b'], [a,'c']), {'paired':[a], 'orphans':['b','c']})
check('reordered mates', solve(['b',a], [a,'b']), {'paired':sorted(['b',a]), 'orphans':[]})
check('left orphan', solve([a,'b'], [a]), {'paired':[a], 'orphans':['b']})
check('right orphan', solve([a], [a,'b']), {'paired':[a], 'orphans':['b']})
check('no reads', solve([], []), {'paired':[], 'orphans':[]})
check('no overlap', solve(['a'], ['b']), {'paired':[], 'orphans':['a','b']})
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 |
|---|---|---|---|
| same size different mates | {'orphans': ['b', 'c'], 'paired': ['b', 'read1']} | {'orphans': ['b', 'c'], 'paired': ['read1']} | Failed |
| reordered mates | {'orphans': [], 'paired': ['b', 'read1']} | {'orphans': [], 'paired': ['b', 'read1']} | Passed |
| left orphan | {'orphans': ['b'], 'paired': []} | {'orphans': ['b'], 'paired': ['read1']} | Failed |
| right orphan | {'orphans': ['b'], 'paired': []} | {'orphans': ['b'], 'paired': ['read1']} | Failed |
| no reads | {'orphans': [], 'paired': []} | {'orphans': [], 'paired': []} | Passed |
| no overlap | {'orphans': ['a', 'b'], 'paired': ['a']} | {'orphans': ['a', 'b'], 'paired': []} | Failed |
SHA-256 / 6d651f59d927a90846f5504aa21a376ae893fc11aac1584c02fada2c6fd80760
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(left, right):
return {'paired': sorted(set(left)&set(right)), 'orphans': sorted(set(left)^set(right))}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='read'+str(N)
check('same size different mates', solve([a,'b'], [a,'c']), {'paired':[a], 'orphans':['b','c']})
check('reordered mates', solve(['b',a], [a,'b']), {'paired':sorted(['b',a]), 'orphans':[]})
check('left orphan', solve([a,'b'], [a]), {'paired':[a], 'orphans':['b']})
check('right orphan', solve([a], [a,'b']), {'paired':[a], 'orphans':['b']})
check('no reads', solve([], []), {'paired':[], 'orphans':[]})
check('no overlap', solve(['a'], ['b']), {'paired':[], 'orphans':['a','b']})
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 |
|---|---|---|---|
| same size different mates | {'orphans': ['b', 'c'], 'paired': ['read1']} | {'orphans': ['b', 'c'], 'paired': ['read1']} | Passed |
| reordered mates | {'orphans': [], 'paired': ['b', 'read1']} | {'orphans': [], 'paired': ['b', 'read1']} | Passed |
| left orphan | {'orphans': ['b'], 'paired': ['read1']} | {'orphans': ['b'], 'paired': ['read1']} | Passed |
| right orphan | {'orphans': ['b'], 'paired': ['read1']} | {'orphans': ['b'], 'paired': ['read1']} | Passed |
| no reads | {'orphans': [], 'paired': []} | {'orphans': [], 'paired': []} | Passed |
| no overlap | {'orphans': ['a', 'b'], 'paired': []} | {'orphans': ['a', 'b'], 'paired': []} | Passed |
SHA-256 / 649480b76759ab2fb460c504a615940e1eff6dc7dc1996eac4e05528ad8984d4
Verification & scope
In-memory symbolic records only; no instrument, assay, or production workflow validation. 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:51.961075+00:00.
Case digest / c4cb0d235bec3e6e2024b52caa5012c7be4fa14b079866df7e3c8c8c6b01f503