From d9f3e9493f94c9f972b56cf45bc14ca201a280b8 Mon Sep 17 00:00:00 2001 From: asivache Date: Wed, 9 Sep 2009 20:05:55 +0000 Subject: [PATCH] Does not return 0-length cigar elements anymore (used to do so when previous cigar element ended exactly at the segment boundary) git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1570 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/playground/utils/GenomicMap.java | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java b/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java index f8d2a6b51..71cb1d1ac 100644 --- a/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java +++ b/java/src/org/broadinstitute/sting/playground/utils/GenomicMap.java @@ -124,7 +124,7 @@ public class GenomicMap implements Iterable 0 ) { + newCigar.add(new CigarElement( currLength,ce.getOperator()) ); // record deletion/match till the end of the current segment + len -= currLength; // we still have 'len' bases remaining in the current cigar element + } // NOTE: since we entered the loop, we were guaranteed that len > currLength, so now len > 0 @@ -369,12 +375,17 @@ public class GenomicMap implements Iterable s = new ArrayList(); // s.add( GenomeLocParser.createGenomeLoc("chr1", 100, 199)); // s.add( GenomeLocParser.createGenomeLoc("chr1", 300, 499)); @@ -382,14 +393,18 @@ public class GenomicMap implements Iterable