Fixed hardclipping inside indel (right tail)

when hard clipping the right tail of a read falls inside a deletion, clipping should fall back to the last base before the deletion to follow the ReadClipper's contract.
This commit is contained in:
Mauricio Carneiro 2011-09-28 16:07:00 -04:00
parent 3c7b7f74ef
commit ff2f4df043
1 changed files with 4 additions and 0 deletions

View File

@ -893,6 +893,10 @@ public class ReadUtils {
// base before the deletion (see warning in function contracts)
else if (fallsInsideDeletion && !endsWithinCigar)
readBases += shift - 1;
// If we reached our goal inside a deletion then we must backtrack to the last base before the deletion
else if (fallsInsideDeletion && endsWithinCigar)
readBases--;
}
}