From 069554efe5765dfbdb2023141188966abcdfacda Mon Sep 17 00:00:00 2001 From: Andrey Sivachenko Date: Wed, 17 Aug 2011 14:05:19 -0400 Subject: [PATCH 1/3] somatic indel detector does not die on reads that are too long (likely contain a huge deletion) anymore; instead print a warning and ignore the read --- .../walkers/indels/SomaticIndelDetectorWalker.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java index 64cff2c0d..7e8985e03 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java @@ -469,8 +469,17 @@ public class SomaticIndelDetectorWalker extends ReadWalker { // let's double check now that the read fits after the shift if ( read.getAlignmentEnd() > normal_context.getStop()) { // ooops, looks like the read does not fit into the window even after the latter was shifted!! - throw new UserException.BadArgumentValue("window_size", "Read "+read.getReadName()+": out of coverage window bounds. Probably window is too small, so increase the value of the window_size argument.\n"+ - "Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+ + // we used to die over such reads and require user to run with larger window size. Now we + // just print a warning and discard the read (this means that our counts can be slightly off in + // th epresence of such reads) + //throw new UserException.BadArgumentValue("window_size", "Read "+read.getReadName()+": out of coverage window bounds. Probably window is too small, so increase the value of the window_size argument.\n"+ + // "Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+ + // read.getAlignmentStart()+"; end="+read.getAlignmentEnd()+ + // "; window start (after trying to accomodate the read)="+normal_context.getStart()+"; window end="+normal_context.getStop()); + System.out.println("WARNING: Read "+read.getReadName()+ + " is out of coverage window bounds. Probably window is too small and the window_size value must be increased.\n"+ + " The read is ignored in this run (so all the counts/statistics reported will not include it).\n"+ + " Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+ read.getAlignmentStart()+"; end="+read.getAlignmentEnd()+ "; window start (after trying to accomodate the read)="+normal_context.getStart()+"; window end="+normal_context.getStop()); } From 710d34633e951ea6261890652401924175af7ba7 Mon Sep 17 00:00:00 2001 From: Andrey Sivachenko Date: Wed, 17 Aug 2011 15:16:23 -0400 Subject: [PATCH 2/3] now the reads that are too long are truly ignored (fix of the fix) --- .../sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java | 1 + 1 file changed, 1 insertion(+) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java index 7e8985e03..b2d30235a 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/indels/SomaticIndelDetectorWalker.java @@ -482,6 +482,7 @@ public class SomaticIndelDetectorWalker extends ReadWalker { " Read length="+read.getReadLength()+"; cigar="+read.getCigarString()+"; start="+ read.getAlignmentStart()+"; end="+read.getAlignmentEnd()+ "; window start (after trying to accomodate the read)="+normal_context.getStart()+"; window end="+normal_context.getStop()); + return 1; } } From a423546cdd2c759d0d5d0994a9e5ce8d781cff1d Mon Sep 17 00:00:00 2001 From: Andrey Sivachenko Date: Wed, 17 Aug 2011 15:17:31 -0400 Subject: [PATCH 3/3] fix: RefSeq contains records with zero coding length and the refsec codec/feature used to crash on those; now such records are ignored, with warning printed (once) --- .../refdata/features/refseq/RefSeqCodec.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/refdata/features/refseq/RefSeqCodec.java b/public/java/src/org/broadinstitute/sting/gatk/refdata/features/refseq/RefSeqCodec.java index 461aab9a5..89ee65532 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/refdata/features/refseq/RefSeqCodec.java +++ b/public/java/src/org/broadinstitute/sting/gatk/refdata/features/refseq/RefSeqCodec.java @@ -1,5 +1,6 @@ package org.broadinstitute.sting.gatk.refdata.features.refseq; +import org.apache.commons.io.filefilter.FalseFileFilter; import org.broad.tribble.Feature; import org.broad.tribble.TribbleException; import org.broad.tribble.readers.LineReader; @@ -20,7 +21,7 @@ public class RefSeqCodec implements ReferenceDependentFeatureCodec