edilytics / CRISPResso2

Analysis of deep sequencing data for rapid and intuitive interpretation of genome editing experiments
Other
0 stars 1 forks source link

Reduce memory usage in `plot_alleles_table` #96

Closed Colelyman closed 2 months ago

Colelyman commented 2 months ago

This PR moves the prep_alleles_table function out of the plot_alleles_table function to minimize the amount of data copied over to other parallel processes. This makes it possible to analyze datasets with a large number of alleles with less memory.

@kclem there are some other places that we could make this change, namely in https://github.com/edilytics/CRISPResso2/blob/master/CRISPResso2/CRISPRessoCompareCORE.py#L409 but we don't use multiprocessing here, so it wouldn't change how much memory is used. Do you think we should refactor this as well?