Sorting DEGs in the dotplot for every column
1
0
Entering edit mode
3 months ago
ashkan ▴ 160

I am trying to sort the genes (blue and grey dots) in each column in my dotplot and put the blue ones together and grey one together in each column (which means per sample). what argument should I add to the following command? the dotplot is made for DEGs between conditions.

DotPlot(mydata, features = rev(as.character(unique(top20_sub$gene))), group.by = "orig.ident", assay = "RNA") + coord_flip() + RotatedAxis()
scRNAseq • 213 views
ADD COMMENT
0
Entering edit mode
3 months ago

If you are looking for something like a hierarchical clustering of your genes in the DotPlot function, seems like the feature does not exist (question asked here). The only thing you can cluster is your identities.

A work around would be to generate the DotPlot, extract the data, reorganize them the way you want and replot.

dp <- DotPlot(mydata, features = rev(as.character(unique(top20_sub$gene))), group.by = "orig.ident", assay = "RNA") + coord_flip() + RotatedAxis()
dp$data
ADD COMMENT

Login before adding your answer.

Traffic: 2014 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6