From a4a2c9b1724059b0856537c3333e1cc45ba42367 Mon Sep 17 00:00:00 2001 From: ebanks Date: Thu, 11 Feb 2010 03:44:56 +0000 Subject: [PATCH] Deal with bad input; also N-way out isn't default. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2823 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/walkers/indels/IndelRealigner.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java index 44974ff30..03a880a9e 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/indels/IndelRealigner.java @@ -32,8 +32,8 @@ public class IndelRealigner extends ReadWalker { @Argument(fullName="output", shortName="O", required=false, doc="Output bam (or directory if using --NwayOutput)") protected String baseWriterFilename = null; - @Argument(fullName="NWayOutput", shortName="nway", required=false, doc="Should the reads be emitted in a separate bam file for each one of the input bams? [default:yes]") - protected boolean NWAY_OUTPUT = true; + @Argument(fullName="NWayOutput", shortName="nway", required=false, doc="Should the reads be emitted in a separate bam file for each one of the input bams? [default:no]") + protected boolean NWAY_OUTPUT = false; @Argument(fullName="outputSuffix", shortName="suffix", required=false, doc="Suffix to append to output bams (when using --NwayOutput) [default:'.cleaned']") protected String outputSuffix = "cleaned"; @@ -279,8 +279,6 @@ public class IndelRealigner extends ReadWalker { } else { // the read is past the current interval - // TODO - NOW WE NEED TO GET THE APPROPRIATE KNOWN INDELS FOR THIS REGION - clean(readsToClean); // merge the two sets for emission @@ -1205,6 +1203,8 @@ public class IndelRealigner extends ReadWalker { } else { long lastPosWithRefBase = loc.getStart() + reference.length -1; int neededBases = (int)(read.getAlignmentEnd() - lastPosWithRefBase); + if ( neededBases > ref.length ) + throw new StingException("Read " + read.getReadName() + " does not overlap the previous read in this interval; please ensure that you are using the same input bam that was used in the RealignerTargetCreator step"); if ( neededBases > 0 ) { char[] newReference = new char[reference.length + neededBases]; System.arraycopy(reference, 0, newReference, 0, reference.length);