YuLab-SMU / ChIPseeker

:dart: ChIP peak Annotation, Comparison and Visualization
https://onlinelibrary.wiley.com/share/author/GYJGUBYCTRMYJFN2JFZZ?target=10.1002/cpz1.585
224 stars 74 forks source link

Make ncpus configurable for getTagCiMatrix #147

Closed thesus closed 3 years ago

thesus commented 3 years ago

The provided patch makes it possible to use the ncpus argument on plotAvgProf to configure the number of cores that are used for processing.

# Example usages of `ncpus` argument
 plot <-  plotAvgProf(tagMatrix,
    xlim = c(-3000, 3000),
    conf = 0.95,
    resample = 1000,
    ncpus = 8
)

This is related to #110 and possibly #145, since the RAM usage depends heavily on the amount of used cores. Currently it seems to be possible that using plotAvgProf with reasonably sized input data terminates on a machine with 8 cores and 32GB of RAM but not on a machine with 16 cores and the same amount of RAM. Limiting the amounts of cores used this might be mitigated.

Please don't hesitate to contact me if there are any questions.

GuangchuangYu commented 3 years ago

thanks.