EnrichedHeatmap icon indicating copy to clipboard operation
EnrichedHeatmap copied to clipboard

speed up normalizeToMatrix

Open olechnwin opened this issue 1 year ago • 2 comments

Hi, I am wondering if there is a way to speed up normalizeToMatrix or a workaround? Thank you in advance! I really enjoy using EnrichedHeatmap so far.

olechnwin avatar Aug 09 '22 14:08 olechnwin

For the format

normalizeToMatrix(signal, target, ...)

maybe you can split target into blocks and run normalizeToMatrix() separately, later combine them with rbind():

tl = list(
    target[1:100],
    target[101:200],
    target[201:300],
    ....
) 

ml = mclapply(tl, mc.cores = 4, function(x) normalizeToMatrix(signal, x))

m = do.call(rbind, ml)

EnrichedHeatmap(m)

jokergoo avatar Aug 31 '22 11:08 jokergoo

Thank for your suggestions. I will try this!

olechnwin avatar Aug 31 '22 15:08 olechnwin