Making scRNA counts file from barcodes, genes and matrix.mtx file
1
0
Entering edit mode
5.7 years ago
Paragon ▴ 10

Hello!

I have barcodes.tsv, genes.tsv and matrix.mtx files. I want to generate a sample scRNA counts files using R.

Thanks!

RNA-Seq R • 5.6k views
ADD COMMENT
2
Entering edit mode
5.7 years ago

The context of "I used CellRanger from 10X genomics..." would be needed for most people to provide you with actual help...

matrix.mtx is a MatrixMarket file that can be loaded in R with:

library(Matrix)
m = readMM("matrix.mtx")

The columns are the rows in barcodes.tsv (not that it really matters which is which, you can just ignore this file in my opinion) and the row labels are given in genes.tsv (use the first column).

ADD COMMENT
1
Entering edit mode

Additionally, if you know how you will be analyzing the data, you may want to check the instructions for that pipeline. Many single-cell analysis packages now include a function to read 10x matrix and convert it to the most appropriate format for that package.

ADD REPLY
0
Entering edit mode

Thank you very much.

ADD REPLY
0
Entering edit mode

Thanks! I'm new in R. May I know how I set the row labels from genes.tsv?

ADD REPLY
0
Entering edit mode

please provide the steps you followed to this, I am also new to this. I will be grateful.

ADD REPLY
0
Entering edit mode

help(row.names) and help(read.csv)

ADD REPLY

Login before adding your answer.

Traffic: 1662 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6