huayc09 / SeuratExtend

https://huayc09.github.io/SeuratExtend/
GNU General Public License v3.0
98 stars 8 forks source link

Waterfall plot to show effects of treatment in one group/cluster #20

Open barta-lab opened 2 days ago

barta-lab commented 2 days ago

Hi,

thank you for an excellent package. I just want to ask you, if there is option to show effects of treatment on gene expression in one cluster using waterfall plot. It seems that waterfall allows only comparison between groups.

Thank you. Tom

huayc09 commented 23 hours ago

Thank you for your question. Yes, you can use the cells parameter to specify which cells to analyze. For example, if you want to compare gene expression between sample1 and sample2 in CD4 T Memory cells:

cells <- pbmc$cluster == "CD4 T Memory"
WaterfallPlot(pbmc, features = rownames(pbmc),
              group.by = "orig.ident", 
              ident.1 = "sample1", 
              ident.2 = "sample2", 
              cell = cells,
              top.n = 10)