NewData | R Documentation |
Map new data to a FlowSOM grid
NewData(
fsom,
input,
madAllowed = 4,
compensate = NULL,
spillover = NULL,
transform = NULL,
toTransform = NULL,
transformFunction = NULL,
transformList = NULL,
scale = NULL,
scaled.center = NULL,
scaled.scale = NULL,
silent = FALSE
)
fsom |
FlowSOM object |
input |
A flowFrame, a flowSet or an array of paths to files or directories |
madAllowed |
A warning is generated if the distance of the new data points to their closest cluster center is too big. This is computed based on the typical distance of the points from the original dataset assigned to that cluster, the threshold being set to median + madAllowed * MAD. Default is 4. |
compensate |
logical, does the data need to be compensated. If NULL, the same value as in the original FlowSOM call will be used. |
spillover |
spillover matrix to compensate with. If NULL, the same value as in the original FlowSOM call will be used. |
transform |
logical, does the data need to be transformed. If NULL, the same value as in the original FlowSOM call will be used. |
toTransform |
column names or indices that need to be transformed. If NULL, the same value as in the original FlowSOM call will be used. |
transformFunction |
If NULL, the same value as in the original FlowSOM call will be used. |
transformList |
If NULL, the same value as in the original FlowSOM call will be used. |
scale |
Logical, does the data needs to be rescaled. If NULL, the same value as in the original FlowSOM call will be used. |
scaled.center |
See |
scaled.scale |
See |
silent |
Logical. If |
New data is mapped to an existing FlowSOM object. The input is similar to the
ReadInput
function.
A new FlowSOM object is created, with the same grid, but a new
mapping, node sizes and mean values. The same preprocessing steps
(compensation, transformation and scaling) will happen to this file as was
specified in the original FlowSOM call. The scaling parameters from the
original grid will be used.
A new FlowSOM object
FlowSOMSubset
if you want to get a subset of the
current data instead of a new dataset
# Build FlowSom result
fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM")
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[1:1000, ],
scale = TRUE,
colsToUse = c(9, 12, 14:18),
nClus = 10)
# Map new data
fSOM2 <- NewData(flowSOM.res, ff[1001:2000, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.