Skip to content

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

Description

@lucygarner

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions