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

Bug fix in flow allele filtering #8775

Conversation

ilyasoifer
Copy link
Collaborator

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.

@ilyasoifer ilyasoifer requested a review from jamesemery April 14, 2024 15:59
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--) {
Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Collaborator Author

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!

@ilyasoifer ilyasoifer requested a review from jamesemery April 28, 2024 14:25
@ilyasoifer
Copy link
Collaborator Author

@jamesemery - please take another look!

Copy link
Collaborator

@jamesemery jamesemery left a 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.

@ilyasoifer ilyasoifer merged commit 5c32785 into broadinstitute:master May 2, 2024
20 checks passed
@ilyasoifer ilyasoifer deleted the ilyasoifer/BIOIN-1523-allele-filtering-did-not-filter-well-by-sor branch May 2, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants