diff --git a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java index c17ba4449..aaf7d1e6e 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java +++ b/public/java/src/org/broadinstitute/sting/gatk/GenomeAnalysisEngine.java @@ -356,10 +356,6 @@ public class GenomeAnalysisEngine { public BAQ.QualityMode getWalkerBAQQualityMode() { return WalkerManager.getBAQQualityMode(walker); } public BAQ.ApplicationTime getWalkerBAQApplicationTime() { return WalkerManager.getBAQApplicationTime(walker); } - protected boolean generateExtendedEvents() { - return walker.generateExtendedEvents(); - } - protected boolean includeReadsWithDeletionAtLoci() { return walker.includeReadsWithDeletionAtLoci(); } @@ -766,7 +762,6 @@ public class GenomeAnalysisEngine { new ValidationExclusion(Arrays.asList(argCollection.unsafe)), filters, includeReadsWithDeletionAtLoci(), - generateExtendedEvents(), getWalkerBAQApplicationTime() == BAQ.ApplicationTime.ON_INPUT ? argCollection.BAQMode : BAQ.CalculationMode.OFF, getWalkerBAQQualityMode(), refReader, diff --git a/public/java/src/org/broadinstitute/sting/gatk/ReadProperties.java b/public/java/src/org/broadinstitute/sting/gatk/ReadProperties.java index db22886ce..dc77df071 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/ReadProperties.java +++ b/public/java/src/org/broadinstitute/sting/gatk/ReadProperties.java @@ -36,7 +36,6 @@ public class ReadProperties { private final Collection supplementalFilters; private final boolean includeReadsWithDeletionAtLoci; private final boolean useOriginalBaseQualities; - private final boolean generateExtendedEvents; private final BAQ.CalculationMode cmode; private final BAQ.QualityMode qmode; private final IndexedFastaSequenceFile refReader; // read for BAQ, if desired @@ -52,16 +51,9 @@ public class ReadProperties { return includeReadsWithDeletionAtLoci; } - /** - * Return true if the walker wants to see additional piles of "extended" events (indels). An indel is associated, - * by convention, with the reference base immediately preceding the insertion/deletion, and if this flag is set - * to 'true', any locus with an indel associated with it will cause exactly two subsequent calls to walker's map(): first call - * will be made with a "conventional" base pileup, the next call will be made with a pileup of extended (indel/noevent) - * events. - * @return - */ + @Deprecated public boolean generateExtendedEvents() { - return generateExtendedEvents; + return false; } /** @@ -144,9 +136,6 @@ public class ReadProperties { * @param downsamplingMethod Method for downsampling reads at a given locus. * @param exclusionList what safety checks we're willing to let slide * @param supplementalFilters additional filters to dynamically apply. - * @param generateExtendedEvents if true, the engine will issue an extra call to walker's map() with - * a pile of indel/noevent extended events at every locus with at least one indel associated with it - * (in addition to a "regular" call to map() at this locus performed with base pileup) * @param includeReadsWithDeletionAtLoci if 'true', the base pileups sent to the walker's map() method * will explicitly list reads with deletion over the current reference base; otherwise, only observed * bases will be seen in the pileups, and the deletions will be skipped silently. @@ -163,7 +152,6 @@ public class ReadProperties { ValidationExclusion exclusionList, Collection supplementalFilters, boolean includeReadsWithDeletionAtLoci, - boolean generateExtendedEvents, BAQ.CalculationMode cmode, BAQ.QualityMode qmode, IndexedFastaSequenceFile refReader, @@ -176,7 +164,6 @@ public class ReadProperties { this.exclusionList = exclusionList == null ? new ValidationExclusion() : exclusionList; this.supplementalFilters = supplementalFilters; this.includeReadsWithDeletionAtLoci = includeReadsWithDeletionAtLoci; - this.generateExtendedEvents = generateExtendedEvents; this.useOriginalBaseQualities = useOriginalBaseQualities; this.cmode = cmode; this.qmode = qmode; diff --git a/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSource.java b/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSource.java index bf7afe4f0..f6cf07aae 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSource.java +++ b/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSource.java @@ -168,7 +168,6 @@ public class SAMDataSource { null, new ValidationExclusion(), new ArrayList(), - false, false); } @@ -186,8 +185,7 @@ public class SAMDataSource { DownsamplingMethod downsamplingMethod, ValidationExclusion exclusionList, Collection supplementalFilters, - boolean includeReadsWithDeletionAtLoci, - boolean generateExtendedEvents) { + boolean includeReadsWithDeletionAtLoci) { this( samFiles, threadAllocation, numFileHandles, @@ -199,7 +197,6 @@ public class SAMDataSource { exclusionList, supplementalFilters, includeReadsWithDeletionAtLoci, - generateExtendedEvents, BAQ.CalculationMode.OFF, BAQ.QualityMode.DONT_MODIFY, null, // no BAQ @@ -216,9 +213,6 @@ public class SAMDataSource { * @param downsamplingMethod Method for downsampling reads at a given locus. * @param exclusionList what safety checks we're willing to let slide * @param supplementalFilters additional filters to dynamically apply. - * @param generateExtendedEvents if true, the engine will issue an extra call to walker's map() with - * a pile of indel/noevent extended events at every locus with at least one indel associated with it - * (in addition to a "regular" call to map() at this locus performed with base pileup) * @param includeReadsWithDeletionAtLoci if 'true', the base pileups sent to the walker's map() method * will explicitly list reads with deletion over the current reference base; otherwise, only observed * bases will be seen in the pileups, and the deletions will be skipped silently. @@ -236,7 +230,6 @@ public class SAMDataSource { ValidationExclusion exclusionList, Collection supplementalFilters, boolean includeReadsWithDeletionAtLoci, - boolean generateExtendedEvents, BAQ.CalculationMode cmode, BAQ.QualityMode qmode, IndexedFastaSequenceFile refReader, @@ -309,7 +302,6 @@ public class SAMDataSource { exclusionList, supplementalFilters, includeReadsWithDeletionAtLoci, - generateExtendedEvents, cmode, qmode, refReader, diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java index 0c2b3e349..8dfa26390 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/PileupWalker.java @@ -66,9 +66,6 @@ public class PileupWalker extends LocusWalker implements TreeR @Output PrintStream out; - @Argument(fullName="showIndelPileups",shortName="show_indels",doc="In addition to base pileups, generate pileups of extended indel events") - public boolean SHOW_INDEL_PILEUPS = false; - @Argument(fullName="showVerbose",shortName="verbose",doc="Add an extra verbose section to the pileup output") public boolean SHOW_VERBOSE = false; @@ -78,8 +75,6 @@ public class PileupWalker extends LocusWalker implements TreeR public void initialize() { } - public boolean generateExtendedEvents() { return SHOW_INDEL_PILEUPS; } - public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) { String rods = getReferenceOrderedData( tracker ); @@ -92,17 +87,6 @@ public class PileupWalker extends LocusWalker implements TreeR out.println(); } - if ( context.hasExtendedEventPileup() ) { - ReadBackedExtendedEventPileup indelPileup = context.getExtendedEventPileup(); - List> eventCounts = indelPileup.getEventStringsWithCounts(ref.getBases()); - - out.printf("%s %s ", indelPileup.getShortPileupString(), rods); - int i = 0; - for ( ; i < eventCounts.size() - 1 ; i++ ) { - out.printf("%s:%d,",eventCounts.get(i).first,eventCounts.get(i).second); - } - out.printf("%s:%d%n",eventCounts.get(i).first,eventCounts.get(i).second); - } return 1; } diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/Walker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/Walker.java index 6264808f4..18c383ed9 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/Walker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/Walker.java @@ -114,35 +114,6 @@ public abstract class Walker { return false; } - /** - * This method states whether you want to see pileups of "extended events" (currently, indels only) - * at every locus that has at least one indel associated with it. Consider the following situation: - * - * ref: AT--CTGA (note that we expanded the ref here with -- to accomodate insertion in read3) - * read1: AT--CTGA (perfectly matches the ref) - * read2: AT----GA (deletion -CT w.r.t. the ref) - * read3: ATGGCTGA (insertion +GG w.r.t the ref) - * - * Normally, the locus iterator only returns read base pileups over reference bases, optionally with deleted bases - * included (see #includeReadsWithDeletionAtLoci()). In other words, the pileup over the second reference base (T) - * will be [T,T,T] (all reads count), for the next reference base (C) the pileup will be [C,C] (or [C,-,C] if - * #includeReadsWithDeletionAtLoci() is true), next pileup generated over the next reference - * base (T) will be either [T,T], or [T,'-',T], etc. In this default mode, a) insertions are not seen by a walker at all, and - * b) deletions are (optionally) seen only on a base-by-base basis (as the step-by-step traversal over the reference - * bases is performed). In the extended event mode, however, if there is at least one indel associated with a reference - * locus, the engine will generate an additional call to the walker's map() method, with a pileup of - * full-length extended indel/noevent calls. This call will be made after the conventional base pileup call - * at that locus. Thus, in the example above, a conventional call will be first made at the second reference base (T), - * with the [T,T,T] pileup of read bases, then an extended event call will be made at the same locus with - * pileup [no_event, -CT, +GG] (i.e. extended events associated with that reference base). After that, the traversal - * engine will move to the next reference base. - * - * @return false if you do not want to receive extra pileups with extended events, or true if you do. - */ - public boolean generateExtendedEvents() { - return false; - } - public void initialize() { } /** diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java index 17b17764b..124be2eb4 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/coverage/GCContentByIntervalWalker.java @@ -74,10 +74,6 @@ public class GCContentByIntervalWalker extends LocusWalker { public void initialize() { } - public boolean generateExtendedEvents() { - return false; - } - public Long reduceInit() { return 0L; } diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingWalker.java index f264cbdd0..2813a3b7c 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/phasing/ReadBackedPhasingWalker.java @@ -227,10 +227,6 @@ public class ReadBackedPhasingWalker extends RodWalker implements TreeReducible { - @Output - private PrintStream out; - - public AlignmentContext map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) { - out.printf( "In map: ref = %s, loc = %s %s, reads = %s%n", ref.getBaseAsChar(), - context.getLocation(), - context.hasExtendedEventPileup() ? "[extended]" : "", - Arrays.deepToString( getReadNames(context.getReads()) ) ); - return context; - } - - - - public Integer reduceInit() { return 0; } - - public Integer reduce(AlignmentContext context, Integer sum) { - return sum + 1; - } - - public Integer treeReduce(Integer lhs, Integer rhs) { - return lhs + rhs; - } - - private String[] getReadNames( List reads ) { - String[] readNames = new String[ reads.size() ]; - for( int i = 0; i < reads.size(); i++ ) { - readNames[i] = String.format("%nname = %s, start = %d, end = %d", reads.get(i).getReadName(), reads.get(i).getAlignmentStart(), reads.get(i).getAlignmentEnd()); - } - //Arrays.sort(readNames); - return readNames; - } - - @Override - public boolean generateExtendedEvents() { - return true; - } -} diff --git a/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/DownsamplerBenchmark.java b/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/DownsamplerBenchmark.java index 20f3e1e35..477b76e37 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/DownsamplerBenchmark.java +++ b/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/DownsamplerBenchmark.java @@ -76,7 +76,6 @@ public class DownsamplerBenchmark extends ReadProcessingBenchmark { new ValidationExclusion(Collections.singletonList(ValidationExclusion.TYPE.ALL)), Collections.emptyList(), false, - false, BAQ.CalculationMode.OFF, BAQ.QualityMode.DONT_MODIFY, null, // no BAQ diff --git a/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSourceUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSourceUnitTest.java index ba2d68ec9..1c5dab254 100755 --- a/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSourceUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/datasources/reads/SAMDataSourceUnitTest.java @@ -109,7 +109,6 @@ public class SAMDataSourceUnitTest extends BaseTest { null, new ValidationExclusion(), new ArrayList(), - false, false); Iterable strat = data.createShardIteratorOverMappedReads(seq.getSequenceDictionary(),new LocusShardBalancer()); diff --git a/public/java/test/org/broadinstitute/sting/gatk/iterators/LocusIteratorByStateUnitTest.java b/public/java/test/org/broadinstitute/sting/gatk/iterators/LocusIteratorByStateUnitTest.java index 7282d6c48..c7e36687e 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/iterators/LocusIteratorByStateUnitTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/iterators/LocusIteratorByStateUnitTest.java @@ -354,7 +354,6 @@ public class LocusIteratorByStateUnitTest extends BaseTest { new ValidationExclusion(), Collections.emptyList(), false, - false, BAQ.CalculationMode.OFF, BAQ.QualityMode.DONT_MODIFY, null, // no BAQ diff --git a/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java b/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java index e26d6174b..9d9b91872 100644 --- a/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java +++ b/public/java/test/org/broadinstitute/sting/gatk/walkers/PileupWalkerIntegrationTest.java @@ -23,16 +23,4 @@ public class PileupWalkerIntegrationTest extends WalkerTest { WalkerTestSpec spec = new WalkerTestSpec(gatk_args, 1, Arrays.asList(expected_md5)); executeTest("Testing the standard (no-indel) pileup on three merged FHS pools with 27 deletions in 969 bases", spec); } - - @Test - public void testExtendedEventPileup() { - String gatk_args = "-T Pileup -I " + validationDataLocation + "OV-0930.normal.chunk.bam " - + "-R " + hg18Reference - + " -show_indels -o %s"; - String expected_md5="06eedc2e7927650961d99d703f4301a4"; - WalkerTestSpec spec = new WalkerTestSpec(gatk_args,1,Arrays.asList(expected_md5)); - executeTest("Testing the extended pileup with indel records included on a small chunk of Ovarian dataset with 20 indels (1 D, 19 I)", spec); - - - } }