PlotOverview2D: Plot metaclusters on scatter plots

Description Usage Arguments Value See Also Examples

View source: R/3_buildMST.R

Description

Write multiple 2D scatter plots to a png file. All cells of fsom$data are plotted in black, and those of the selected metaclusters are plotted in color.

Usage

1
PlotOverview2D(fsom, markerlist, metaclusters, colors = NULL, ff, ...)

Arguments

fsom

FlowSOM object, as generated by FlowSOM. If using a FlowSOM object as generated by BuildMST, it needs to be wrapped in a list, list(FlowSOM = fsom, metaclustering = metaclustering).

markerlist

List in which each element is a pair of marker names

metaclusters

Metaclusters of interest

colors

Named vector with color value for each metacluster. If NULL (default) colorbrewer "paired" is interpolated

ff

flowFrame to use as reference for the marker names

...

Other parameters to pass on to PlotClusters2D

Value

Nothing is returned, but a plot is drawn for every markerpair and every metacluster. The individual cells are colored, and the center of each FlowSOM cluster is indicated with a blue cross.

See Also

PlotClusters2D

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
   # Read from file, build self-organizing map and minimal spanning tree
   fileName <- system.file("extdata", "68983.fcs", package="FlowSOM")
   flowSOM.res <- FlowSOM(fileName, 
                          compensate=TRUE, transform=TRUE, scale=TRUE,
                          colsToUse=c(9,12,14:18),
                          nClus = 10,
                          seed = 1)
                          
   # Plot cells
   markers_of_interest = list(c("FSC-A", "SSC-A"),
                              c("CD3", "CD19"),
                              c("TCRb", "TCRyd"),
                              c("CD4", "CD8"))
   metaclusters_of_interest = 1:10
   
   # Recommended to write to png
   
   png("Markeroverview.png",
       width = 500 * length(markers_of_interest),
       height = 500 * length(metaclusters_of_interest))
   PlotOverview2D(flowSOM.res,
                  markerlist = markers_of_interest,
                  metaclusters = metaclusters_of_interest,
                  pchCluster = 19,
                  ff = flowCore::read.FCS(fileName))
   dev.off()

FlowSOM documentation built on Nov. 8, 2020, 6:40 p.m.