normalizePlates: Per-plate data transformation, normalization and variance...

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

View source: R/normalizePlates.R

Description

Plate-by-plate normalization of the raw data stored in slot assayData of a cellHTS object. Normalization is performed separately for each plate, replicate and channel. Log2 data transformation can be performed and variance adjustment can be performed in different ways (none, per-plate, per-batch or per-experiment).

Usage

1
normalizePlates(object,  scale="additive", log=FALSE, method="median", varianceAdjust="none", posControls, negControls,...)

Arguments

object

a cellHTS object that has already been configured. See details.

scale

a character specifying the scale that the input data are considered to be on: "additive" scale (default) or "multiplicative". The interpretation of this terminology is that data on an additive scale will be normalised by subtraction of a correction offset, whereas data on a multiplicative scale are normalised by division through a correction factor.

log

logical. If TRUE, data will first be log2 transformed. If data are on an additive scale (i.e. if scale is "additive"), then log is only allowed to be FALSE. The default is log=FALSE.

method

character specifying the normalization method to use for the per-plate normalization. Allowed values are "median" (the default), "mean", "shorth", "POC", "NPI", "negatives", Bscore and "locfit". See details.

varianceAdjust

character specifying the variance adjustment to perform. Allowed values are "none" (the default), code"byPlate", "byBatch" and "byExperiment". 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.

...

Further arguments that get passed on to the function implementing the normalization method chosen by method. Currently, this is only used for Bscore and locfit.

Details

The function normalizePlates uses the content of the assayData slot of object. For dual-channel data, a recommended workflow is (i) to correct for plate effects using the normalizePlates function, (ii) combine the two channels using the function summarizeChannels, and (iii) finally, if necessary, normalize the summarized intensities calling normalizePlates again.

In this function, the normalization is performed in a plate-by-plate fashion, following this workflow:

  1. Log transformation of the data (optional)

  2. Per-plate normalization

  3. Variance adjustment of the plate intensity corrected data (optional)

The argument scale defines the scale of the data. If the data are on a multiplicative scale (scale="multiplicative"), the data can be log2 transformed by setting log=TRUE. This then changes the scale of the data to code"additive".

In the next step of preprocessing, intensities are corrected in a plate-by-plate basis using the chosen normalization method:

Depending on the scale of the data prior to normalization, the data are divided by the above defined correction factors (scale: "multiplicative"), or the value is subtracted (scale: "additive").

Further available normalization methods are:

In the final preprocessing step, variance of plate-corrected intensities can be adjusted as follows:

By default, no variance adjustment is performed (varianceAdjust="none").

The arguments posControls and negControls are required for applying the normalization methods based on the control measurements that is, when method="POC", or method="NPI", or method="negatives"). posControls and negControls should be vectors of regular expression patterns specifying the name of the positive(s) and negative(s) controls, respectivey, as provided in the plate configuration file (and accessed via wellAnno(object)). The length of these vectors should be equal to the current number of channels in object (i.e. to the dim(Data(object))[3]). 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 annotate the negative controls. The content of posControls and negControls will be passed to regexpr for pattern matching within the well annotation given in the featureData slot of object (which can be accessed via wellAnno(object)) (see examples for summarizeChannels). The arguments posControls and negControls are particularly useful in multi-channel data since the controls might be reporter-specific, or after normalizing multi-channel data.

See the Examples section for an example on how this function can be used to apply a robust version of the Z score method, whereby, for each plate and replicate, the per-plate median (computed only from sample wells) is subtracted from the measurements, and the result is divided by the per-plate MAD (only from sample wells).

Value

An object of class cellHTS with the normalized data stored in slot assayData (its previous contents were overridden). The processing status of the object is updated in the slot state to [email protected][["normalized"]]=TRUE.

Additional slots of object may be updated if method="Bscore" or method="locfit" are used. Please refer to the help page of the Bscore function and spatialNormalization functions.

Author(s)

Ligia Bras [email protected], Wolfgang Huber [email protected]

References

Boutros, M., Bras, L.P. and Huber, W. (2006) Analysis of cell-based RNAi screens, Genome Biology 7, R66.

See Also

Bscore, spatialNormalization, summarizeChannels

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
25
26
27
28
29
30
31
32
    data(KcViabSmall)
    # per-plate median scaling of intensities
    x1 <- normalizePlates(KcViabSmall, scale="multiplicative", log=FALSE, method="median", varianceAdjust="none")
    # per-plate median subtraction of log2 transformed intensities  
    x2 <- normalizePlates(KcViabSmall, scale="multiplicative", log=TRUE, method="median", varianceAdjust="none")
    ## Not run: 
    x3 <- normalizePlates(KcViabSmall, scale="multiplicative", log=TRUE, method="Bscore", varianceAdjust="none", save.model=TRUE)
    
## End(Not run)


    ## robust Z score method (plate intensities are subtracted by the per-plate median on sample wells and divided by the per-plate MAD on sample wells):
    xZ <- normalizePlates(KcViabSmall, scale="additive", log=FALSE, method="median", varianceAdjust="byPlate")

    ## an example to illustrate the use of slot 'batch':
   ## Not run: 
   try(xnorm <- normalizePlates(KcViabSmall, scale="multiplicative", method="median", varianceAdjust="byBatch"))
   
   # It doesn't work because we need to have slot 'batch'!
   # For example, we will suppose that a different lot of reagents was used for plate 1:
   pp <- plate(KcViabSmall)
   fData(KcViabSmall)$"reagent" <- "lot B"
   fData(KcViabSmall)$"reagent"[pp==1] <- "lot A"
   fvarMetadata(KcViabSmall)["reagent",] <- "Lot of reagent used"

   bb <- as.factor(fData(KcViabSmall)$"reagent")
   batch(KcViabSmall) <- array(as.integer(bb), dim=dim(Data(KcViabSmall)))
   ## check number of batches:
   nbatch(KcViabSmall)
   x1 <- normalizePlates(KcViabSmall, scale="multiplicative", log = FALSE, method="median", varianceAdjust="byBatch")

## End(Not run)

cellHTS2 documentation built on Nov. 17, 2017, 1:30 p.m.