PlotClusters2D: Plot nodes on scatter plot

Description Usage Arguments Value See Also Examples

View source: R/3_buildMST.R

Description

Plot a 2D scatter plot. All cells of fsom$data are plotted in black, and those of the selected nodes are plotted in red. The nodes in the grid are indexed starting from the left bottom, first going right, then up. E.g. In a 10x10 grid, the node at top left will have index 91.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
PlotClusters2D(
  fsom,
  marker1,
  marker2,
  nodes,
  col = "#FF0000",
  maxBgPoints = 10000,
  pchBackground = ".",
  pchCluster = ".",
  main = "",
  xlab = fsom$prettyColnames[marker1],
  ylab = fsom$prettyColnames[marker2],
  xlim = c(min(fsom$data[, marker1]), max(fsom$data[, marker1])),
  ylim = c(min(fsom$data[, marker2]), max(fsom$data[, marker2])),
  ...
)

Arguments

fsom

FlowSOM object, as generated by BuildMST

marker1

Marker to plot on the x-axis

marker2

Marker to plot on the y-axis

nodes

Nodes of which the cells should be plotted in red

col

Colors for all the cells in the selected nodes (ordered array)

maxBgPoints

Maximum number of background points to plot

pchBackground

Character to use for background cells

pchCluster

Character to use for cells in cluster

main

Title of the plot

xlab

Label for the x axis

ylab

Label for the y axis

xlim

Limits for the x axis

ylim

Limits for the y axis

...

Other parameters to pass on to plot

Value

Nothing is returned. A plot is drawn in which all cells are plotted in black and the cells of the selected nodes in red.

See Also

PlotNumbers,PlotCenters, BuildMST

Examples

1
2
3
4
5
6
7
8
9
   # Read from file, build self-organizing map and minimal spanning tree
   fileName <- system.file("extdata", "68983.fcs", package="FlowSOM")
   flowSOM.res <- ReadInput(fileName, compensate=TRUE,transform=TRUE,
                            scale=TRUE)
   flowSOM.res <- BuildSOM(flowSOM.res,colsToUse=c(9,12,14:18))
  flowSOM.res <- BuildMST(flowSOM.res)
   
   # Plot cells
   PlotClusters2D(flowSOM.res,1,2,91)

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