satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.29k stars 914 forks source link

Differential gene expression without cell type annotation #5216

Closed cpolk3 closed 3 years ago

cpolk3 commented 3 years ago

Hi, I am working through the intro to scRNA-seq integration and I want to look at gene expression between my two samples but without doing cell type annotation. Is there a way to bypass the feature assignment and just plot differential gene expression by cluster number?

samuel-marsh commented 3 years ago

Hi,

Not member of dev team but hopefully can be helpful. Unsure from your phrasing, are you trying to compare expression between your two samples or between clusters?

cpolk3 commented 3 years ago

Hi Sam, I am looking to compare expression between my two samples (or more, as I have several projects I am currently working on). In the "introduction to scRNA-seq integration" vignette there is a subheader of "identify conserved cell type markers" called "identify differential expressed genes across conditions." The focus throughout seems to be the cell type rather than the specific gene expression. I would rather work backwards from my genes of interest and compare gene expression between samples without annotating for cell type.

Like if I could pinpoint, say, the most conserved genes across conditions and plot them condition by condition that would be very helpful. Then do the same with specific genes of interest that are pertinent to my project.

Eventually I would like to do cell type annotation but as a beginner coder I am just not equipped to do so. I have had a moderate amount of success with Clustifyr but only because my cells at the time matched the built in reference genome. Seurat gives no hints (I think) on how to do bulk cell type annotation, especially for the cells I am working with (samples are from the periaqueductal gray region of rat brains).

samuel-marsh commented 3 years ago

Hi,

I would recommend also reading manual entries for functions as they can provide extra information and will help you learn what the functions are doing.

As the description for FindAllMarkers states it will "Finds markers (differentially expressed genes) for each of the identity classes in a dataset". So you should make sure that assay is set to RNA and data has been normalized and then run this and replace OBJ and META_DATA_COLUMN_NAME with your object name and the name of the meta data column that species which cells are from which of the two samples.

# Set idents to sample identiy
Idents(OBJ) <- "META_DATA_COLUMN_NAME"

sample_de <- FindAllMarkers(object = OBJ)

Also if you only want to test if a specific subset of genes is different as specified in manual again you can use the features parameter: "Genes to test. Default is to use all genes". In this case you can run:

# Set idents to sample identiy
Idents(OBJ) <- "META_DATA_COLUMN_NAME"

genes_list <- c("gene1", "gene2", etc)

sample_de <- FindAllMarkers(object = OBJ, features = genes_list)

Although again how informative this is will depend on different cell types present. And if you're different samples have different abundances of different cell types then the changes reported may not reflect changes in percent of expressing cells within cell type or change in expression level but simply different abundance. And the difference in abundance could be biological or technical but with only two samples you won't know for sure.

Best, Sam