batchNorm: Batch normalisation

Description Usage Arguments Value

View source: R/batchNorm.R

Description

This function is intended to be used, when files from the same individual has been acquired on multiple time points, and the files from the different time points should be compared. The function works most optimally if all the data came from a sample that was processed and frozen the same day, i.e. a true technical control, but it also works reasonably well with data from the same donor from different time points, as it is robust to outlier populations changing between the dates. It is not recommended to apply this function to files with less than 5000 events.

Usage

1
2
3
batchNorm(normSet, intCtrlFrame, batchNormCtrlFile,
  normNames = colnames(intCtrlFrame), exclColNmStr = c("ime"),
  volThresh = 0.05, lowVertThresh = 0.25, transCoFacs = "default")

Arguments

normSet

A flowSet that should be normalized. If the intCtrl should be normalized and used downstream, it needs to be included here.

batchNormCtrlFile

A file generated with the batchNormCtrlSetup function, using an universal external control.

normNames

The variables that should be normalized. Default is all that do not fall into one of the two excl categories below.

exclColNmStr

A vector of strings that are not accepted in any normNames.

volThresh

Defining how small the smaller of the two peaks can be to be considered a true peak. It is a fraction of the volume of the larger peak. Default is 0.05, i.e. if the volume of the second peak is 5 percent or larger than the volume of the first peak, it is considered a peak.

lowVertThresh

Defining how low the turnpoint needs to be between the peaks for these to be considered well-separated. 25 percent of the lower peak is the default.

transCoFacs

This vector of named values define the values for the transformation during the normalization. This is only applied internally, so transformation needs to be performed afterwards, preferrably with individual values for each channel. In the "default" case, the function defines the file as a CyTOF file, and applies the transformation value 8, if >5 percent of the values are 0. Otherwise, the value 256 is applied. NB. The entries need to be named in the same way as the normNames to secure that the right factor is added to each variable.

intCtrl

A control flowFrame that was acquired the same day as the normSet.

exclCategorical

Logical: should normNames with less than 10 unique values be excluded? Defaults to TRUE.

Value

The normSet normalized. If the intCtrl was not among the normSet files, it will be added as the final object to the list.


jtheorell/theFlowSpec documentation built on Aug. 22, 2019, 3:33 a.m.