How to convert single-cell RNAseq filename.mtx.gz to seurat object
1
0
Entering edit mode
2.1 years ago

Hi All,

I need your great help with my public scRNAseq data obtained from GEO dataset analysis.

For example, if I want to access this dataset (GSE118019) to convert it into Seurat object?

There is no separate barcode, features, matrix files. Instead, the authors just provided them in the combined form (File SM3317330_10x_rubcn_wt.mat.gz). So my question is how to convert this file into a Seurat object for downstream analysis. I need your help with this issue. Your great help is highly appreciated. Thank you very much in advance!

seurat • 3.4k views
ADD COMMENT
0
Entering edit mode

There are only two scRNA samples in this dataset (others are bulk). Data processing notes say:

The bam files have cell barcodes in the CB tags and molecular barcodes in the UB tags.
Cellranger 1.3.1 was used to align the reads, collapse UMIs, and generate count matrices
All data analysis was performed in R using custom code
Genome_build: mm10
Supplementary_files_format_and_content: Processed data contain counts of transcripts for each gene in each cell after removal of read duplicates using UMIs

So last line is probably the file you have.

ADD REPLY
0
Entering edit mode

@GenoMax Thank you very much for your reply. I will try and let you know.

ADD REPLY
0
Entering edit mode

This matrix file looks like the following. I'm a little confused about how to make it into a Seurat object. Your help is highly appreciated. Thanks in advance.

 cell_name                         ensembl              count
10X-greenlab-KO_AAACCTGAGGCCGAAT-1 ENSMUSG00000051951     0
10X-greenlab-KO_AAACCTGCACCAGATT-1 ENSMUSG00000051951     0
10X-greenlab-KO_AAACCTGCAGACGTAG-1 ENSMUSG00000051951     0
10X-greenlab-KO_AAACCTGGTCTTGATG-1 ENSMUSG00000051951     0
10X-greenlab-KO_AAACCTGTCTCCCTGA-1 ENSMUSG00000051951     0
ADD REPLY
1
Entering edit mode
2.1 years ago
Priyanka ▴ 10

You may try these codes in R

Library(Matrix)
Library(Seurat)
matrix.path <- paste0(matrix_dir, "matrix.mtx.gz") 
mat <- readMM(file = matrix.path)
pbmc.hashtag <- CreateSeuratObject(counts = mat)

See if it works or check out these links: Cite-seq-count and Seurat Demux using HTO

Hope it helps.

ADD COMMENT
0
Entering edit mode

Hi Priyanka,

Thank you very much for your reply. I tried with your code, but it throws the following error. "Error in readMM(file = matrix. path) : file is not a MatrixMarket file". I think this is due to an incorrect matrix format. or something else?

ADD REPLY
0
Entering edit mode

A Mtx file has a specific type of header like following:

%%MatrixMarket matrix coordinate integer general
%
4 2997 11987
2 1 774
1 1 182
3 1 30
4 1 47
2 2 538
3 2 65
1 2 90

Your file is a Umi count matrix.

ADD REPLY
0
Entering edit mode

Thanks Priyanka.

ADD REPLY

Login before adding your answer.

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