Skip to content

Commit 96a495b

Browse files
committed
test ambiguous variant
1 parent d101b40 commit 96a495b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pgscatalog.match/tests/test_match_cli.py

+12
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,18 @@ def test_duplicated(tmp_path_factory, good_variants, duplicated_scorefile):
135135
assert all("test2" in x and "test3" in x for x in f1variants)
136136
assert all("test" in x for x in f2variants)
137137

138+
# ambiguous variant correctly dropped (REF_FLIP == ALT)
139+
with open(duplicated_scorefile) as f:
140+
input = list(csv.DictReader(f, delimiter="\t"))
141+
142+
assert "18:24337424:C:G" in [
143+
":".join(
144+
[x["chr_name"], x["chr_position"], x["effect_allele"], x["other_allele"]]
145+
)
146+
for x in input
147+
]
148+
assert "18:24337424:C:G" not in (x["ID"] for x in f1variants + f2variants)
149+
138150

139151
def test_multiallelic(tmp_path_factory, multiallelic_variants, good_scorefile):
140152
outdir = tmp_path_factory.mktemp("outdir")

0 commit comments

Comments
 (0)