[SOLVED] How to build a table with gene expression per cell type with Seurat ?


Hello, I'm new on single-cell analysis and the use of deconvolution methods.

I would like to create my own signature matrix from single-cell rna data to use it in Cibersortx as a reference profile. Currently, I'm using Seurat to cluster my cells in cell type following this tutorial :

Is it possible to get a table with in column the cells labeled with their cell type and in rows the genes with their expression in each cells (Count/RPKM/TPM ?).

In fact I would like a table which look like the picture below to use it as single cell reference sample file to build a signature matrix file to use in Cibersortx.

Reference sample file format

I would be very grateful if someone could explain me how to do it. Thank you.






Thank you for your answers. I succeed to extract two tables, one with two colums with cell sequence (UMI) associated with its cell label (CD4, CD8, DC etc...) and another with gene expression per cell sequence.
In case if someone is getting the same problem I use this command in R to write it in two files :

Cell Sequence and Cell Label (pmbc is my data)

write.table([email protected], file="Convert_UMI_Label.tsv", quote=FALSE, sep='t', col.names = TRUE)

Gene counts per cell

write.table([email protected][["RNA"]]@counts, file="Gene_Count_per_Cell.tsv", quote=FALSE, sep='t', col.names = TRUE)

After I used a little script in Python to merge these two files getting Gene Counts per cell labeled with their cell type 🙂 (I could surely do it in R but my knowledge in this language is limited).

Visit this page it explains how to extract some interessant content from seurat object : satijalab.org/seurat/v3.0/interaction_vignette.html

Use meta.data of the seurat object to get the number of counts and save that using write.csv to get your table

Use the AverageExpression() function to get the averaged feature expression by identity class.

before adding your answer.

Traffic: 2036 users visited in the last hour

Source link