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

⚡ refactor tableRuns to better manage memory #32

Merged
merged 24 commits into from
May 9, 2023
Merged

⚡ refactor tableRuns to better manage memory #32

merged 24 commits into from
May 9, 2023

Conversation

bunop
Copy link
Contributor

@bunop bunop commented Mar 30, 2022

Description

tableRuns are now calculated on each chromsome one-by-one. Code was revisited to better manage resources and calculate percentages properly. snpInsideRunsCpp is no more exported, so it's not possible to provide directly its results to tableRuns

Related Issue

closes #31
closes #36

Motivation and Context

tableRuns consume a lot of memory especially when applied to WGS data. By calculating snpInsideRuns on each chromosome and immediately filtering runs lower the memory usage

How Has This Been Tested?

Code has been tested with CI and by manually checking results

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

bunop added 6 commits March 28, 2022 19:06
snpInsideRuns(Cpp) is now internal
check runs where SNP are major or equal the threshold specified
rewrite code to calculate percentages correctly
@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2022

Codecov Report

Merging #32 (715b11e) into devel (1f821bc) will increase coverage by 7.94%.
The diff coverage is n/a.

❗ Current head 715b11e differs from pull request most recent head 52abad1. Consider uploading reports for the commit 52abad1 to get more accurate results

@@            Coverage Diff             @@
##            devel      #32      +/-   ##
==========================================
+ Coverage   50.91%   58.86%   +7.94%     
==========================================
  Files           6        6              
  Lines        1259     1354      +95     
==========================================
+ Hits          641      797     +156     
+ Misses        618      557      -61     
Impacted Files Coverage Δ
src/functions.cpp 94.96% <0.00%> (-0.26%) ⬇️
R/Stats.R 0.00% <0.00%> (ø)
R/plots.R 17.38% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f821bc...52abad1. Read the comment docs.

correctly skip empty subset
detectRUNS/R/Stats.R Outdated Show resolved Hide resolved
@bunop bunop changed the title ⚡ refactor tableRuns to manage memory better ⚡ refactor tableRuns to better manage memory Apr 4, 2022
@filippob filippob merged commit a35f7a3 into devel May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants