Package 'flowTrans'

Title: Parameter Optimization for Flow Cytometry Data Transformation
Description: Profile maximum likelihood estimation of parameters for flow cytometry data transformations.
Authors: Greg Finak <[email protected]>, Juan Manuel-Perez <[email protected]>, Raphael Gottardo <[email protected]>
Maintainer: Greg Finak <[email protected]>
License: Artistic-2.0
Version: 1.59.0
Built: 2024-11-05 06:14:38 UTC
Source: https://github.com/bioc/flowTrans

Help Index


Parameter Optimization for Flow Cytometry Data Transformation

Description

Maximum likelihood estimation of parameters for common flow cytometry data transformations.

Details

Package: flowTrans
Type: Package
Version: 0.6.0
Date: 2010-03-25
License: Artistic-2.0
LazyLoad: yes
biocViews: Bioinformatics, FlowCytometry
Depends: flowCore, methods
Imports: flowCore, methods, stats, flowViz, flowClust
Collate: logicleTransformWrapper.R mclMultivArcSinh.R mclMultivBiexp.R mclMultivLinLog.R mclMultivBoxCox.R arcsinhTransformWrapper.R biexponentialTransformWrapper.R boxcoxTransform.R flowTrans.R linLog.R
Packaged: 2010-03-25 16:49:03 UTC; finak
Built: R 2.10.0; ; 2009-11-30 16:49:05 UTC; unix

Index:

flowTrans               Optimizing transformations for flow cytometry
                        data

Author(s)

Greg Finak <[email protected]>, Juan Manuel-Perez <[email protected]>, Raphael Gottardo <[email protected]>

Maintainer: Greg Finak <[email protected]>

References

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

Examples

#Load some data
data(GvHD)
#transform the first sample, forward and side scatter.
result<-flowTrans(GvHD[[1]],"mclMultivArcSinh",colnames(GvHD[[1]])[1:2],n2f=FALSE,parameters.only=FALSE);
plot(result$result);
summary(result);

Extract the transformation parameters from a flowTransResult

Description

Extracts the transformation parameters from a flowTransResult object

Usage

extractParams(x, dims = NULL)

Arguments

x

An object of type flowTransResult returned by a call to flowTrans

dims

A character vector specifying the dimensions for which to extract transformation parameters.

Value

A list of length length(dims). Each element contains a vector of parameters for transforming the particular dimension.The names of the list elements correspond to the names of the dimensions.

Note

flowTrans estimates common transformation parameters.

Author(s)

Greg Finak <[email protected]>, Raphael Gottardo <[email protected]>

References

Finak G, Perez JM, Weng A, Gottardo R. Optimizing Data Transformation for Flow Cytometry. (Submitted)

See Also

summary, flowTrans, flowTransResult

Examples

m <- t(matrix(rnorm(10000),2))
colnames(m) <- c("A","B")
m <- flowFrame(m)
res <- flowTrans(m,"mclMultivBoxCox", c("A","B"), n2f=FALSE,
                 parameters.only=FALSE)
summary(res)
extractParams(res)

Optimizing transformations for flow cytometry data.

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

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 <[email protected]>, Raphael Gottardo <[email protected]>

References

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

Examples

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)

S4 method for optimizing parameters of a flow transformation and optionally transforming a flowFrame

Description

Transforms a flowFrame and optimizes the parameters for the selected transformation.

Methods

dat = "flowFrame", fun = "character", dims = "character", n2f = "logical", parameters.only = "logical"

Transforms the flowFrame using the function fun over the dimensions dims, with optional bivaraite normal prefiltering. Parameters are optimized to make the transformed data multivariate normal depending on the selected transformation


Class "flowTransResult"

Description

Class that contains the results of a call to flowTrans on a flowFrame

Objects from the Class

Objects can be created by calls of the form new("flowTransResult", ...). The object contains three slots: the transformed flowFrame, a transform object from which the parameters can be extracted, and a dims slot containing a character vector of the dimensions that have been transformed.

Slots

result:

Object of class "flowFrame". The transformed data.

trans:

Object of class "transform". The transform applied to the flowFrame. Parameters can be extracted via summary(trans).

dims:

Object of class "character". The names of the dimensions that have been transformed.

Methods

summary

signature(object = "flowTransResult"): Summarize the transformed data.

Author(s)

Greg Finak <[email protected]>, Raphael Gottardo <[email protected]>.

References

Finak G, Perez JM, Weng A, Gottardo R. Optimizing Data Transformation for Flow Cytometry.

See Also

extractParams summary

Examples

m <- t(matrix(rnorm(10000),2))
colnames(m) <- c("A","B")
m <- flowFrame(m)
res <- flowTrans(m,"mclMultivBoxCox", c("A","B"),
                 n2f=FALSE, parameters.only=FALSE)
summary(res)
extractParams(res)

Summarize a flowTransResult object

Description

Print a summary of the contents of a flowTransResult object.

Methods

object = "flowTransResult"

Prints a summary of the flowTransResult object


Summarize a flowTransResult object

Description

Print a summary of the contents of a flowTransResult object, including the type of transformation, the transformed data frame, and the transformed dimensions and transformation parameters.

Usage

summary.flowTransResult(object, ...)

Arguments

object

An object of flowTransResult returned by a call to flowTrans

...

Additional parameters passed through.

Value

No return value

Author(s)

Greg Finak <[email protected]>, Raphael Gottardo <[email protected]>

References

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

See Also

extractParams, flowTransResult

Examples

m <- t(matrix(rnorm(10000),2))
colnames(m) <- c("A","B")
m <- flowFrame(m)
res <- flowTrans(m, "mclMultivBoxCox", c("A","B"),
                 n2f=FALSE, parameters.only=FALSE)
summary(res)