TestOutliers {FlowSOM} | R Documentation

## TestOutliers

### Description

Test if any cells are too far from their cluster centers

### Usage

    TestOutliers(fsom, madAllowed = 4, fsomReference = NULL, plotFile = NULL)

### Arguments

`fsom` | FlowSOM object
`madAllowed` | Number of median absolute deviations allowed. Default = 4.
`fsomReference` | FlowSOM object to use as reference. If NULL (default), the original fsom object is used.
`plotFile` | If `NULL` (default), no plot will be created. If a filepath is given for a pdf, the plot will be written in the corresponding file

### Details

For every cluster, the distance from the cells to the cluster centers is used to label cells which deviate too far as outliers. The threshold is chosen as the median distance + `madAllowed` times the median absolute deviation of the distances.

### Value

A new FlowSOM object

### See Also

`FlowSOMSubset` if you want to get a subset of the current data instead of a new dataset

### Examples

     # Build FlowSom result
     fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM")
     ff <- flowCore::read.FCS(fileName)
     flowSOM.res <- FlowSOM(ff,
                            compensate = TRUE, transform = TRUE, scale = TRUE,
                            colsToUse = c(9, 12, 14:18),
                            maxMeta = 10)

     # Map new data
     outlier_report <- TestOutliers(flowSOM.res)

[Package FlowSOM version 2.2.0 Index]