It never fails to amaze me that aligners can find so many different ways to place indels off the ends of contigs

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5503 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2011-03-24 04:17:23 +00:00
parent 48b15d42e0
commit 18271aa1f4
1 changed files with 1 additions and 1 deletions

View File

@ -722,7 +722,7 @@ public class AlignmentUtils {
byte[] alt = new byte[refSeq.length + (indelLength * (indel.getOperator() == CigarOperator.D ? -1 : 1))];
// add the bases before the indel, making sure it's not aligned off the end of the reference
if ( refIndex > alt.length )
if ( refIndex > alt.length || refIndex > refSeq.length )
return null;
System.arraycopy(refSeq, 0, alt, 0, refIndex);
int currentPos = refIndex;