Initial commit

This commit is contained in:
2025-11-28 11:52:04 +08:00
commit f74dc351f7
51 changed files with 2402 additions and 0 deletions

33
tests/test_store_tsv.py Normal file
View File

@@ -0,0 +1,33 @@
from pathlib import Path
from genomic_consultant.store.query import GenomicStore
def test_from_tsv_with_extra_columns(tmp_path: Path):
content = "\t".join(
[
"#CHROM",
"POS",
"REF",
"ALT",
"SYMBOL",
"Consequence",
"Protein_position",
"PolyPhen",
"SIFT",
"CLIN_SIG",
"AF",
"gnomAD_AF",
"SpliceAI",
"CADD_PHRED",
]
) + "\n"
content += "1\t100\tA\tT\tGENE1\tmissense_variant\tp.X\t.\t.\tPathogenic\t0.0001\t0.0002\t0.05\t20.1\n"
path = tmp_path / "v.tsv"
path.write_text(content)
store = GenomicStore.from_tsv(path)
assert len(store.variants) == 1
v = store.variants[0]
assert v.annotations["splice_ai_delta_score"] == 0.05
assert v.annotations["cadd_phred"] == 20.1