Sorting DEGs in the dotplot for every column
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()
• 898 views
•
link
1 answer
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
• 0 views
•
link
Log in to answer this question.