diff --git a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index b9d1a55c7..f8e87aa58 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -383,11 +383,9 @@ public class GenomeAnalysisEngine { // If intervals is non-null and empty at this point, it means that the list of intervals to process // was filtered down to an empty set (eg., the user specified something like -L chr1 -XL chr1). Since // this was very likely unintentional, the user should be informed of this. Note that this is different - // from the case where intervals == null, which indicates either that there were no interval arguments, - // or that -L all was specified. + // from the case where intervals == null, which indicates that there were no interval arguments. if ( intervals != null && intervals.isEmpty() ) { - throw new ArgumentException("The given combination of -L and -XL options results in an empty set. " + - "No intervals to process."); + logger.warn("The given combination of -L and -XL options results in an empty set. No intervals to process."); } } @@ -610,17 +608,12 @@ public class GenomeAnalysisEngine { */ protected GenomeLocSortedSet loadIntervals( List> argList, IntervalSetRule rule ) { - boolean allowEmptyIntervalList = (argCollection.unsafe == ValidationExclusion.TYPE.ALLOW_EMPTY_INTERVAL_LIST || - argCollection.unsafe == ValidationExclusion.TYPE.ALL); - List allIntervals = new ArrayList(0); for ( IntervalBinding intervalBinding : argList ) { List intervals = intervalBinding.getIntervals(this); - if ( !allowEmptyIntervalList && intervals.isEmpty() ) { - throw new UserException("The interval file " + intervalBinding.getSource() + " contains no intervals " + - "that could be parsed, and the unsafe operation ALLOW_EMPTY_INTERVAL_LIST has " + - "not been enabled"); + if ( intervals.isEmpty() ) { + logger.warn("The interval file " + intervalBinding.getSource() + " contains no intervals that could be parsed."); } allIntervals = IntervalUtils.mergeListsBySetOperator(intervals, allIntervals, rule); diff --git a/public/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java b/public/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java index 0d5a23f1d..577f7929a 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java +++ b/public/java/src/org/broadinstitute/sting/gatk/arguments/ValidationExclusion.java @@ -37,7 +37,6 @@ public class ValidationExclusion { public enum TYPE { ALLOW_UNINDEXED_BAM, // allow bam files that do not have an index; we'll traverse them using monolithic shard - ALLOW_EMPTY_INTERVAL_LIST, // allow the user to pass in an empty interval list ALLOW_UNSET_BAM_SORT_ORDER, // assume that the bam is sorted, even if the SO (sort-order) flag is not set NO_READ_ORDER_VERIFICATION, // do not validate that the reads are in order as we take them from the bam file ALLOW_SEQ_DICT_INCOMPATIBILITY, // allow dangerous, but not fatal, sequence dictionary incompabilities diff --git a/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java index 383535b3a..3ce62b697 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/GenomeAnalysisEngineUnitTest.java @@ -82,7 +82,7 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest { testEngine.checkForDuplicateSamFiles(); } - @Test(expectedExceptions=ArgumentException.class) + @Test public void testEmptyIntervalSetHandling() throws Exception { GenomeAnalysisEngine testEngine = new GenomeAnalysisEngine(); @@ -109,7 +109,7 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest { }; } - @Test(expectedExceptions=UserException.class, dataProvider="invalidIntervalTestData") + @Test(dataProvider="invalidIntervalTestData") public void testInvalidPicardIntervalHandling(GenomeAnalysisEngine testEngine, GenomeLocParser genomeLocParser, String contig, int intervalStart, int intervalEnd ) throws Exception { @@ -140,11 +140,6 @@ public class GenomeAnalysisEngineUnitTest extends BaseTest { testEngine.loadIntervals(intervalArgs, IntervalSetRule.UNION); } - - - - - private File createTempFile( String tempFilePrefix, String tempFileExtension, String... lines ) throws Exception { File tempFile = File.createTempFile(tempFilePrefix, tempFileExtension); tempFile.deleteOnExit(); diff --git a/public/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java b/public/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java index d10b96253..75bdc3142 100644 --- a/public/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/utils/interval/IntervalIntegrationTest.java @@ -83,7 +83,7 @@ public class IntervalIntegrationTest extends WalkerTest { executeTest("testUnmappedReadInclusion",spec); } - @Test(enabled = true) + @Test(enabled = false) public void testUnmappedReadExclusion() { WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T PrintReads" + @@ -191,8 +191,8 @@ public class IntervalIntegrationTest extends WalkerTest { executeTest("testMergingWithComplexVCF", spec); } - @Test(enabled = true, expectedExceptions = RuntimeException.class) - public void testEmptyVCFNoUnsafe() { + @Test(enabled = true) + public void testEmptyVCF() { String md5 = ""; WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( "-T CountLoci" + @@ -205,22 +205,7 @@ public class IntervalIntegrationTest extends WalkerTest { executeTest("testEmptyVCFError", spec); } - @Test(enabled = true, expectedExceptions = RuntimeException.class) - public void testEmptyVCFWithUnsafe() { - String md5 = ""; - WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec( - "-T CountLoci" + - " -I " + validationDataLocation + "OV-0930.normal.chunk.bam" + - " -R " + hg18Reference + - " -o %s" + - " -U ALLOW_EMPTY_INTERVAL_LIST" + - " -L " + validationDataLocation + "intervalTest.empty.vcf", - 1, // just one output file - Arrays.asList(md5)); - executeTest("testEmptyVCFNoError", spec); - } - - @Test(enabled = true, expectedExceptions = RuntimeException.class) + @Test(enabled = true) public void testIncludeExcludeIsTheSame() { String md5 = ""; WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(