Initial commit
This commit is contained in:
33
tests/test_store_tsv.py
Normal file
33
tests/test_store_tsv.py
Normal 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
|
||||
Reference in New Issue
Block a user