getQuantiles: getQuantiles

View source: R/QuantileNorm.R

getQuantilesR Documentation

getQuantiles

Description

getQuantiles

Usage

getQuantiles(
  files,
  channels,
  nQ = 101,
  minCells = 50,
  quantileValues = NULL,
  transformList = NULL,
  labels = NULL,
  selection = NULL,
  verbose = FALSE,
  plot = FALSE,
  ...
)

Arguments

files

Full paths of to the fcs files of the samples

channels

Names of the channels to compute the quantiles for

nQ

Number of quantiles to compute Default = 101, which results in quantiles for every percent of the data. Ignored if quantileValues is given.

minCells

Minimum number of cells required to compute trust-worthy quantiles. Otherwise NA is returned. Default = 50.

quantileValues

Vector of length with values between 0 and 1, giving the percentages at which the quantiles should be computed. If NULL (default), the quantiles will be evenly distributed, including 0 and 1.

transformList

Transformation list to pass to the flowCore transform function

labels

A label for every file, indicating to which group it belongs. If multiple files have the same label, they get aggregated. If NULL, all files are handled separately.

selection

List with indexation vector for every file.

verbose

If TRUE, extra output is printed. Default = FALSE

plot

If TRUE, plots are generated showing all quantiles. Default = FALSE.

...

Additional arguments to pass to read.FCS

Examples

dir <- system.file("extdata", package = "CytoNorm")
files <- list.files(dir, pattern = "fcs$")

ff <- flowCore::read.FCS(file.path(dir, files[1]))
channels <- grep("Di$", flowCore::colnames(ff), value = TRUE)
transformList <- flowCore::transformList(channels,
                                         cytofTransform)

quantiles <- getQuantiles(files = file.path(dir, files),
                          channels = channels,
                          transformList = transformList)

pheatmap::pheatmap(quantiles[[1]],
                   cluster_rows = FALSE,
                   cluster_cols = FALSE,
                   labels_col =
                     paste0(FlowSOM::GetMarkers(ff, colnames(quantiles[[1]])),
                            " (", colnames(quantiles[[1]]), ")"),
                   main = files[1])


saeyslab/CytoNorm documentation built on March 19, 2024, 6:43 p.m.