ProcessGatingML {FlowSOM} | R Documentation

## Process a gatingML file

### Description

Reads a gatingML file using the `flowUtils` library and returns a list with a matrix containing filtering results for each specified gate and a vector with a label for each cell

### Usage

    ProcessGatingML(flowFrame, gatingFile, gateIDs, cellTypes, silent = FALSE)

### Arguments

`flowFrame` | The flowFrame to apply the gating on
`gatingFile` | The gatingML file to read
`gateIDs` | Named vector containing ids to extract from the gatingML file to use in the matrix
`cellTypes` | Cell types to use for labeling the cells. Should be a subset of the names of the gateIDs
`silent` | If FALSE, show messages of which gates are being processed

### Value

This function returns a list in which the first element ("matrix") is a matrix containing filtering results for each specified gate and the second element ("manual") is a vector which assigns a label to each cell

### See Also

`PlotPies`

### Examples

       # Read the flowFrame
       fileName <- system.file("extdata","lymphocytes.fcs",package="FlowSOM")
       ff <- flowCore::read.FCS(fileName)
       ff_c <- flowCore::compensate(ff,flowCore::description(ff)$SPILL)
       flowCore::colnames(ff_c)[8:18] <- paste("Comp-",
                                         flowCore::colnames(ff_c)[8:18],
                                         sep="")

       # Specify the gating file and the gates of interest
       gatingFile <- system.file("extdata","manualGating.xml",
                                 package="FlowSOM")
       gateIDs <- c( "B cells"=8,
                     "ab T cells"=10,
                     "yd T cells"=15,
                     "NK cells"=5,
                     "NKT cells"=6)
       cellTypes <- c("B cells","ab T cells","yd T cells",
                     "NK cells","NKT cells")
       gatingResult <- ProcessGatingML(ff_c, gatingFile, gateIDs, cellTypes)

       # Build a FlowSOM tree
       flowSOM.res <- FlowSOM(ff_c,compensate=FALSE,transform=TRUE,
                             toTransform=8:18,colsToUse=c(9,12,14:18),nClus=10)
       # Plot pies indicating the percentage of cell types present in the nodes
       PlotPies(flowSOM.res[[1]],gatingResult$manual)

[Package FlowSOM version 1.12.0 Index]