flowTrans: Optimizing transformations for flow cytometry data.

Description Usage Arguments Details Value Author(s) References Examples

Description

This is the principal function in the package. The function takes data, a transformation function name, dimension names, and optional preselection parameter as input, and runs the maximum likelihood optimization on the data, performs the transformation, and returns the transformed data together with a list of transformation paramters for each dimension. The optimization is set to maximize the likelihood of the parameters given the data, such that the transformed data is normally distributed. An optional parameter n2f=[T,F] allows an automated preselection of an approximately bivariate normal population via the norm2Filter function. The transformation parameters are then optimized for this preselected region, and finally applied globally to the entire range of data. The optional argument parameters.only=[T,F] specifies whether to return the parameters or the transformed data.

Usage

1
flowTrans(dat, fun, dims, n2f,parameters.only)

Arguments

dat

The data to be transformed, should be a flowFrame object.

fun

A character string naming the transformation function to be applied. Can be one of: mclMultivBiexp, mclMultivBoxCox,mclMultivArcSinh, and mclMultivLinLog. The Multiv series of functions estimate common transformation parameters for all dimensions.

dims

A character vector identifying the dimensions to be transformed.

n2f

An optional TRUE, FALSE value identifying whether the data should be prefiltered with norm2Filter to select a region of the data for which to optimize the transformation. Default is FALSE.

parameters.only

A logical specifying whether to return only the parameters, and not the transformed data. mclMultivArcSinh a, b, c; c=0 mclMultivBiexp a, b, c, d, f, w; f=0 mclMultivBoxCox theta mclMultivLinLog theta

Details

The transformation functions are multivariate, common parameter transformations. The implementation utilizes a look up table to call optimization routines for the different transformations as well as optional flowCore and flowClust transformation implementations to optimize parameters and transform data from a single interface. Parameters are optimized such that the transformed data is multivariate-normal.

Value

if parameters.only = FALSE then:

flowTransResult

A flowTransResult object

If parameters.only=TRUE the returned value will be a vector of common transformation parameters: if mclMultivArcSinh is called, the returned vector will contain a, b, and c=0; if mclMultivBiexp is called, the returned vector will contain a, b, c, d, w; if mclMultivBoxCox is called, the returned vector will contain theta; if mclMultivLinLog is called, the returned vector will contain theta.

Author(s)

Greg Finak <greg.finak@ircm.qc.ca>, Raphael Gottardo <raphael.gottardo@ircm.qc.ca>

References

Finak G, Perez J M, Weng A, Gottardo R. Optimizing Transformations for Flow Cytometry. (Submitted)

Examples

1
2
3
4
5
6
7
data(GvHD)
result <- flowTrans(GvHD[[1]], "mclMultivArcSinh",
          colnames(GvHD[[1]])[1:2], n2f=FALSE, parameters.only=FALSE)
par(mfrow=c(1,2))
contour(GvHD[[1]][,1:2], main="Untransformed FSC vs SSC")
contour(result$result[,1:2], main="Transformed FSC vs SSC")
summary(result)

flowTrans documentation built on Nov. 8, 2020, 8:04 p.m.