Fix #844 Fix bug in module motifs#856
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #856 +/- ##
=======================================
Coverage 99.28% 99.28%
=======================================
Files 83 83
Lines 13699 13753 +54
=======================================
+ Hits 13601 13655 +54
Misses 98 98
☔ View full report in Codecov by Sentry. |
|
For future reference: |
c41ed32 to
e9bdaf2
Compare
NimaSarajpoor
left a comment
There was a problem hiding this comment.
@seanlaw
I just left two comments. Please add your comments as well if you have any.
|
I never noticed the Also, maybe we should move the |
I will remove it. If I notice an error raised by a specific test(s) as a result of such change, I will create an issue so that we can handle that specifc test(s) in another PR.
Correct. Later, we can re-use it for testing Note that the |
|
@NimaSarajpoor Is this ready to be merged? |
|
@seanlaw FYI: In the function I think |
|
Thanks @NimaSarajpoor |
aamp_match does not forward query_idx to core.mass_absolute, so the self-match is never zeroed
#1151
…1152) core._find_matches seeds candidate_idx = query_idx and then breaks when D[candidate_idx] > atol + max_distance, so it relies on D[query_idx] == 0. core.mass_absolute establishes that, but aamp_match never passed query_idx to it, unlike motifs.match which passes it to core.mass. query_idx was added to core.mass and core.mass_absolute in #860; #856 wired it into core.mass from motifs.match the next day, but aamp_motifs.py was not updated. core.mass_absolute's query_idx branches have been unreachable since, which is why they carry `# pragma: no cover`. They are now covered, so the pragmas are removed. For a correct self-join the fix is a no-op: cdist returns exactly 0.0 for the identical row, so D[query_idx] was already the minimum. What it restores is the "self-match is returned first" guarantee and the "Subsequences `Q` and `T[query_idx:query_idx+m]` are different" warning when query_idx does not describe Q -- neither of which could happen on the non-normalized path.
@seanlaw
Sorry for the noise! I am not getting revenge btw 😆 I am just newbie. So, the nature of our noises are different :)