| AddAnnotation {FlowSOM} | R Documentation |
Add annotation to a FlowSOM plot
AddAnnotation( p, fsom, layout = fsom$MST$l, cl = NULL, mcl = NULL, clCustomLabels = NULL, mclCustomLabels = NULL, hjust = 0.5, ... )
p |
Plot to add annotation to. When using type = "stars", please
use plot = FALSE in |
fsom |
FlowSOM object that goes with the plot |
layout |
Layout to use. Default fsom$MST$l |
cl |
Clusters to annotate. If cl = "all", all clusters will be annotated |
mcl |
Metaclusters to annotate. If mcl = "all", all metaclusters will be annotated |
clCustomLabels |
Cluster labels to use for annotation |
mclCustomLabels |
Metacluster labels to use for annotation |
hjust |
Label adjustment. Default = 0.5 |
... |
Arguments passed to geom_text_repel |
The updated plot
#' # Identify the files
fcs <- flowCore::read.FCS(system.file("extdata", "68983.fcs",
package = "FlowSOM"))
# Build a FlowSOM object
flowSOM.res <- FlowSOM(fcs,
scale = TRUE,
compensate = TRUE,
transform = TRUE,
toTransform = 8:18,
colsToUse = c(9, 12, 14:18),
nClus = 10,
seed = 1)
p <- PlotStars(flowSOM.res, backgroundValues = flowSOM.res$metaclustering,
list_insteadof_ggarrange = TRUE)
AddAnnotation(p, flowSOM.res, cl = c(1, 2), mcl = c(3, 4))