P4 validated on 2141 vendor GTCs; legacy AutoCall 1.6.2 preset
- vendor comparison (1000 Genomes Omni2.5, AutoCall 1.6.2.2): every computed field identical in 2138/2141 samples; the 3 others trace back to the single-locus raw-intensity rule (K-009); sex rule 1 matches all - AutoCall 1.6.2.x leaves GC10/GC50/#calls/#no-calls at 0 in GTC v3: new `--preset autocall-1.6.2` (1.1.2 normalization, sex rule 1, GTC v3, legacy statistics); the sample summary keeps the real statistics - NaN sign canonicalised to the x86 pattern (K-014); report P4.md
This commit is contained in:
1 parent
e6cf273ab4
commit
d11226ca31
9 files changed
+792
-29
No files matched your search
@@ -233,3 +233,25 @@ def test_cluster_alignment_errors(tmp_path: Path) -> None:
|
||||
assert e.value.code == "E_EGT_MANIFEST_MISMATCH"
|
||||
c = align_clusters(read_egt(tmp_path / "small.egt"), read_bpm(f["bpm"]), allow_missing=True)
|
||||
assert int(c.present.sum()) == 1
|
||||
|
||||
|
||||
def test_legacy_preset(tmp_path: Path) -> None:
|
||||
from simurg.cli.main import app
|
||||
|
||||
f = _synthetic_run(tmp_path)
|
||||
out = tmp_path / "legacy"
|
||||
r = CliRunner().invoke(app, ["genotype", "--quiet", "--bpm", str(f["bpm"]), "--egt", str(f["egt"]),
|
||||
"--idats", str(f["idats"]), "--out", str(out), "--threads", "1",
|
||||
"--preset", "autocall-1.6.2"])
|
||||
assert r.exit_code == 0, r.output
|
||||
gtc = next(out.rglob("*.gtc"))
|
||||
g = read_gtc(gtc)
|
||||
assert g.version == 3 and g.gc10 == 0 and g.num_calls == 0 and g.gc50 == 0 # vendor 1.6.2.x conventions
|
||||
summary = json.loads((out / "sample_summary.json").read_text())
|
||||
s0 = summary["samples"][0]
|
||||
assert s0["n_calls"] > 0 and s0["gc10"] > 0 # the summary still reports the real statistics
|
||||
run = json.loads((out / "run_manifest.json").read_text())
|
||||
assert run["effective_options"]["effective_norm_version"]["value"] == "1.1.2"
|
||||
bad = CliRunner().invoke(app, ["genotype", "--bpm", str(f["bpm"]), "--egt", str(f["egt"]), "--idats",
|
||||
str(f["idats"]), "--out", str(tmp_path / "x"), "--preset", "nope"])
|
||||
assert bad.exit_code == 2
|
||||
Reference in new issue
Block a user