FlowSOM | R Documentation |
Method to run general FlowSOM workflow. Will scale the data and uses consensus meta-clustering by default.
FlowSOM(
input,
pattern = ".fcs",
compensate = FALSE,
spillover = NULL,
transform = FALSE,
toTransform = NULL,
transformFunction = flowCore::logicleTransform(),
transformList = NULL,
scale = FALSE,
scaled.center = TRUE,
scaled.scale = TRUE,
silent = TRUE,
colsToUse = NULL,
nClus = 10,
maxMeta = NULL,
importance = NULL,
seed = NULL,
...
)
input |
a flowFrame, a flowSet, a matrix with column names 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 the
transformation given in |
toTransform |
column names or indices that need to be transformed.
Will be ignored if |
transformFunction |
Defaults to logicleTransform() |
transformList |
transformList to apply on the samples. |
scale |
logical, does the data needs to be rescaled. Default = FALSE |
scaled.center |
see |
scaled.scale |
see |
silent |
if |
colsToUse |
Markers, channels or indices to use for building the SOM. Default (NULL) is all the columns used to build the FlowSOM object. |
nClus |
Exact number of clusters for meta-clustering. Ignored if maxMeta is specified. Default = 10. |
maxMeta |
Maximum number of clusters to try out for
meta-clustering. If |
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) |
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.
scale
,
ReadInput
,
BuildSOM
,
BuildMST
,
MetaClustering
# 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, flowCore::keyword(ff)[["SPILL"]])
ff <- flowCore::transform(ff,
flowCore::transformList(colnames(flowCore::keyword(ff)[["SPILL"]]),
flowCore::logicleTransform()))
flowSOM.res <- FlowSOM(ff,
scale = TRUE,
colsToUse = c(9, 12, 14:18),
nClus = 10)
# Plot results
PlotStars(flowSOM.res,
backgroundValues = flowSOM.res$metaclustering)
# Get metaclustering per cell
flowSOM.clustering <- GetMetaclusters(flowSOM.res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.