Leave low-scoring MAPQ 0 reads unmapped#4916
Conversation
|
Yeah this is currently borked for track provenance stuff, sigh. I am trying to divine what magic the funnel system wants from me. |
|
@adamnovak one of the tests is failing with and I don't think that's my fault? |
adamnovak
left a comment
There was a problem hiding this comment.
I think the option documentation is wrong, and I think the funnel stuff would work a lot more neatly if we declared that this post-filtering is happening in a new funnel stage.
I'm not sure what's wrong with the CI tests; something about the new CI runners seems to have broken test job 7 everywhere. I will see if I can fix that somehow.
| "min-mapq0-score", | ||
| &MinimizerMapper::min_mapq0_score, | ||
| MinimizerMapper::default_min_mapq0_score, | ||
| "refuse to align lower scoring MQ 60 reads" |
There was a problem hiding this comment.
Nope that's not right.
It might make more sense to explain this as discarding the alignments or leaving the reads unaligned, rather than refusing to align them, because by the time we know the score we've computed the alignment.
adamnovak
left a comment
There was a problem hiding this comment.
I think the funnel setup wasn't explained enough, so this still isn't quite right.
I'm not having good luck in #4918 so we might need to merge this over the failure of that CI test (or maybe just xfail it until it can be fixed).
| if (track_provenance) { | ||
| funnel.stage("demapping"); | ||
| for (size_t i = 0; i < mappings.size(); i++) { | ||
| funnel.project(i); |
There was a problem hiding this comment.
We're meant to figure out if the item at the previous stage fails any filter, or if it passes all filters, and then only project to an item at this stage if it passed all the filters. See:
Lines 139 to 140 in 21c5309
So the project call should probably be right after the pass() call, instead of here.
|
@adamnovak |
|
Quay has returned, apparently. |
Changelog Entry
To be copied to the draft changelog by merger:
vg giraffefilter for low-scoring MAPQ 0 R10 readsDescription
Per Slack discussion about how ridiculously low scoring MAPQ 0 R10 reads are invariably mapped incorrectly, here is my attempt at an implementation. It managed to successfully not align a test read. Basically this gives us a way to refuse to use an alignment if it looks terrible and we have no confidence in it. It's only on for R10 mode.