GetFeatures {FlowSOM} | R Documentation

## GetFeatures

### Description

Map fcs files on an existing FlowSOM object

### Usage

    GetFeatures(
      fsom,
      files,
      level = c("clusters", "metaclusters"),
      type = "counts",
      MFI = NULL,
      filenames = NULL,
      silent = FALSE
    )

### Arguments

`fsom` | FlowSOM object as generated by the FlowSOM function or the BuildSOM function
`files` | Either a vector of fcs files or paths to fcs files
`level` | Level(s) of interest. Default is c("clusters", "metaclusters"), but can also be only one of them
`type` | Type of features to extract. Default is "counts", can be a vector of "counts", "percentages" and/or "MFIs"
`MFI` | Vector with channels / markers for which the MFI values must be returned when "MFIs" is in `type`
`filenames` | An optional vector with filenames that will be used as rownames in the count matrices. If NULL (default) either the paths will be used or a numerical vector.
`silent` | Logical. If `TRUE`, print progress messages. Default = `FALSE`.

### Value

matrix with features per population - type combination

### Examples

     # 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
     counts <- GetFeatures(fsom = flowSOM.res,
                           level = "clusters",
                           files = c(ff[1001:2000, ], ff[2001:3000, ]))
     features <- GetFeatures(fsom = flowSOM.res,
                             files = c(ff[1001:2000, ], ff[2001:3000, ]),
                             type = c("counts", "percentages", "MFIs"),
                             MFI = "APC-A",
                             filenames = c("ff_1001-2000", "ff_2001-3000"))

[Package FlowSOM version 2.2.0 Index]