How to count gene expression level in R?
1
0
Entering edit mode
6 weeks ago
ja4123 • 0

Hi! Could anyone suggest some reasonable quick way (library or tutorial) to get table with gene expression level with data listed below?

.tsv with barcodes

.tsv with genes

and .mtx matrix

I am new in this and I will appreciate any help.

expression seurat r gene bioconductor • 684 views
0
Entering edit mode

Come on. How can anyone help if you don't say what format your data is now?

0
Entering edit mode

You would need phenotype data in addition to gene and matrix. In addition, please pose if gene order (in from genes .tsv) match with order of values (in matrix). Matrix needs sample names. Do you have corresponding sample names matching with matrix columns?

0
Entering edit mode

I found this post: [SOLVED] How to build a table with gene expression per cell type with Seurat ?. This seems to be what I want, but I was wondering if the whole thing could be done in R.

2
Entering edit mode

"The context of "I used CellRanger from 10X genomics..." would be needed for most people to provide you with actual help..." Devon Ryan 's comment relevant even after 3.1 yr :).

Here is the tutorial on how to load the scdata in R: https://hbctraining.github.io/scRNA-seq/lessons/readMM_loadData.html. 10x it self has put manual over there how to do this in R and python: https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/output/matrices

0
Entering edit mode

Thanks very much for help. I will try those links.

0
Entering edit mode
1
Entering edit mode
6 weeks ago
ATpoint 55k

Making scRNA counts file from barcodes, genes and matrix.mtx file

The mtx file stores the counts, the barcodes are the colnames and the genes are the rownames.

0
Entering edit mode

Do you know way to store that count matrix in .tsv or .csv file? Sorry for not smart question but R in not my strong site. I am definitely prefer python.

1
Entering edit mode

You can export any matrix in R with write.table() but depending on the dimensions it is going to be large, that is why these sparse formats exist.

0
Entering edit mode

Should I count that matrix after normalization, feature selection, scaling and dimensional reduction? Or wheres before?

0
Entering edit mode

Count? what does that mean?

0
Entering edit mode

I need to get table with gene expression level (count matrix). I did not confuse the concepts?

1
Entering edit mode

That would be the mtx file after reading into R with readMM, but if you prefer python then I am sure there are ways to read it into python. mtx is short for MatrixMarket, google will for sure give suitable packages for python to read it.

0
Entering edit mode

Appreciate the help!