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

Fix bug when fetching normalized interactions as dense matrices #252

Merged
merged 5 commits into from
Sep 15, 2024

Conversation

robomics
Copy link
Contributor

This PR addresses a bug detected by the new fuzzer suite.
In brief, fetching normalized pixels as dense matrices could sometime results in incorrect results, where some entries that were supposed to be inf (due to e.g. normalization with divisive weights of value 0) were instead set to nan.

The main motivation behind this is to mask bad bins during matrix construction.
This fixes a bug found by the new fuzzer, where divisive weights with value 0
were not always handled correctly.
@robomics robomics added the bug Something isn't working label Sep 15, 2024
Copy link

codecov bot commented Sep 15, 2024

Codecov Report

Attention: Patch coverage is 73.56322% with 23 lines in your changes missing coverage. Please review.

Project coverage is 74.54%. Comparing base (365f138) to head (a399491).

Files with missing lines Patch % Lines
...e/hictk/transformers/impl/to_dense_matrix_impl.hpp 64.70% 9 Missing and 3 partials ⚠️
...hictk/hic/include/hictk/hic/impl/hic_file_impl.hpp 83.33% 4 Missing and 1 partial ⚠️
src/libhictk/file/include/hictk/impl/file_impl.hpp 72.72% 2 Missing and 1 partial ⚠️
.../hictk/transformers/impl/to_sparse_matrix_impl.hpp 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   74.52%   74.54%   +0.01%     
==========================================
  Files         144      144              
  Lines       12434    12451      +17     
  Branches     1445     1439       -6     
==========================================
+ Hits         9266     9281      +15     
- Misses       1989     1993       +4     
+ Partials     1179     1177       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robomics robomics merged commit 43d6559 into main Sep 15, 2024
@robomics robomics deleted the fix/eigen-dense branch September 15, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant