How to count gene expression level in R?
1
0
Entering edit mode
2.6 years ago
ja4123 ▴ 20

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 • 2.4k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
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?

ADD REPLY
1
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.

btw. thx for the answer

ADD REPLY
3
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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
ADD REPLY
1
Entering edit mode
2.6 years ago
ATpoint 81k

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.

ADD COMMENT
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.

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Count? what does that mean?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

Appreciate the help!

ADD REPLY

Login before adding your answer.

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