Fix for reads that have insertion as their last (mapped) cigar elements (i.e. not followed by M)
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2476 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
05deb8796b
commit
e286313b67
|
|
@ -160,8 +160,20 @@ public class LocusIteratorByState extends LocusIterator {
|
||||||
// we reenter in order to re-check cigarElementCounter against curElement's length
|
// we reenter in order to re-check cigarElementCounter against curElement's length
|
||||||
return stepForwardOnGenome();
|
return stepForwardOnGenome();
|
||||||
} else {
|
} else {
|
||||||
genomeOffset++; // extended events need that. Logically, it's legal to advance the genomic offset here:
|
if ( generateExtendedEvents && eventDelayedFlag > 0 ) {
|
||||||
// we do step forward on the ref, and by returning null we also indicate that we are past the read end.
|
genomeOffset++; // extended events need that. Logically, it's legal to advance the genomic offset here:
|
||||||
|
// we do step forward on the ref, and by returning null we also indicate that we are past the read end.
|
||||||
|
|
||||||
|
// if we had an indel right before the read ended (i.e. insertion was the last cigar element),
|
||||||
|
// we keep it until next reference base; then we discard it and this will allow the LocusIterator to
|
||||||
|
// finally discard this read
|
||||||
|
eventDelayedFlag--;
|
||||||
|
if ( eventDelayedFlag == 0 ) {
|
||||||
|
eventLength = -1; // reset event when we are past it
|
||||||
|
insertedBases = null;
|
||||||
|
eventStart = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue