satijalab / seurat

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

Question about creating a bar graph in Seurat #6258

Closed smallkamal closed 2 years ago

smallkamal commented 2 years ago

Hello,

I have a dataset that I am analyzing and there are n = 5 of normal and n = 5 of diseased. I have an integrated Seurat object that I've already clustered by cell type. I'm trying to look at the expression of a certain gene in each cell type relative to the other in both normal and diseased. But the issue is that I want to show the variance between samples, so basically I need to show the expression levels in 5 normal and 5 diseased samples per cell type. I did this via the DotPlot function, but also want to use a bar graph. When I generated the dotplot, I saw that it also generates a data table that has "avg.exp," "pct.exp," and "avg.exp.scaled" values. So what I did was for each sample, I took it's avg.exp.scaled value and made a barplot with individual dots, however for a lot of the samples, the avg.exp.scaled is the exact same value (e.g 20, or 4, etc). Could someone please explain how this avg.exp.scaled value works, and why different samples can have the exact same value?

Thanks!

smallkamal commented 2 years ago

Bumping this question ^^

timoast commented 2 years ago

Please see https://github.com/satijalab/seurat/issues/5742

It sounds like a violin plot is more appropriate for what you're trying to do, you can try using the VlnPlot function