CountGroups | R Documentation |
Calculate differences in cell counts between groups
CountGroups(fsom, groups, plot = TRUE, silent = FALSE)
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 |
Distance matrix
GroupStats
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")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.