test: packaged CN data files
ci / test (3.12) (push) Failing after 8s
ci / test (3.13) (push) Failing after 10s

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01814GKVzZVL3FuF3DeiZXhv
This commit is contained in:
kemalandClaude Opus 5.5 committed 2026-09-29 07:07:03 +01:00
1 parent b2e0c09f2a
commit 65502eb8e4
1 file changed
+9
+9
View File
@@ -219,3 +219,12 @@ def test_cn_annotate_end_to_end(tmp_path: Path) -> None: # CYTO-032 / CYTO-033
assert {c["id"] for c in doc["chromosomes"]} == {"1", "2"}
normal = json.loads((out / "200000000001_R02C01.cyto.json").read_text())
assert normal["iscn_microarray"] in ("arr[GRCh38](1-22,X)x2", "arr[GRCh37](1-22,X)x2") or normal["events"]
def test_packaged_cn_data() -> None: # the built-in mask and cytobands ship with the package (CYTO-017, CYTO-035)
from simurg.pipeline.cn import _builtin_file, read_mask
for build in ("GRCh37", "GRCh38"):
m = read_mask(None, build)
assert len(m) >= 24 and all(s <= e for iv in m.values() for s, e in iv)
assert gzip.decompress(_builtin_file(f"cytoBand_{build}.txt.gz")).startswith(b"chr1\t0\t")