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

speed up normalizeToMatrix #71

Open
olechnwin opened this issue Aug 9, 2022 · 2 comments
Open

speed up normalizeToMatrix #71

olechnwin opened this issue Aug 9, 2022 · 2 comments

Comments

@olechnwin
Copy link

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.

@jokergoo
Copy link
Owner

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)

@olechnwin
Copy link
Author

Thank for your suggestions. I will try this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants