This is a test version of Biostars. For the public version, visit https://www.biostars.org.
single cell RNA analysis

Hi all, I am new to the BioInformatics, and quite a beginner in R programming language. I have a dataset of 10 patients and 4 healthy controls (size of data 20GB), and I need to do sc RNA seq and get different expression gene. I get count matric for each sample and merge them, then I create Seurat object. Everything is ok until now. Unfortunately, Normalization and Scale step do not work as well as SCTransform is not working. I got this error Error: cannot allocate vector of size 19.6GB and exit from R even I do the analysis on a remote server and I checked the memory ($ free -g) and got

          total            used        free      shared  buff/cache   available
          Mem:             62           9          36           0          16          52
          Swap:             0            0           0

Could I analysis every sample alone separately without merging all samples?

I'd greatly appreciate any thoughts or suggestions that you might have.

Thanks

scrna-seq seurat sctransform memory

2 answers

For this type of analysis, you can do the first part of the analysis with a separate seurat object for each sample. You can then integrate the different samples together for the later parts of the analysis.

Seurat has a few vignettes here that cover this topic.

Try

memory.size()
memory.limit()
memory.limit(size=56000)

This work for me for data of size 12GB and my machine is 16 GB

I would not recommend this - your machine could crash if only 4 GB is available to all other processes. You're better off using rpolicastro's method.

Log in to answer this question.