From 0dacf600125a04989cd92bfe8bec31dae8aaa6bb Mon Sep 17 00:00:00 2001 From: Samuel Lee Date: Wed, 23 Sep 2015 14:31:16 -0400 Subject: [PATCH 1/2] Changed calls for RGQ=0 from 0/0 to ./. in output of GenotypeGVCFs. --- .../tools/walkers/variantutils/GenotypeGVCFs.java | 4 ++-- .../CombineVariantsIntegrationTest.java | 2 +- .../variantutils/GenotypeGVCFsIntegrationTest.java | 13 ++++++++++++- .../org/broadinstitute/gatk/utils/BaseTest.java | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFs.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFs.java index 4757258e0..da6ab34a5 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFs.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFs.java @@ -382,8 +382,8 @@ public class GenotypeGVCFs extends RodWalker refAlleles = Collections.nCopies(ploidy,VC.getReference()); - //keep 0 depth samples as no-call - if (depth > 0) { + //keep 0 depth samples and 0 GQ samples as no-call + if (depth > 0 && oldGT.hasGQ() && oldGT.getGQ() > 0) { builder.alleles(refAlleles); } diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineVariantsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineVariantsIntegrationTest.java index c4b528643..bca2c491f 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineVariantsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/CombineVariantsIntegrationTest.java @@ -229,7 +229,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest { // Just checking that this does not fail, hence no output files and MD5 WalkerTestSpec spec = new WalkerTestSpec( "-T CombineVariants --no_cmdline_in_header -o %s " - + " -R " + hg19RefereneWithChrPrefixInChromosomeNames + + " -R " + hg19ReferenceWithChrPrefixInChromosomeNames + " -V " + privateTestDir + "WES-chr1.DEL.vcf" + " -V " + privateTestDir + "WGS-chr1.DEL.vcf" + " -genotypeMergeOptions UNIQUIFY", diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java index 4adefc385..e26594e51 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java @@ -145,7 +145,7 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest { " -V:sample3 " + privateTestDir + "combine.single.sample.pipeline.3.vcf" + " --includeNonVariantSites -L 20:10,030,000-10,033,000 -L 20:10,386,000-10,386,500", b37KGReference), 1, - Arrays.asList("92513f9a6f34829ef455a379e87e09cd")); + Arrays.asList("13c24e54c17e667a9647066aed54da76")); executeTest("combineSingleSamplePipelineGVCF_includeNonVariants", spec); } @@ -549,4 +549,15 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest { spec.disableShadowBCF(); executeTest("testSACMultisampleTetraploid", spec); } + + @Test(enabled = true) + public void testSetZeroRGQsToNoCall() { + WalkerTestSpec spec = new WalkerTestSpec( + baseTestString(" -V " + privateTestDir + "set.zero.RGQs.no.call.sample1.g.vcf" + + " -V " + privateTestDir + "set.zero.RGQs.no.call.sample2.g.vcf" + + " -L chr16:1279274-1279874 -allSites", hg19ReferenceWithChrPrefixInChromosomeNames), + 1, + Arrays.asList("2daf1956e9d4d5f522fa953c6b4a23a4")); + executeTest("testSetZeroRGQsToNoCall", spec); + } } \ No newline at end of file diff --git a/public/gatk-utils/src/test/java/org/broadinstitute/gatk/utils/BaseTest.java b/public/gatk-utils/src/test/java/org/broadinstitute/gatk/utils/BaseTest.java index 616c85b3a..e151541aa 100644 --- a/public/gatk-utils/src/test/java/org/broadinstitute/gatk/utils/BaseTest.java +++ b/public/gatk-utils/src/test/java/org/broadinstitute/gatk/utils/BaseTest.java @@ -98,7 +98,7 @@ public abstract class BaseTest { public static final String b36KGReference = "/humgen/1kg/reference/human_b36_both.fasta"; public static final String b37KGReference = "/humgen/1kg/reference/human_g1k_v37.fasta"; public static final String b37KGReferenceWithDecoy = "/humgen/gsa-hpprojects/GATK/bundle/current/b37/human_g1k_v37_decoy.fasta"; - public static final String hg19RefereneWithChrPrefixInChromosomeNames = "/humgen/gsa-hpprojects/GATK/bundle/current/hg19/ucsc.hg19.fasta"; + public static final String hg19ReferenceWithChrPrefixInChromosomeNames = "/humgen/gsa-hpprojects/GATK/bundle/current/hg19/ucsc.hg19.fasta"; public static final String GATKDataLocation = "/humgen/gsa-hpprojects/GATK/data/"; public static final String validationDataLocation = GATKDataLocation + "Validation_Data/"; public static final String evaluationDataLocation = GATKDataLocation + "Evaluation_Data/"; From c7f76b945ed0e14d1e27257df95a13e0c49152ac Mon Sep 17 00:00:00 2001 From: Samuel Lee Date: Thu, 24 Sep 2015 15:42:51 -0400 Subject: [PATCH 2/2] addressing PR comments --- .../walkers/variantutils/GenotypeGVCFsIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java index e26594e51..f24b18ae2 100644 --- a/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java +++ b/protected/gatk-tools-protected/src/test/java/org/broadinstitute/gatk/tools/walkers/variantutils/GenotypeGVCFsIntegrationTest.java @@ -557,7 +557,7 @@ public class GenotypeGVCFsIntegrationTest extends WalkerTest { " -V " + privateTestDir + "set.zero.RGQs.no.call.sample2.g.vcf" + " -L chr16:1279274-1279874 -allSites", hg19ReferenceWithChrPrefixInChromosomeNames), 1, - Arrays.asList("2daf1956e9d4d5f522fa953c6b4a23a4")); + Arrays.asList("d617884b08ee85816f1ba1acf11f1738")); executeTest("testSetZeroRGQsToNoCall", spec); } } \ No newline at end of file