Closed MargolinGaby closed 1 year ago
ggplot2
commands for this. Here using ggrepel
, actually, to avoid overlaps. In the example, I am labeling by sample_id
, but anything that's in the colData
and maps uniquely to the samples can go here. Though, for my taste, annotating by additional metadata makes the plot too crowded/hard to read...
library(CATALYST)
library(ggplot2)
library(ggrepel)
data(PBMC_fs, PBMC_panel, PBMC_md) sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md) sce <- cluster(sce, verbose = FALSE) plt <- plotAbundances(sce, k = "meta8", by = "cluster_id")
plt + geom_text_repel(size = 3, aes(condition, Freq, col = condition, label = sample_id))
![image](https://user-images.githubusercontent.com/14542264/234216035-85ea7ea1-383c-4840-aa14-90eaaace5704.png)
Hello, I have sce00C - single cell experiment object, which already includes manually merged clusters,
Question_AbundancePlot_add_age.docx
thank you, Gaby