CountGroups {FlowSOM} | R Documentation

## Calculate differences in cell counts between groups

### Description

Calculate differences in cell counts between groups

### Usage

    CountGroups(fsom, groups, plot = TRUE, silent = FALSE)

### Arguments

`fsom` | FlowSOM object as generated by BuildSOM
`groups` | List containing an array with file names for each group
`plot` | Logical. If TRUE, make a starplot of each individual file
`silent` | Logical. If TRUE, print progress messages

### Value

Distance matrix

### See Also

Groupstats

### Examples

    set.seed(1)
    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)

    ff <- flowCore::read.FCS(fileName)
    # Make an additional file without cluster 7 and double amount of cluster 5
    selection <- c(which(GetClusters(flowSOM.res) %in%
                                     which(flowSOM.res$metaclustering != 7)),
                     which(GetClusters(flowSOM.res) %in%
                                     which(flowSOM.res$metaclustering == 5)))
    ff_tmp <- ff[selection,]
    flowCore::write.FCS(ff_tmp, file="ff_tmp.fcs")

    # Compare only the file with the double amount of cluster 10
    features <- GetFeatures(flowSOM.res,
                            c(fileName, "ff_tmp.fcs"),
                            level = "clusters",
                            type = "percentages")
    stats <- GroupStats(features$cluster_percentages,
                        groups = list("AllCells" = c(fileName),
                                      "Without_ydTcells" = c("ff_tmp.fcs")))

[Package FlowSOM version 2.2.0 Index]