PlotMarker: PlotMarker

View source: R/5_plotFunctions.R

PlotMarkerR Documentation

PlotMarker

Description

Plot comparison with other clustering

Usage

PlotMarker(
  fsom,
  marker,
  refMarkers = fsom$map$colsUsed,
  title = GetMarkers(fsom, marker),
  colorPalette = FlowSOM_colors,
  lim = NULL,
  ...
)

Arguments

fsom

FlowSOM object

marker

A vector of markers/channels to plot.

refMarkers

Is used to determine relative scale of the marker that will be plotted. Default are all markers used in the clustering.

title

A vector with custom titles for the plot. Default is the marker name.

colorPalette

Color palette to use. Can be a function or a vector.

lim

Limits for the scale

...

Additional arguments to pass to PlotFlowSOM, e.g. view, backgroundValues, equalNodeSize ...

Details

Plot FlowSOM grid or tree, colored by node values for a specific marker

Value

A ggplot figure is returned in which every cluster is colored according to the MFI value for the specified marker

See Also

PlotStars, PlotVariable

Examples

# Build FlowSOM model
fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM")
flowSOM.res <- FlowSOM(fileName, 
                       compensate = TRUE, transform = TRUE, scale = FALSE,
                       colsToUse = c(9, 12, 14:18),
                       nClus = 10,
                       seed = 1)
# Plot one marker
PlotMarker(flowSOM.res, 
           "CD19")
           
PlotMarker(flowSOM.res, 
           "CD19",
           colorPalette = c("gray", "red"))
           
# Plot all markers
PlotMarker(flowSOM.res,
           c(9, 12, 14:18))

# Use specific limits if the ones from the columns used for clustering
# are not relevant for  your marker of choice
PlotMarker(flowSOM.res, 
           "FSC-A",
            lim = c(55000, 130000))

# Example with additional FlowSOM plotting options
PlotMarker(flowSOM.res, 
           "CD19",
           view = "grid",
           equalNodeSize = TRUE,
           backgroundValues = 1:100 == 27,
           backgroundColors = c("white", "red"))
           
           

SofieVG/FlowSOM documentation built on Feb. 1, 2024, 11:33 a.m.