Merge branch 'master' into ped

This commit is contained in:
Mark DePristo 2011-09-30 09:28:18 -04:00
commit 9860a2c989
2 changed files with 7 additions and 0 deletions

View File

@ -94,6 +94,12 @@ public class ReadClipper {
if (left == right)
return new SAMRecord(read.getHeader());
SAMRecord leftTailRead = hardClipByReferenceCoordinates(right, -1);
// after clipping one tail, it is possible that the consequent hard clipping of adjacent deletions
// make the left cut index no longer part of the read. In that case, clip the read entirely.
if (left > leftTailRead.getAlignmentEnd())
return new SAMRecord(read.getHeader());
ReadClipper clipper = new ReadClipper(leftTailRead);
return clipper.hardClipByReferenceCoordinatesLeftTail(left);
}

View File

@ -975,4 +975,5 @@ public class ReadUtils {
AlignmentStartComparator comp = new AlignmentStartComparator();
return comp.compare(read1, read2);
}
}