bug fix for known-indels used as consenses

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3245 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-04-23 13:52:51 +00:00
parent f050beada6
commit 3adf7fbf64
1 changed files with 7 additions and 6 deletions

View File

@ -716,11 +716,11 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
break;
case I:
for (int j = 0; j < elementLength; j++) {
if ( ! BaseUtils.isRegularBase(readStr[altIdx+j]) ) {
// Insertions with N's in them cause real problems sometimes; it's better to drop them altogether
ok_flag=false;
break;
}
if ( ! BaseUtils.isRegularBase(readStr[altIdx+j]) ) {
// Insertions with N's in them cause real problems sometimes; it's better to drop them altogether
ok_flag=false;
break;
}
sb.append((char)readStr[altIdx + j]);
}
altIdx += elementLength;
@ -759,7 +759,8 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
cigar.add(new CigarElement(indelStr.length, CigarOperator.D));
}
else {
sb.append(indelStr);
for ( byte b : indelStr )
sb.append((char)b);
cigar.add(new CigarElement(indelStr.length, CigarOperator.I));
}