# Read from file
fileName <- system.file("extdata","lymphocytes.fcs",package="FlowSOM")
flowSOM.res <- ReadInput(fileName, compensate=TRUE,transform=TRUE,
scale=TRUE)
# Or read from flowFrame object
ff <- flowCore::read.FCS(fileName)
ff <- flowCore::compensate(ff,ff@description$SPILL)
ff <- flowCore::transform(ff,
flowCore::transformList(colnames(ff@description$SPILL),
flowCore::logicleTransform()))
flowSOM.res <- ReadInput(ff,scale=TRUE)
# Build the self-organizing map and the minimal spanning tree
flowSOM.res <- BuildSOM(flowSOM.res,colsToUse=c(9,12,14:18))
flowSOM.res <- BuildMST(flowSOM.res)
# Apply metaclustering
metacl <- MetaClustering(flowSOM.res$map$codes,
"metaClustering_consensus",max=10)
# Get metaclustering per cell
flowSOM.clustering <- metacl[flowSOM.res$map$mapping[,1]]
Run the code above in your browser using DataLab