diff --git a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index fee6dfd7e..294d06615 100755 --- a/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -387,7 +387,7 @@ public class GenomeAnalysisEngine { if(readsDataSource != null && !readsDataSource.hasIndex() ) { if(!exclusions.contains(ValidationExclusion.TYPE.ALLOW_UNINDEXED_BAM)) throw new UserException.CommandLineException("Cannot process the provided BAM file(s) because they were not indexed. The GATK does offer limited processing of unindexed BAMs in --unsafe mode, but this GATK feature is currently unsupported."); - if(intervals != null) + if(intervals != null && !argCollection.allowIntervalsWithUnindexedBAM) throw new UserException.CommandLineException("Cannot perform interval processing when reads are present but no index is available."); Shard.ShardType shardType; diff --git a/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java b/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java index d976c1efe..4d00262d3 100755 --- a/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java +++ b/java/src/org/broadinstitute/sting/gatk/arguments/GATKArgumentCollection.java @@ -237,6 +237,11 @@ public class GATKArgumentCollection { @Hidden public int processTrackerID = -1; + @Element(required = false) + @Argument(fullName="allow_intervals_with_unindexed_bam",doc="Allow interval processing with an unsupported BAM. NO INTEGRATION TESTS are available. Use at your own risk.") + @Hidden + public boolean allowIntervalsWithUnindexedBAM = false; + // -------------------------------------------------------------------------------------------------------------- // // methods @@ -420,6 +425,9 @@ public class GATKArgumentCollection { if ( processTrackerID != other.processTrackerID ) return false; + if (allowIntervalsWithUnindexedBAM != other.allowIntervalsWithUnindexedBAM) + return false; + return true; }