Permalink
Browse files

Throw a GVCFIndexException when the user doesn't specify the optimal …

…indexing strategy
  • Loading branch information...
1 parent d287fe4 commit 68322d22a534bcd1a271778c5b6a1c534d1f294a @jmthibault79 jmthibault79 committed Dec 3, 2013
@@ -33,6 +33,7 @@
import org.broadinstitute.sting.utils.help.DocumentedGATKFeature;
import org.broadinstitute.sting.utils.help.HelpConstants;
import org.broadinstitute.sting.utils.sam.ReadUtils;
+import org.broadinstitute.sting.utils.variant.GATKVCFIndexType;
import org.broadinstitute.variant.variantcontext.VariantContext;
import java.io.File;
@@ -455,6 +456,14 @@ public KeySignatureVerificationException ( File f ) {
}
}
+ public static class GVCFIndexException extends UserException {
+ public GVCFIndexException (GATKVCFIndexType indexType, int indexParameter) {
+ super(String.format("GVCF output requires a specific indexing strategy. Please re-run including the arguments " +
+ "-variant_index_type %s -variant_index_parameter %d.",
+ indexType, indexParameter));
+ }
+ }
+
/**
* A special exception that happens only in the case where
* the filesystem, by design or configuration, is completely unable
@@ -201,6 +201,7 @@ public WalkerTestSpec(String args, int nOutputFiles, List<String> exts, List<Str
this.testClass = getCallingTestClass();
}
+ // @Test(expectedExceptions) doesn't work in integration tests, so use this instead
public WalkerTestSpec(String args, int nOutputFiles, Class expectedException) {
this.args = args;
this.nOutputFiles = nOutputFiles;

0 comments on commit 68322d2

Please sign in to comment.