{"abstract":"Original read positions map to the wrong reference base after reverse orientation and asymmetric soft clipping.","category":"Genomic coordinate mapping","checks":9,"contract":"For a synthetic ungapped alignment with leading/trailing soft clip lengths in alignment orientation, map a zero-based original read index to reference base or None. Query length is lead+aligned+trail. Reverse alignments reverse indexes across the entire query before clipping.","contract_signature":"lead, aligned, trail, start, reverse, pos","evaluation_group":"model-ef018c68618b6ce9","failed_approach":"Reversing only the unclipped aligned segment loses the position of asymmetric leading and trailing soft clips.","family":"z-genetics_coordinates-softclip-origin","id":"FA-12546","implementations":{"attempt":{"sha256":"1a9fb2bca275c5c8b8150d563e8401ef7c8bf10fd9ae07ce8f1bb882446394ad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(lead, aligned, trail, start, reverse, pos):\n    q=pos-lead\n    if reverse: q=aligned-1-q\n    return start+q if 0<=q<aligned else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlead=N; aligned=4; trail=N+2; length=lead+aligned+trail\ncheck('reverse first aligned original base',solve(lead,aligned,trail,100,True,trail),103)\ncheck('reverse last aligned original base',solve(lead,aligned,trail,100,True,trail+3),100)\ncheck('reverse preceding clipped base',solve(lead,aligned,trail,100,True,trail-1),None)\ncheck('reverse following clipped base',solve(lead,aligned,trail,100,True,trail+4),None)\ncheck('forward first aligned base',solve(lead,aligned,trail,100,False,lead),100)\ncheck('forward last aligned base',solve(lead,aligned,trail,100,False,lead+3),103)\ncheck('forward leading clip',solve(lead,aligned,trail,100,False,lead-1),None)\ncheck('outside original read',solve(lead,aligned,trail,100,True,length),None)\ncheck('negative original index',solve(lead,aligned,trail,100,True,-1),None)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4f62f4a45243fa4e6a11df0ab1be380968f06b91e8351525113d0b5c026bbb50","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(lead, aligned, trail, start, reverse, pos):\n    q=pos-lead\n    return start+q if 0<=q<aligned else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nlead=N; aligned=4; trail=N+2; length=lead+aligned+trail\ncheck('reverse first aligned original base',solve(lead,aligned,trail,100,True,trail),103)\ncheck('reverse last aligned original base',solve(lead,aligned,trail,100,True,trail+3),100)\ncheck('reverse preceding clipped base',solve(lead,aligned,trail,100,True,trail-1),None)\ncheck('reverse following clipped base',solve(lead,aligned,trail,100,True,trail+4),None)\ncheck('forward first aligned base',solve(lead,aligned,trail,100,False,lead),100)\ncheck('forward last aligned base',solve(lead,aligned,trail,100,False,lead+3),103)\ncheck('forward leading clip',solve(lead,aligned,trail,100,False,lead-1),None)\ncheck('outside original read',solve(lead,aligned,trail,100,True,length),None)\ncheck('negative original index',solve(lead,aligned,trail,100,True,-1),None)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-genetics_coordinates-softclip-origin","generated_at":"2026-09-29T14:38:57.931391+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An abstract offline coordinate model isolates this software mapping defect; it does not model biological interpretation.","root_cause":"Original query indexes are consumed directly in alignment orientation without accounting for reverse alignment.","sha256":"a3625bb04423e6799ce193cb2e26095b9446b765a34e564328a7c96c3e95e84a","title":"Reverse alignments apply soft clipping at the wrong query end · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.795,"exit_code":1,"observations":[{"actual":101,"check":"reverse first aligned original base","expected":103,"passed":false},{"actual":null,"check":"reverse last aligned original base","expected":100,"passed":false},{"actual":102,"check":"reverse preceding clipped base","expected":null,"passed":false},{"actual":null,"check":"reverse following clipped base","expected":null,"passed":true},{"actual":100,"check":"forward first aligned base","expected":100,"passed":true},{"actual":103,"check":"forward last aligned base","expected":103,"passed":true},{"actual":null,"check":"forward leading clip","expected":null,"passed":true},{"actual":null,"check":"outside original read","expected":null,"passed":true},{"actual":null,"check":"negative original index","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse first aligned original base\", \"actual\": 101, \"expected\": 103, \"passed\": false}, {\"check\": \"reverse last aligned original base\", \"actual\": null, \"expected\": 100, \"passed\": false}, {\"check\": \"reverse preceding clipped base\", \"actual\": 102, \"expected\": null, \"passed\": false}, {\"check\": \"reverse following clipped base\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"forward first aligned base\", \"actual\": 100, \"expected\": 100, \"passed\": true}, {\"check\": \"forward last aligned base\", \"actual\": 103, \"expected\": 103, \"passed\": true}, {\"check\": \"forward leading clip\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"outside original read\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"negative original index\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.846,"exit_code":1,"observations":[{"actual":102,"check":"reverse first aligned original base","expected":103,"passed":false},{"actual":null,"check":"reverse last aligned original base","expected":100,"passed":false},{"actual":101,"check":"reverse preceding clipped base","expected":null,"passed":false},{"actual":null,"check":"reverse following clipped base","expected":null,"passed":true},{"actual":100,"check":"forward first aligned base","expected":100,"passed":true},{"actual":103,"check":"forward last aligned base","expected":103,"passed":true},{"actual":null,"check":"forward leading clip","expected":null,"passed":true},{"actual":null,"check":"outside original read","expected":null,"passed":true},{"actual":null,"check":"negative original index","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse first aligned original base\", \"actual\": 102, \"expected\": 103, \"passed\": false}, {\"check\": \"reverse last aligned original base\", \"actual\": null, \"expected\": 100, \"passed\": false}, {\"check\": \"reverse preceding clipped base\", \"actual\": 101, \"expected\": null, \"passed\": false}, {\"check\": \"reverse following clipped base\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"forward first aligned base\", \"actual\": 100, \"expected\": 100, \"passed\": true}, {\"check\": \"forward last aligned base\", \"actual\": 103, \"expected\": 103, \"passed\": true}, {\"check\": \"forward leading clip\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"outside original read\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"negative original index\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}