scRNAseq: working with barcode, gene and matrix files
1
0
Entering edit mode
4.3 years ago
colonppg ▴ 120

hey, Folks:

never worked with barcode, matrix and gene files before, it seem they have these 3 file types for the same sample, I wonder are there tutorials available on getting the data into data frame files that we usually are familiar with?

thanks, this is a newbie question ...

scRNAseq • 2.0k views
ADD COMMENT
0
Entering edit mode
4.3 years ago

You aren't going to want to use a traditional data-frame with single-cell matrices because how large they end up being. Instead, use a package such as Matrix as follows:

1.) Use the Matrix package to load the MTX file:

if(!require("Matrix")) install.packages("Matrix")
mtx <- Matrix::readMM(mtx)

2.) Read in the barcodes and gene names:

features <- read.delim(features)
barcodes <- read.delim(barcodes)

3.) Set the column names as the barcodes, and rownames as the gene names:

rownames(mtx) <- features
colnames(mtx) <- barcodes
ADD COMMENT
0
Entering edit mode

now after reading from several websites, I realized, for some weird reason, the code to combine them together does not work, but Read10X from Seurat package works for this data... only issue is we have to do this by changing file names

Read10X(data.dir="./tmp", gene.column=2, unique.features =T, strip.suffix=F)

ADD REPLY
0
Entering edit mode

This is an issue of where you have gotten the data from then. The matrix file should not have more columns than the amount of barcodes.

ADD REPLY

Login before adding your answer.

Traffic: 1840 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