From 391f248640cef3a7ee230a40a2f0362438e22e5e Mon Sep 17 00:00:00 2001 From: hanna Date: Mon, 31 Jan 2011 22:10:06 +0000 Subject: [PATCH] Inserted a dangerous (but hidden) command-line argument for use by the Picard team. Used to process intervals over BAMs without indices. Tim understands the risks but wants this anyway, as a temporary solution to a pipeline problem. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5148 348d0f76-0448-11de-a6fe-93d51630548a --- .../broadinstitute/sting/gatk/GenomeAnalysisEngine.java | 2 +- .../sting/gatk/arguments/GATKArgumentCollection.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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; }