paulsengroup / hictk

Blazing fast toolkit to work with .hic and .cool files
MIT License
22 stars 1 forks source link

Support opening .hic files with only 1 bin per chromosome #180

Closed robomics closed 3 months ago

robomics commented 3 months ago

Fix integer overflow in .hic cache estimation

Fixes https://github.com/paulsengroup/hictk/issues/178

This overflow occurs when trying to estimate the block cache size of .hic files using chromosomes that are smaller than the file resolution.

The overflow is caused by the implicit (and incorrect!) assumption that there are always at least two relative bin IDs mapping to each chromosome, and that is thus always safe to decrement the last chromosome bin ID by 1.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.91%. Comparing base (9f426e7) to head (929aafd). Report is 21 commits behind head on main.

:exclamation: Current head 929aafd differs from pull request most recent head 4ce7f54

Please upload reports for the commit 4ce7f54 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #180 +/- ## ======================================= Coverage 84.91% 84.91% ======================================= Files 119 119 Lines 10076 10079 +3 ======================================= + Hits 8556 8559 +3 Misses 1520 1520 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.