transFlowVS {flowVS} | R Documentation

## Transform a flowSet by asinh transformation.

### 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

      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 `i`th column of `j`th 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

    ## ------------------------------------------------
    ## 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")

[Package flowVS version 1.24.0 Index]