From 5f82ffd5d85822b35cde2a16e8ea2a79533c7743 Mon Sep 17 00:00:00 2001 From: Ryan Poplin Date: Fri, 10 Aug 2012 11:25:14 -0400 Subject: [PATCH] Adding LowQual filter to the output of the HaplotypeCaller. --- .../gatk/walkers/haplotypecaller/HaplotypeCaller.java | 4 ++++ .../haplotypecaller/HaplotypeCallerIntegrationTest.java | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java index 6bb894323..8ab36050b 100755 --- a/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java +++ b/protected/java/src/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCaller.java @@ -275,6 +275,10 @@ public class HaplotypeCaller extends ActiveRegionWalker implem headerInfo.add(new VCFInfoHeaderLine("extType", 1, VCFHeaderLineType.String, "Extended type of event: SNP, MNP, INDEL, or COMPLEX")); headerInfo.add(new VCFInfoHeaderLine("QDE", 1, VCFHeaderLineType.Float, "QD value divided by the number of variants found on the haplotype that contained this variant")); + // FILTER fields are added unconditionally as it's not always 100% certain the circumstances + // where the filters are used. For example, in emitting all sites the lowQual field is used + headerInfo.add(new VCFFilterHeaderLine(UnifiedGenotyperEngine.LOW_QUAL_FILTER_NAME, "Low quality")); + vcfWriter.writeHeader(new VCFHeader(headerInfo, samples)); try { diff --git a/protected/java/test/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java b/protected/java/test/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java index a87703423..6fdfb83e4 100644 --- a/protected/java/test/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java +++ b/protected/java/test/org/broadinstitute/sting/gatk/walkers/haplotypecaller/HaplotypeCallerIntegrationTest.java @@ -20,17 +20,17 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { @Test public void testHaplotypeCallerMultiSample() { - HCTest(CEUTRIO_BAM, "", "7b4e76934e0c911220b4e7da8776ab2b"); + HCTest(CEUTRIO_BAM, "", "882ece8391cfec30ab658970a487d078"); } @Test public void testHaplotypeCallerSingleSample() { - HCTest(NA12878_BAM, "", "fcf0cea98a571d5e2d1dfa8b5edc599d"); + HCTest(NA12878_BAM, "", "6f458e04251bc4c09b5b544d46f19d68"); } @Test public void testHaplotypeCallerMultiSampleGGA() { - HCTest(CEUTRIO_BAM, "-gt_mode GENOTYPE_GIVEN_ALLELES -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf", "ff370c42c8b09a29f1aeff5ac57c7ea6"); + HCTest(CEUTRIO_BAM, "-gt_mode GENOTYPE_GIVEN_ALLELES -alleles " + validationDataLocation + "combined.phase1.chr20.raw.indels.sites.vcf", "c172791007f867bf3b975d4194564d9e"); } private void HCTestComplexVariants(String bam, String args, String md5) { @@ -41,7 +41,7 @@ public class HaplotypeCallerIntegrationTest extends WalkerTest { @Test public void testHaplotypeCallerMultiSampleComplex() { - HCTestComplexVariants(CEUTRIO_BAM, "", "6f9fda3ea82c5696bed1d48ee90cd76b"); + HCTestComplexVariants(CEUTRIO_BAM, "", "94186811016b332a58c150df556278f8"); } }