This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Number of cells in each clusters

I wanted to determine if the number of particular cell type in a cluster is changing with the treatment conditions. I have used stimulated vs. control PBMC datasets vignette for this analysis comparing two conditions.

Question: I used the code below to get the counts in each cluster and treatment condition. I wanted to know if number of cells from the code below is normalized to the total number of cells sequenced for each samples.

table(Idents(immune.combined), immune.combined$stim)

Thank you.

numbers seurat cell

1 answer

No, that is just going to return counts of the idents (presumably clusters?) split by condition.

OSCA has a nice chapter on differential abundance testing, which is what it sounds like you're trying to do.

Thank you for your reply. Looks like with OOSCA I need to redo all analysis. Is there any way to get this info from Seurat or from any tool based on Seurat?

You can convert Seurat objects to the Bioconductor SingleCellExperiment class with the as.singlecellexperiment() function. I'd recommend giving that a try.

Log in to answer this question.