Region processing speedup - #125
Open
thekugelmeister wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick fixes to speed up
regions_to_list, by omitting parallelization infrastructure when running with a single core.Updates at a glance
*_process_chunkfunctions into a processing function and a higher-level parallelization function, for both pileup counts and vectors.regions_to_listonpileup_counts_from_bedmethyl, this results in ~300x speedupOther findings
While implementing these fixes, a few things have become clear through testing:
pysamhas significant overheadBelow is a plot comparing processing speeds for a set of simplified tests (blue) and different versions of pileup counting methods (orange). In addition to identifying the main cause of the
regions_to_listslowdown, this visualization suggests that there may be a ~2x speedup available if we avoid reopening tabix files as much as possible.This change will be implemented as part of a future effort.
