Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to VcfComparator #8973

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ public class VCFComparatorIntegrationTest extends CommandLineProgramTest {

@DataProvider(name = "getTestVcfs")
public Object[][] getTestVcfs() {
return new Object[][] {
{ " -L chr1:186475", "expected_warning_as_vqslod.txt" },
{ " -L chr1:186475 --ignore-attribute AS_VQSLOD", "empty_file.txt" },
{ " -L chr1:187471 --ignore-attribute AS_VQSLOD", "expected_warning_filter.txt" },
{ " -L chr1:186475-945669 " + DEFAULT_WARP_SETTINGS, "empty_file.txt" },
{ " -L chr1:945670 " + DEFAULT_WARP_SETTINGS, "qual_diff_warning.txt"}, // different QUAL values
{ " -L chr1:945670 --qual-change-allowed 0.1 --ignore-attribute AS_VQSLOD", "empty_file.txt"},
{ " -L chr1:186475 --mute-acceptable-diffs", "empty_file.txt" } // low quality site is muted even though the AS_VQSLOD is different
return new Object[][]{
{" -L chr1:186475", "expected_warning_as_vqslod.txt"},
{" -L chr1:186475 --ignore-attribute AS_VQSLOD", "empty_file.txt"},
{" -L chr1:187471 --ignore-attribute AS_VQSLOD", "expected_warning_filter.txt"},
{" -L chr1:186475-945669 " + DEFAULT_WARP_SETTINGS, "empty_file.txt"},
{" -L chr1:945670 " + DEFAULT_WARP_SETTINGS, "qual_diff_warning.txt"}, // different QUAL values
{" -L chr1:945670 --qual-change-allowed 0.1 --ignore-attribute AS_VQSLOD", "empty_file.txt"},
{" -L chr1:186475 --mute-acceptable-diffs", "empty_file.txt"} // low quality site is muted even though the AS_VQSLOD is different
};
}

@Test(dataProvider = "getTestVcfs")
public void testAnnotationDifferences(String args, String expectedWarnings) throws IOException {
final IntegrationTestSpec testSpec = new IntegrationTestSpec(
" -R " + hg38Reference +
" -R " + hg38Reference +
" -V:actual " + TEST_DATA_DIRECTORY + "actual.vcf" +
" -V:expected " + TEST_DATA_DIRECTORY + "expected.vcf" +
" --output-warnings %s" +
Expand Down Expand Up @@ -66,13 +66,16 @@ public void testExpectedFailure() {

@DataProvider(name = "getTestGvcfs")
public Object[][] getTestGvcfs() {
return new Object[][] {
{ " -L chr1:864084-864610", "empty_file.txt" }, //matching ref blocks
{ " -L chr1:54682-347969", "ref_block_warning.txt"}, // non-matching ref block
{ " -L chr1:792417", "tree_score_warning.txt"}, // variant site
{ " -L chr1:792417 --ignore-non-ref-data --" +
return new Object[][]{
{" -L chr1:864084-864610", "empty_file.txt"}, //matching ref blocks
{" -L chr1:54682-347969", "ref_block_warning.txt"}, // non-matching ref block
{" -L chr1:792417", "tree_score_warning.txt"}, // variant site
{" -L chr1:792417 --ignore-non-ref-data --" +
ReblockGVCF.ANNOTATIONS_TO_KEEP_LONG_NAME + " TREE_SCORE", "tree_score_warning.txt"}, // when non-ref data is dropped non-GATK annotations can be dropped
{ " -L chr1:792417 --ignore-attribute TREE_SCORE", "empty_file.txt"}
{" -L chr1:792417 --ignore-attribute TREE_SCORE --ignore-non-ref-data", "empty_file.txt"}, // check that RAW_MQandDP matches with and without --ignore-non-ref-data
{" -L chr1:792417 --ignore-attribute TREE_SCORE", "empty_file.txt"},
{" -L chr1:950542", "depth_warning.txt"},
{" -L chr1:950542 --ignore-gq0", "empty_file.txt"}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3507,3 +3507,4 @@ chr1 922687 . C <NON_REF> . . END=922690 GT:DP:GQ 0/0:7:20
chr1 922691 . C <NON_REF> . . END=922701 GT:DP:GQ 0/0:7:0
chr1 922702 . C <NON_REF> . . END=922711 GT:DP:GQ 0/0:7:20
chr1 922712 . T <NON_REF> . . END=950541 GT:DP:GQ 0/0:4:0
chr1 950542 . G <NON_REF> . . END=950543 GT:DP:GQ 0/0:4:0
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3506,3 +3506,4 @@ chr1 922687 . C <NON_REF> . . END=922690 GT:DP:GQ 0/0:7:20
chr1 922691 . C <NON_REF> . . END=922701 GT:DP:GQ 0/0:7:0
chr1 922702 . C <NON_REF> . . END=922711 GT:DP:GQ 0/0:7:20
chr1 922712 . T <NON_REF> . . END=950541 GT:DP:GQ 0/0:4:0
chr1 950542 . G <NON_REF> . . END=950543 GT:DP:GQ 0/0:5:0
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
At position chr1:950542 Genotypes have different DP value: actual has 4 expected has 5
Loading