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

Error in array(ans, c(len.a%/%d2, d.ans), if (!is.null(names(dn.ans)) || : negative length vectors are not allowed #39

Open
lucygarner opened this issue Mar 14, 2023 · 2 comments

Comments

@lucygarner
Copy link

Hi,

I am getting this error at the extract_modules step, which appears to be related to the maximum length of allowed vectors in R: https://stackoverflow.com/questions/42479854/merge-error-negative-length-vectors-are-not-allowed, alyssafrazee/polyester#41, https://support.bioconductor.org/p/66401/

"You are getting this error because the data.frame / data.table created by the join has more than 2^31 - 1 rows (2,147,483,647). Due to the way vectors are constructed internally by R, the maximum length of any vector is 2^31 - 1 elements (see: https://stackoverflow.com/a/5234293/2341679). Since a data.frame / data.table is really a list() of vectors, this limit also applies to the number of rows."

modules <- extract_modules(scale_quantile(expr_sel), traj$time, verbose = FALSE)

expr_sel is 48384 (cells) * 100 (top 100 genes from gene_importances)

Looking at my memory profiling output, there is a spike of memory usage at this point:

image

Is there a way around this, or would I need to subsample the number of cells? What is the maximum number of cells * genes for which you have run extract_modules. Looking at the underlying code, my guess is that the error arises when running Mclust.

Best wishes,
Lucy

@lucygarner
Copy link
Author

I noticed this issue might be similar: #32

@asif7adil
Copy link

Hi Lucy!

I am also facing the same problem, did you find a solution to this problem? I would be grateful for any help.

Thanks!

Best,
Asif

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