-
Notifications
You must be signed in to change notification settings - Fork 592
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
Bug fix in flow allele filtering #8775
Bug fix in flow allele filtering #8775
Conversation
for (int i = sorIndices.length-1 ; (i >= 0) && (collectedSORs.get(sorIndices[i])>SOR_THRESHOLD) ; i--) { | ||
if (!result.contains(alleles.get(sorIndices[i]))) { | ||
result.add(alleles.get(sorIndices[i])); | ||
for (int i = sorIndices.length-1 ; (i >= 0) ; i--) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh thats a nasty issue i see...
@@ -298,5 +298,70 @@ public void testNotFilterLoneWeakAllele(){ | |||
|
|||
} | |||
|
|||
@Test //check that we filter strong allele with high SOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this test might test what you want here. I would recommend adding a unit test to the AlleleFiltering.identifyBadAlleles() (made package protected and marked with @VisibleForTesting) and constructing a specific case that triggers this bug and explaining that its capturing the state where the SOR and Qual based filtering sorting are out of step and you are still fitlering appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesemery - good idea, added test!
@jamesemery - please take another look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test is much easier to follow what the bug is. This looks okay to merge to me.
A really tiny bug fix. Apparently allele filtering did not work well in case the allele with high SOR was not the one with the lowest quality.