From abaec13e385b3d50905c49376268ae807c6243cb Mon Sep 17 00:00:00 2001 From: ebanks Date: Fri, 9 Jul 2010 14:08:25 +0000 Subject: [PATCH] Bug fix: if there are samples in the VCF but all of them are no-calls, we still need to emit GT for the FORMAT field to be on spec. Note that this is a holdover from 3.3 writing but can't easily be fixed there. Fortunately, that code is all going away soon... git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3754 348d0f76-0448-11de-a6fe-93d51630548a --- .../org/broadinstitute/sting/utils/genotype/vcf/VCFWriter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFWriter.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFWriter.java index 751386ed2..f0042a94d 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFWriter.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFWriter.java @@ -344,6 +344,9 @@ public class VCFWriter { if ( allowedGenotypeAttributeKeys == null || allowedGenotypeAttributeKeys.contains(key) ) vcfGenotypeAttributeKeys.add(key); } + } else if ( header.hasGenotypingData() ) { + // this needs to be done in case all samples are no-calls + vcfGenotypeAttributeKeys.add(VCFGenotypeRecord.GENOTYPE_KEY); } String genotypeFormatString = Utils.join(GENOTYPE_FIELD_SEPARATOR, vcfGenotypeAttributeKeys);