Question: To generate an scRNA counts file using barcodes.tsv, genes.tsv and matrix.mtx file
0
gravatar for janejoythomas
14 months ago by
janejoythomas0 wrote:

Hi,

I have barcodes.tsv, genes.tsv and matrix.mtx file from my RNA seq data and I want to generate a scRNA counts files using R. When I tried using readMM function, It gives me the following error: Error: cannot allocate vector of size 185.1 Gb. This happens even when I run it as a job. How can I generate a combined csv file using R?

Thank you.

rna-seq R • 1.6k views
ADD COMMENTlink modified 14 months ago by piyushjo550 • written 14 months ago by janejoythomas0
1
gravatar for jared.andrews07
14 months ago by
jared.andrews077.5k
Memphis, TN
jared.andrews077.5k wrote:

You should use a package meant to coerce your files into a format that's easier to work with, such as a SingleCellExperiment object via DropletUtils or a Seurat object.

These formats are designed to work with other R packages meant for scRNA analysis (like scater, scran, Seurat, etc).

ADD COMMENTlink written 14 months ago by jared.andrews077.5k

Hi, I am running it with Seurat. But when I create it as a seurat object using the mtx file, my Rstudio crashes when I try to make clusters from my RNA Seq data. The script requires the seurat object to be created using csv file and that what I am trying to generate.

ADD REPLYlink written 14 months ago by janejoythomas0
3

No, Seurat does not require the data to be in csv. Use Read10X to import your 10X data for object creation.

ADD REPLYlink modified 14 months ago • written 14 months ago by lshepard440
0
gravatar for piyushjo
14 months ago by
piyushjo550
piyushjo550 wrote:

You can follow the instruction on the following webpage with the heading "Loading matrices into R".

https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/output/matrices

It will generate what is called a "sparse-matrix". Then you convert the sparse-matrix (SM) into normal matrix (NM) with following command in R.

NM<-as.matrix(SM)

Cautionary word: the matrix would be huge depending upon the number of cells. Also the following code is for V3 output that gives "features.tsz.gz" file instead of old "genes.tsz.gz".

You have to put all the three output files form one experiment into the same folder.

ADD COMMENTlink modified 14 months ago • written 14 months ago by piyushjo550
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1304 users visited in the last hour