Error: cannot allocate vector of size 22.3 Gb
1
0
Entering edit mode
18 months ago
sukeshinik5 ▴ 10

Hello! I am new to R and trying to do WGCNA, all the codes run until i get to "dissTOM = 1-TOMsimilarityFromExpr(datExpr0, power = 6)" this part. Once that is run I get following error "Error: cannot allocate vector of size 22.3 Gb".

I tried allocating memory to the programm, changing its limits, and also run the whole script in external SSD but still the error remains. Can someone please help me if they have faced the same issue? I don't know what to do more.

wgcna memory error R • 2.3k views
0
Entering edit mode

It's referring to RAM. Does your machine have ~ 23GB of RAM? If not, you'll keep encountering this error. Do you have lots of objects loaded into memory? Do you have lots of programs running in the background? Try and free up as much RAM as you can. I doubt any of this will help if R is trying to allocate a vector that big.

0
Entering edit mode

Related StackOverflow post:

3
Entering edit mode
18 months ago

If you do not have access to a more powerful machine, try to reduce the number of transcripts in your datExpr0 (e.g. remove low expressed transcripts or keep transcripts expressed in at least > 80% of your samples)

1
Entering edit mode

It may be late for the response, but thankyou. reducing the transcripts worked. somehow the initial metrics was taken as duplicates. so removed the duplicates too which resolved the issue. Thank you so much.