FlowSOM: Run the FlowSOM algorithm

Description Usage Arguments Value See Also Examples

View source: R/0_FlowSOM.R

Description

Method to run general FlowSOM workflow. Will scale the data and uses consensus meta-clustering by default.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
FlowSOM(
  input,
  pattern = ".fcs",
  compensate = FALSE,
  spillover = NULL,
  transform = FALSE,
  toTransform = NULL,
  transformFunction = flowCore::logicleTransform(),
  scale = TRUE,
  scaled.center = TRUE,
  scaled.scale = TRUE,
  silent = TRUE,
  colsToUse,
  nClus = NULL,
  maxMeta,
  importance = NULL,
  seed = NULL,
  ...
)

Arguments

input

a flowFrame, a flowSet or an array of paths to files or directories

pattern

if input is an array of file- or directorynames, select only files containing pattern

compensate

logical, does the data need to be compensated

spillover

spillover matrix to compensate with If NULL and compensate=TRUE, we will look for $SPILL description in fcs file.

transform

logical, does the data need to be transformed with a logicle transform

toTransform

column names or indices that need to be transformed. If NULL and transform = TRUE, column names of $SPILL description in fcs file will be used.

transformFunction

Defaults to logicleTransform()

scale

logical, does the data needs to be rescaled

scaled.center

see scale

scaled.scale

see scale

silent

if TRUE, no progress updates will be printed

colsToUse

column names or indices to use for building the SOM

nClus

Exact number of clusters for meta-clustering. If NULL, several options will be tried (1:maxMeta)

maxMeta

Maximum number of clusters to try out for meta-clustering. Ignored if nClus is specified

importance

array with numeric values. Parameters will be scaled according to importance

seed

Set a seed for reproducible results

...

options to pass on to the SOM function (xdim, ydim, rlen, mst, alpha, radius, init, distf)

Value

A list with two items: the first is the flowSOM object containing all information (see the vignette for more detailed information about this object), the second is the metaclustering of the nodes of the grid. This is a wrapper function for ReadInput, BuildSOM, BuildMST and MetaClustering. Executing them separately may provide more options.

See Also

scale,ReadInput,BuildSOM, BuildMST,MetaClustering

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Read from file
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)
# Or read from flowFrame object
ff <- flowCore::read.FCS(fileName)
ff <- flowCore::compensate(ff,ff@description$SPILL)
ff <- flowCore::transform(ff,
         flowCore::transformList(colnames(ff@description$SPILL),
                                flowCore::logicleTransform()))
flowSOM.res <- FlowSOM(ff,scale=TRUE,colsToUse=c(9,12,14:18),nClus=10)

# Plot results
PlotStars(flowSOM.res$FlowSOM,
          backgroundValues = flowSOM.res$metaclustering)

# Get metaclustering per cell
flowSOM.clustering <- GetMetaclusters(flowSOM.res)

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