normalizePlates {cellHTS}R Documentation

Plate-wise data normalization, and data transformation

Description

Per-plate normalization of the data xraw of a cellHTS object. Optionally, a data transformation such as log, and a transformation to z-scores can be performed.

Usage

normalizePlates(x, normalizationMethod="median", transform, zscore, posControls, negControls, BscoreArgs)

Arguments

x a cellHTS object that has already been configured. See details.
normalizationMethod a character specifying the normalization method to use for performing the per-plate normalization. Allowed values are "median" (default), "mean", "shorth", "POC", "NPI", "negatives" and "Bscore". See details.
transform a function that takes a numeric vector and returns a numeric vector of the same length; for example, the logarithm function log.
zscore indicates if the data should be centered and scaled after normalization and transformation. If missing (default), the data will not be centered and scaled. Otherwise, the value of this argument should be a character string, either "+" or "-", which will be used to set the sign for the calculated z-scores. See details.
posControls a vector of regular expressions giving the name of the positive control(s). See details.
negControls a vector of regular expressions giving the name of the negative control(s). See details.
BscoreArgs a list with parameters for the function that performs B score normalization. See details.

Details

The normalization is performed in a per-plate fashion.

If transform is not missing, the chosen data transformation is applied. Most commonly, this option can be used to apply a log transformation.

If zscore is not missing, a robust z-score for each individual measurement will be determined for each plate and each well by subtracting the overall median and dividing by the overall mad. These are taken by considering the distribution of intensities (over all plates) in the wells whose content is annotated as sample. The allowed values for zscore ("+" or "-") are used to set the sign of the calculated z-scores. For example, with a zscore="-" a strong decrease in the signal will be represented by a positive z-score, whereas setting zscore="+", such a phenotype will be represented by a negative z-score. This option can be set to calculate the results to the commonly used convention.

The arguments posControls and negControls are required for applying the normalization methods based on the control measurements (that is, when normalizationMethod="POC", or normalizationMethod="NPI", or normalizationMethod="negatives"). posControls and negControls should be given as a vector of regular expression patterns specifying the name of the positive(s) and negative(s) controls, respectivey, as provided in the plate configuration file (and stored in x$wellAnno). The length of these vectors should be equal to the number of reporters used in the screen (dim(x$xraw)[4]) or to dim(x$xnorm)[4], in case x contains multi-channel data that has been normalized by combining the values from two or more channels. By default, if posControls is not given, "pos" will be taken as the name for the wells containing positive controls. Similarly, if negControls is missing, by default "neg" will be considered as the name used to annotated the negative controls. The content of posControls and negControls will be passed to regexpr for pattern matching within the well annotation given in x$wellAnno (see examples for normalizeChannels).

The following elements are recognized for BscoreArgs and passed on to Bscore: adjustPlateMedian, a logical value indicating whether the estimated average of each plate should also be substracted to the raw intensity values, model.log, a logical value. If TRUE, the per-plate models will be applied after log2 transformation. However, the outputs of Bscore function will be given in the original scale, scale, a logical value indicating if the per-plate model residuals should be further scaled by their variance, save.model, a logical value specifying whether the per-plate models should be saved, and given as output.

Value

An object of class cellHTS, which is a copy of the argument x, plus an additional slot xnorm containing the normalized data. This is an array of the same dimensions as xraw.
Moreover, the processing status of the cellHTS object is updated in the slot state to x$state["normalized"]=TRUE.
Furthermore, if normalizationMethod="Bscore", and save.model=TRUE was given in BscoreArgs, the slots residuals, rowcol.effects, and overall.effects (only if adjustPlateMedian was also set to TRUE in BscoreArgs) are added to x. The latter slots are arrays with the same dimension as x$xraw, except the overall.effects, which have dimensions 1 x nr Plates x nr Replicates x nr Channels.

Author(s)

Ligia Braz ligia@ebi.ac.uk, Wolfgang Huber huber@ebi.ac.uk

Examples

    data(KcViabSmall)
    x1 = normalizePlates(KcViabSmall, normalizationMethod="median", zscore="-")
    ## Not run: 
    x2 = normalizePlates(KcViabSmall, normalizationMethod="Bscore", zscore="-")
    
## End(Not run)

[Package cellHTS version 1.4.0 Index]