Skip to content

Commit 428a1f1

Browse files
tomwhitejeromekelleher
authored andcommitted
Add new view test to bcftools_validation that checks combination of region, includes, and sample filters
1 parent 8dc891f commit 428a1f1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/test_bcftools_validation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def run_vcztools(args: str, expect_error=False) -> tuple[str, str]:
8686
("view --no-version -s ^NA00003,NA00002", "sample.vcf.gz"),
8787
("view --no-version -s ^NA00003,NA00002,NA00003", "sample.vcf.gz"),
8888
("view --no-version -S ^tests/data/txt/samples.txt", "sample.vcf.gz"),
89+
(
90+
"view --no-version -r '20:1230236-' -i 'FMT/DP>3' -s 'NA00002,NA00003'",
91+
"sample.vcf.gz"
92+
)
8993
],
9094
# This is necessary when trying to run individual tests, as the arguments above
9195
# make for unworkable command lines

vcztools/vcf_writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ def c_chunk_to_vcf(
222222
for name, array in chunk_data.items():
223223
if (
224224
name.startswith("call_")
225+
and not name == "call_mask"
225226
and not name.startswith("call_genotype")
226227
and num_samples != 0
227228
):

0 commit comments

Comments
 (0)