Learn R Programming

FlowSOM (version 1.4.0)

FlowSOM: Run the FlowSOM algorithm

Description

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

Usage

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, ...)

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
...
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

Run this code
# Read from file
fileName <- system.file("extdata","lymphocytes.fcs",package="FlowSOM")
flowSOM.res <- FlowSOM(fileName, compensate=TRUE,transform=TRUE,
                      scale=TRUE,colsToUse=c(9,12,14:18),maxMeta=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),maxMeta=10)

# Plot results
PlotStars(flowSOM.res[[1]])

# Get metaclustering per cell
flowSOM.clustering <- flowSOM.res[[2]][flowSOM.res[[1]]$map$mapping[,1]]



Run the code above in your browser using DataLab