diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java index 5b67715da..2dc0fb46f 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFGenotypeWriterAdapter.java @@ -94,7 +94,8 @@ public class VCFGenotypeWriterAdapter implements VCFGenotypeWriter { throw new IllegalArgumentException("Only VCFVariationCall objects should be passed in to the VCF writers"); VCFParameters params = new VCFParameters(); - params.addFormatItem(VCFGenotypeRecord.GENOTYPE_KEY); + if ( genotypes.size() > 0 ) + params.addFormatItem(VCFGenotypeRecord.GENOTYPE_KEY); // get the location and reference if ( genotypes.size() == 0 ) { diff --git a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java index db8f258db..e24245fd5 100644 --- a/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java +++ b/java/src/org/broadinstitute/sting/utils/genotype/vcf/VCFRecord.java @@ -567,7 +567,7 @@ public class VCFRecord implements Variation, VariantBackedByGenotype { builder.append(FIELD_SEPERATOR); builder.append(createInfoString()); - if ( hasGenotypeData() ) { + if ( mGenotypeFormatString != null && mGenotypeFormatString.length() > 0 ) { try { addGenotypeData(builder, header); } catch (Exception e) { diff --git a/java/test/org/broadinstitute/sting/playground/gatk/walkers/variantstovcf/SequenomToVCFIntegrationTest.java b/java/test/org/broadinstitute/sting/playground/gatk/walkers/variantstovcf/SequenomToVCFIntegrationTest.java index 63bb55f10..33a8fa373 100644 --- a/java/test/org/broadinstitute/sting/playground/gatk/walkers/variantstovcf/SequenomToVCFIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/playground/gatk/walkers/variantstovcf/SequenomToVCFIntegrationTest.java @@ -17,11 +17,11 @@ import java.util.List; public class SequenomToVCFIntegrationTest extends WalkerTest { @Test public void testSequenomToVCFWithoutSmartHardy() { - String testMD5 = "ed121c7a27270ddefeded21b06fcb96d"; + String testMD5 = "c6c2055d304674c2f7014c50f5cc160e"; String testPedFile = "/humgen/gsa-hpprojects/GATK/data/Validation_Data/Sequenom_Test_File.txt"; String testArgs = "-R "+oneKGLocation+"reference/human_b36_both.fasta -L 1:1000000-2000000 "+ "-T SequenomToVCF -b36contig -ns 10 -sPed "+testPedFile+" -vcf %s"; WalkerTest.WalkerTestSpec spec = new WalkerTestSpec(testArgs,1, Arrays.asList(testMD5)); - //List result = executeTest("TestSequenomToVCFNoSmartHardy",spec).getFirst(); + List result = executeTest("TestSequenomToVCFNoSmartHardy",spec).getFirst(); } }