Skip to content

Commit 8dc891f

Browse files
tomwhitejeromekelleher
authored andcommitted
Remove references to issue #180
1 parent 7d6d23a commit 8dc891f

File tree

3 files changed

+71
-14
lines changed

3 files changed

+71
-14
lines changed

tests/test_bcftools_validation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def run_vcztools(args: str, expect_error=False) -> tuple[str, str]:
5050
# https://github.com/sgkit-dev/vcztools/issues/189
5151
# ("view --no-version -i 'ID == \"rs6054257\"'", "sample.vcf.gz"),
5252
("view --no-version -i 'INFO/DP > 10'", "sample.vcf.gz"),
53-
# Filters based on FMT values are currently disabled.
54-
# https://github.com/sgkit-dev/vcztools/issues/180
5553
("view --no-version -i 'FMT/DP >= 5'", "sample.vcf.gz"),
5654
("view --no-version -i 'FMT/DP >= 5 && FMT/GQ > 10'", "sample.vcf.gz"),
5755
("view --no-version -i 'FMT/DP >= 5 & FMT/GQ>10'", "sample.vcf.gz"),

tests/test_filter.py

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class TestFilterExpressionSample:
7070
[
7171
("POS < 1000", [1, 1, 0, 0, 0, 0, 0, 0, 1]),
7272
("INFO/DP > 10", [0, 0, 1, 1, 0, 1, 0, 0, 0]),
73-
# Not supporting format fields for now: #180
7473
(
7574
"FMT/GQ > 20",
7675
[
@@ -85,14 +84,76 @@ class TestFilterExpressionSample:
8584
[0, 0, 0],
8685
],
8786
),
88-
# ("FMT/DP >= 5 && FMT/GQ > 10", [0, 0, 1, 1, 1, 0, 0, 0, 0]),
89-
# ("GT > 0", [1, 1, 1, 1, 1, 0, 1, 0, 1]),
90-
# ("GT > 0 & FMT/HQ >= 10", [0, 0, 1, 1, 1, 0, 0, 0, 0]),
91-
# ("FMT/DP >= 5 & FMT/GQ>10", [0, 0, 1, 0, 1, 0, 0, 0, 0]),
92-
# ("QUAL > 10 || FMT/GQ>10", [0, 0, 1, 1, 1, 1, 1, 0, 0]),
93-
# ("(QUAL > 10 || FMT/GQ>10) && POS > 100000", [0, 0, 0, 0, 1, 1, 1, 0, 0]),
94-
# ("(FMT/DP >= 8 | FMT/GQ>40) && POS > 100000",
95-
# [0, 0, 0, 0, 0, 1, 0, 0, 0]),
87+
(
88+
"FMT/DP >= 5 && FMT/GQ > 10",
89+
[
90+
[0, 0, 0],
91+
[0, 0, 0],
92+
[1, 1, 1],
93+
[1, 1, 1],
94+
[1, 0, 1],
95+
[0, 0, 0],
96+
[0, 0, 0],
97+
[0, 0, 0],
98+
[0, 0, 0],
99+
],
100+
),
101+
(
102+
"FMT/DP >= 5 & FMT/GQ > 10",
103+
[
104+
[0, 0, 0],
105+
[0, 0, 0],
106+
[0, 1, 1],
107+
[0, 0, 0],
108+
[1, 0, 0],
109+
[0, 0, 0],
110+
[0, 0, 0],
111+
[0, 0, 0],
112+
[0, 0, 0],
113+
],
114+
),
115+
(
116+
"QUAL > 10 || FMT/GQ > 10",
117+
[
118+
[0, 0, 0],
119+
[0, 0, 0],
120+
[1, 1, 1],
121+
[1, 1, 1],
122+
[1, 1, 1],
123+
[1, 1, 1],
124+
[1, 1, 1],
125+
[0, 0, 0],
126+
[0, 0, 0],
127+
],
128+
),
129+
(
130+
"(QUAL > 10 || FMT/GQ > 10) && POS > 100000",
131+
[
132+
[0, 0, 0],
133+
[0, 0, 0],
134+
[0, 0, 0],
135+
[0, 0, 0],
136+
[1, 1, 1],
137+
[1, 1, 1],
138+
[1, 1, 1],
139+
[0, 0, 0],
140+
[0, 0, 0],
141+
],
142+
),
143+
(
144+
"(FMT/DP >= 8 | FMT/GQ > 40) && POS > 100000",
145+
[
146+
[0, 0, 0],
147+
[0, 0, 0],
148+
[0, 0, 0],
149+
[0, 0, 0],
150+
[0, 0, 0],
151+
[1, 1, 1],
152+
[0, 0, 0],
153+
[0, 0, 0],
154+
[0, 0, 0],
155+
],
156+
),
96157
],
97158
)
98159
def test(self, expression, expected_result):

tests/test_vcf_writer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,11 @@ def test_write_vcf__no_samples(tmp_path):
222222
assert v.samples == []
223223

224224

225-
# @pytest.mark.skip("Sample filtering not implemented: #180")
226225
@pytest.mark.parametrize(
227226
("regions", "targets", "samples", "include", "expected_chrom_pos"),
228227
[
229228
# Test that sample filtering takes place after include filtering.
230-
# Not supporting format fields in filtering for now: #180
231-
# ("20", None, "NA00001", "FMT/GQ > 60", [("20", 1230237)]),
229+
("20", None, "NA00001", "FMT/GQ > 60", [("20", 1230237)]),
232230
# Test that region filtering and include expression are combined.
233231
("19", None, "NA00001", "POS > 200", []),
234232
# Test that target filtering and include expression are combined.

0 commit comments

Comments
 (0)