transFlowVS: Transform a flowSet by asinh transformation.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/flowVS.R

Description

This function transforms a flowSet by asinh transformation with the cofactors passed on to the function. The optimum cofactors that stabilize within-population variances in different fluorescence channels are estimated beforehand and passed to this function for data transformation.

Usage

1
  transFlowVS(fs, channels, cofactors)

Arguments

fs

A flowSet containing a collection of flow cyometry samples.

channels

A character vector identifying the channels/dimensions to be transformed. If any entry in this vector is not present in the flowSet, the function returns with an error.

cofactors

A numeric vector. cofactors[i] is used with asinh function to transform the column with name specified by channels[i].

Details

This function transforms a flowSet by asinh transformation with selected cofactors. The column with name channels[i] of every flowFrame of the input flowSet is transformed by asinh transformation with cofactors[i]. For example, let z_ij be the ith column of jth flowFrame in the input flowSet fs. Then after transformation z_ij would be converted to asinh(z_ij/cofactors[i]).

For variance stabiilzation, the optimum cofactors that stabilize within-population variances in different fluorescence channels are estimated beforehand and passed to this function for data transformation. Variance stabilizing cofactors can be estimatd by the estParamFlowVS function.

Value

transFlowVS returns a new flowSet with the transformed channels.

Author(s)

Ariful Azad

References

Ariful Azad, Bartek Rajwa, and Alex Pothen (2015), "flowVS: Channel-Specific Variance Stabilization in Flow Cytometry", BMC Bioinformatics, vol 17, pp 1-14, 2016.

See Also

estParamFlowVS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## ------------------------------------------------
## Example 1: Healthy data from flowVS package
## ------------------------------------------------
data(HD)

## identify optimum cofactor for CD3 and CD4 channels (from five samples)
cofactors = estParamFlowVS(HD[1:5],channels=c('CD3','CD4'))
## transform CD3 and CD4 channels in all samples
HD.VS = transFlowVS(HD, c('CD3','CD4'), cofactors)
densityplot(~CD3+CD4, HD.VS, main="Transfromed CD3 and CD4 channels in HD data") 

## ------------------------------------------------
## Example 2: ITN data from flowStats package
## ------------------------------------------------

library(flowStats)
data(ITN)
# identify lymphocytes
ITN.lymphs = fsApply(ITN,lymphs, list("FS"=c(200, 600),"SS"=c(0, 400)), "FSC", "SSC",FALSE)
## identify optimum cofactor for CD3 and CD4 channels (from five samples)
cofactors = estParamFlowVS(ITN.lymphs[1:5],channels=c('CD3', 'CD4'))  
## transform CD3 and CD4 channels in all samples
ITN.VS = transFlowVS(ITN.lymphs, c('CD3','CD4'), cofactors)
densityplot(~CD3+CD4, ITN.VS, main="Transfromed CD3 and CD4 channels in ITN data")  

flowVS documentation built on April 7, 2021, 6 p.m.