From 750eb4b5a606f61149d3c42b4b3f11fdd4782e08 Mon Sep 17 00:00:00 2001 From: Valentin Ruano-Rubio Date: Tue, 29 Jul 2014 16:17:52 -0400 Subject: [PATCH] Add diploid only support message to HaplotypeCaller Story: https://www.pivotaltracker.com/story/show/73440292 Changes: - Just add the conditional in HaplotypeCaller#initialize Testing: - Nothing added, checked locally, trivial change that would eventually be removed anyway. --- .../gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java index ad77615bc..2b51e6776 100644 --- a/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java +++ b/protected/gatk-tools-protected/src/main/java/org/broadinstitute/gatk/tools/walkers/haplotypecaller/HaplotypeCaller.java @@ -95,6 +95,7 @@ import org.broadinstitute.gatk.utils.variant.GATKVCFIndexType; import htsjdk.variant.variantcontext.*; import htsjdk.variant.variantcontext.writer.VariantContextWriter; import htsjdk.variant.vcf.*; +import org.broadinstitute.gatk.utils.variant.HomoSapiensConstants; import java.io.FileNotFoundException; import java.io.PrintStream; @@ -614,6 +615,9 @@ public class HaplotypeCaller extends ActiveRegionWalker, In public void initialize() { super.initialize(); + if (SCAC.genotypeArgs.samplePloidy != HomoSapiensConstants.DEFAULT_PLOIDY) + throw new UserException.BadArgumentValue("-ploidy", "" + SCAC.genotypeArgs.samplePloidy + "; currently HaplotypeCaller only supports diploid sample analysis (-ploidy 2)"); + if (dontGenotype && emitReferenceConfidence()) throw new UserException("You cannot request gVCF output and do not genotype at the same time");