Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertions in LocusIterator bugfix #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

nkarulin
Copy link

@nkarulin nkarulin commented Jun 5, 2017

The current version of AbstractLocusIterator class works the following way: when new read comes, it completes all accumulated loci with position to the left of the read start. When the flag includeIndels is specified, the read starting with insertions won't complete the locus at the position to the left of the read start. So, iterator will keep previous locus, which will store insertion info.
The bug appears when a read that does not start with insertion(REC1) comes before the read that does start with insertion (REC2) at the same position:

REF                     :  ATGC....TGCATGCATGC
REC (Pos=5, CIGAR: 3M)  :          TGC
REC (Pos=5, CIGAR: 3I3M):      TGCATGC

In this case the first read without insertion will complete all loci at the previous positions. As a result there is no locus in which we should have accumulated the insertion from the second read which leads to IllegalStateException.
We propose to store one more locus in accumulator before completion to make sure that all records (including those that start with insertion) on current position were accumulated.

@nkarulin nkarulin added the bug label Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant