diff --git a/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java b/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java index 25f6f3d97..c17c9ca55 100644 --- a/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java +++ b/protected/java/test/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariantsIntegrationTest.java @@ -47,6 +47,7 @@ package org.broadinstitute.sting.gatk.walkers.variantutils; import org.broadinstitute.sting.WalkerTest; +import org.broadinstitute.sting.utils.exceptions.UserException; import org.testng.annotations.Test; import java.util.Arrays; @@ -91,4 +92,13 @@ public class LiftoverVariantsIntegrationTest extends WalkerTest { Arrays.asList("0909a953291a5e701194668c9b8833ab")); executeTest("test liftover filtering of indels", spec); } + + @Test + public void testLiftoverFailsWithNoOutput() { + WalkerTestSpec spec = new WalkerTestSpec( + "-T LiftoverVariants -R " + hg18Reference + " --variant:vcf " + privateTestDir + "liftover_test.vcf -chain " + validationDataLocation + "hg18ToHg19.broad.over.chain -dict /seq/references/Homo_sapiens_assembly19/v0/Homo_sapiens_assembly19.dict", + 0, + UserException.class); + executeTest("test liftover fails with no output", spec); + } } diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java index 17d50f101..0e38869c6 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/variantutils/LiftoverVariants.java @@ -54,7 +54,11 @@ import java.io.File; import java.util.*; /** - * Lifts a VCF file over from one build to another. Note that the resulting VCF could be mis-sorted. + * Lifts a VCF file over from one build to another. + * + * Important note: the resulting VCF is not guaranteed to be valid according to the official specification. The file could + * possibly be mis-sorted and the header may not be complete. LiftoverVariants is intended to be the first of two processing steps + * for the liftover; the second step, FilterLiftedVariants, will produce a valid well-behaved VCF file. */ @DocumentedGATKFeature( groupName = HelpConstants.DOCS_CAT_VARMANIP, extraDocs = {CommandLineGATK.class} ) public class LiftoverVariants extends RodWalker { @@ -62,7 +66,7 @@ public class LiftoverVariants extends RodWalker { @ArgumentCollection protected StandardVariantContextInputArgumentCollection variantCollection = new StandardVariantContextInputArgumentCollection(); - @Output(doc="File to which variants should be written") + @Output(doc="File to which variants should be written", required=true, defaultToStdout=false) protected File file = null; protected VariantContextWriter writer = null;