diff --git a/public/gatk-root/pom.xml b/public/gatk-root/pom.xml
index 456098bcd..b527a82ea 100644
--- a/public/gatk-root/pom.xml
+++ b/public/gatk-root/pom.xml
@@ -44,8 +44,8 @@
org.testng.reporters.FailedReporter,org.testng.reporters.JUnitXMLReporter,org.broadinstitute.gatk.utils.TestNGTestTransformer,org.broadinstitute.gatk.utils.GATKTextReporter,org.uncommons.reportng.HTMLReporter
- 1.118.1556
- 1.118.1521
+ 1.120.1620
+ 1.120.1579
diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/arguments/GATKArgumentCollection.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/arguments/GATKArgumentCollection.java
index be09c5879..05834f71b 100644
--- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/arguments/GATKArgumentCollection.java
+++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/arguments/GATKArgumentCollection.java
@@ -416,6 +416,18 @@ public class GATKArgumentCollection {
required = false)
public boolean sitesOnlyVCF = false;
+ /**
+ *
The VCF specification permits missing records to be dropped from the end of FORMAT fields, so long as GT is always output.
+ * This option prevents GATK from performing that trimming.
+ *
+ * For example, given a FORMAT of
GT:AD:DP:PL
, GATK will by default emit ./.
for a variant with
+ * no reads present (ie, the AD, DP, and PL fields are trimmed). If you specify -writeFullFormat, this record
+ * would be emitted as ./.:.:.:.
+ */
+ @Argument(fullName = "never_trim_vcf_format_field", shortName = "writeFullFormat", doc = "Always output all the records in VCF FORMAT fields, even if some are missing",
+ required = false)
+ public boolean neverTrimVCFFormatField = false;
+
@Hidden
@Argument(fullName = "bcf", shortName = "bcf", doc = "Force BCF output, regardless of the file's extension",
required = false)
diff --git a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/io/stubs/VariantContextWriterStub.java b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/io/stubs/VariantContextWriterStub.java
index e3bf0e4da..f40ede581 100644
--- a/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/io/stubs/VariantContextWriterStub.java
+++ b/public/gatk-tools-public/src/main/java/org/broadinstitute/gatk/engine/io/stubs/VariantContextWriterStub.java
@@ -108,6 +108,11 @@ public class VariantContextWriterStub implements Stub, Var
*/
private boolean forceBCF = false;
+ /**
+ * Should we write all of the fields in the FORMAT field, even if missing fields could be trimmed?
+ */
+ private boolean writeFullFormatField = false;
+
/**
* Connects this stub with an external stream capable of serving the
* requests of the consumer of this stub.
@@ -153,37 +158,37 @@ public class VariantContextWriterStub implements Stub, Var
}
/**
- * Retrieves the output stearm to which to (ultimately) write.
+ * Retrieves the output stream to which to (ultimately) write.
* @return The file. Can be null if genotypeFile is not.
*/
public OutputStream getOutputStream() {
return genotypeStream;
}
- /**
- * Retrieves the output stearm to which to (ultimately) write.
- * @return The file. Can be null if genotypeFile is not.
- */
public boolean isCompressed() {
return isCompressed;
}
- public void setCompressed(boolean compressed) {
+ public void setCompressed(final boolean compressed) {
isCompressed = compressed;
}
- public void setSkipWritingCommandLineHeader(boolean skipWritingCommandLineHeader) {
+ public void setSkipWritingCommandLineHeader(final boolean skipWritingCommandLineHeader) {
this.skipWritingCommandLineHeader = skipWritingCommandLineHeader;
}
- public void setDoNotWriteGenotypes(boolean doNotWriteGenotypes) {
+ public void setDoNotWriteGenotypes(final boolean doNotWriteGenotypes) {
this.doNotWriteGenotypes = doNotWriteGenotypes;
}
- public void setForceBCF(boolean forceBCF) {
+ public void setForceBCF(final boolean forceBCF) {
this.forceBCF = forceBCF;
}
+ public void setWriteFullFormatField(final boolean writeFullFormatField) {
+ this.writeFullFormatField = writeFullFormatField;
+ }
+
public IndexCreator getIndexCreator() {
return indexCreator;
}
@@ -202,11 +207,12 @@ public class VariantContextWriterStub implements Stub, Var
}
public EnumSet getWriterOptions(boolean indexOnTheFly) {
- List options = new ArrayList();
+ final List options = new ArrayList<>();
if ( doNotWriteGenotypes ) options.add(Options.DO_NOT_WRITE_GENOTYPES);
if ( engine.lenientVCFProcessing() ) options.add(Options.ALLOW_MISSING_FIELDS_IN_HEADER);
if ( indexOnTheFly) options.add(Options.INDEX_ON_THE_FLY);
+ if ( writeFullFormatField ) options.add(Options.WRITE_FULL_FORMAT_FIELD);
if ( forceBCF || (getOutputFile() != null && VariantContextWriterFactory.isBCFOutput(getOutputFile())) )
options.add(Options.FORCE_BCF);
@@ -235,7 +241,7 @@ public class VariantContextWriterStub implements Stub, Var
setDoNotWriteGenotypes(argumentCollection.sitesOnlyVCF);
setSkipWritingCommandLineHeader(argumentCollection.disableCommandLineInVCF);
setForceBCF(argumentCollection.forceBCFOutput);
-
+ setWriteFullFormatField(argumentCollection.neverTrimVCFFormatField);
}
public void writeHeader(VCFHeader header) {
diff --git a/public/gatk-tools-public/src/test/java/org/broadinstitute/gatk/engine/EngineFeaturesIntegrationTest.java b/public/gatk-tools-public/src/test/java/org/broadinstitute/gatk/engine/EngineFeaturesIntegrationTest.java
index b8cea85e1..6596cf324 100644
--- a/public/gatk-tools-public/src/test/java/org/broadinstitute/gatk/engine/EngineFeaturesIntegrationTest.java
+++ b/public/gatk-tools-public/src/test/java/org/broadinstitute/gatk/engine/EngineFeaturesIntegrationTest.java
@@ -716,9 +716,21 @@ public class EngineFeaturesIntegrationTest extends WalkerTest {
executeTest("testVCFFeatures: "+args, spec);
}
+ private void testVCFFormatHandling(final boolean writeFullFormat, final String md5) {
+ WalkerTestSpec spec = new WalkerTestSpec("-T SelectVariants -R " + b37KGReference +
+ " -V " + privateTestDir + "ILLUMINA.wex.broad_phase2_baseline.20111114.both.exome.genotypes.1000.vcf"
+ + " --no_cmdline_in_header -o %s "
+ + " --fullyDecode " //Without this parameter, the FORMAT fields will be emitted unchanged. Oops
+ + (writeFullFormat ? "-writeFullFormat" : "") ,
+ 1, Arrays.asList(md5));
+ executeTest("testVCFFormatHandling: "+(writeFullFormat ? "Untrimmed" : "Trimmed"), spec);
+ }
+
@Test
public void testVCFWriterFeatures() {
testVCFFeatures("--sites_only", "94bf1f2c0946e933515e4322323a5716");
testVCFFeatures("--bcf", "03f2d6988f54a332da48803c78f9c4b3");
+ testVCFFormatHandling(true, "2b0fa660b0cef4b0f45a10febb453b6c");
+ testVCFFormatHandling(false, "5960311fdd9ee6db88587efaaf4055a0");
}
}
\ No newline at end of file
diff --git a/public/repo/picard/picard/1.118.1521/picard-1.118.1521.jar b/public/repo/picard/picard/1.120.1579/picard-1.120.1579.jar
similarity index 84%
rename from public/repo/picard/picard/1.118.1521/picard-1.118.1521.jar
rename to public/repo/picard/picard/1.120.1579/picard-1.120.1579.jar
index f82969cca..fa3fa36c0 100644
Binary files a/public/repo/picard/picard/1.118.1521/picard-1.118.1521.jar and b/public/repo/picard/picard/1.120.1579/picard-1.120.1579.jar differ
diff --git a/public/repo/picard/picard/1.118.1521/picard-1.118.1521.pom b/public/repo/picard/picard/1.120.1579/picard-1.120.1579.pom
similarity index 94%
rename from public/repo/picard/picard/1.118.1521/picard-1.118.1521.pom
rename to public/repo/picard/picard/1.120.1579/picard-1.120.1579.pom
index 0b1f7c775..cca997246 100644
--- a/public/repo/picard/picard/1.118.1521/picard-1.118.1521.pom
+++ b/public/repo/picard/picard/1.120.1579/picard-1.120.1579.pom
@@ -3,13 +3,13 @@
4.0.0
picard
picard
- 1.118.1521
+ 1.120.1579
picard
samtools
htsjdk
- 1.118.1556
+ 1.120.1620
diff --git a/public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.jar b/public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.jar
similarity index 81%
rename from public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.jar
rename to public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.jar
index d64d3ae29..8480ddc05 100644
Binary files a/public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.jar and b/public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.jar differ
diff --git a/public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.pom b/public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.pom
similarity index 96%
rename from public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.pom
rename to public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.pom
index e92f8b420..04ebef8a3 100644
--- a/public/repo/samtools/htsjdk/1.118.1556/htsjdk-1.118.1556.pom
+++ b/public/repo/samtools/htsjdk/1.120.1620/htsjdk-1.120.1620.pom
@@ -3,7 +3,7 @@
4.0.0
samtools
htsjdk
- 1.118.1556
+ 1.120.1620
htsjdk