getCytoNormQuantiles | R Documentation |
Can be of interest to pass as goal quantiles to a new model.
getCytoNormQuantiles(model, type = "ref")
model |
Model trained with CytoNorm.train |
type |
"ref" for goal quantiles or batch label |
dir <- system.file("extdata", package = "CytoNorm")
files <- list.files(dir, pattern = "fcs$")
data <- data.frame(File = files,
Path = file.path(dir, files),
Type = stringr::str_match(files, "_([12]).fcs")[,2],
Batch = stringr::str_match(files, "PTLG[0-9]*")[,1],
stringsAsFactors = FALSE)
data$Type <- c("1" = "Train", "2" = "Validation")[data$Type]
train_data <- dplyr::filter(data, Type == "Train")
validation_data <- dplyr::filter(data, Type == "Validation")
ff <- flowCore::read.FCS(data$Path[1])
channels <- grep("Di$", flowCore::colnames(ff), value = TRUE)
transformList <- flowCore::transformList(channels,
cytofTransform)
transformList.reverse <- flowCore::transformList(channels,
cytofTransform.reverse)
model <- CytoNorm.train(files = train_data$Path,
labels = train_data$Batch,
channels = channels,
transformList = transformList,
FlowSOM.params = list(nCells = 10000, #1000000
xdim = 10,
ydim = 10,
nClus = 10,
scale = FALSE),
normParams = list(nQ = 99),
seed = 1)
quantiles <- getCytoNormQuantiles(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.