R: Plate-wise data normalization, and data transformation
normalizePlates
R Documentation
Plate-wise data normalization, and data transformation
Description
Normalization of the data xraw in a cellHTS object.
This is done separately for each plate, replicate and channel.
Optionally, a data transformation such as log, and a
transformation to z-scores can be performed.
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.
...
Further arguments that get passed on to the function implementing the normalization method chosen by normalizationMethod. Currently, this is only used for Bscore.
Details
The normalization is performed in a plate-by-plate fashion.
If normalizationMethod="median" (median scaling), plates effects are corrected by dividing each measurement by the median value across wells annotated as sample in x$wellAnno, for each plate and replicate.
If normalizationMethod="mean" (mean scaling), the average in the sample wells is consider instead.
If normalizationMethod="shorth" (scaling by the midpoint of the shorth), for each plate and replicate, the midpoint of the shorth of the distribution of values in the wells annotated
as sample is calculated. Then, every measurement is divided by this value.
If normalizationMethod="POC" (percent of control), for each plate and replicate, each measurement is divided by the average of the measurements on the plate positive controls, and multiplied by 100.
If normalizationMethod="negatives" (scaling by the negative controls), for each plate and replicate, each measurement is divided by the median of the measurements on the plate negative controls.
If normalizationMethod="NPI" (normalized percent inhibition), each measurement is subtracted from the average of the intensities on the plate positive controls, and this result is divided by the difference between
the means of the measurements on the positive and the negative controls.
If normalizationMethod="Bscore" (B score), for each plate and replicate, the B score method is applied to remove plate effects and row and column biases. NOTE: if the argument 'transform' is given, the B score method is applied AFTER data transformation.
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 have 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 annotate 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
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.
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.
Additional outputs may be given if
adjustPlates="Bscore". Please refer to the help page of
the Bscore function.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(cellHTS)
Loading required package: grid
Warning message:
Package 'cellHTS' is deprecated and will be removed from Bioconductor
version 3.4. Please consider using 'cellHTS2' which offers better
functionality for working with multiple screens and with
multi-channel screens.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/cellHTS/normalizePlates.Rd_%03d_medium.png", width=480, height=480)
> ### Name: normalizePlates
> ### Title: Plate-wise data normalization, and data transformation
> ### Aliases: normalizePlates 'plate effects'
> ### Keywords: manip
>
> ### ** Examples
>
> data(KcViabSmall)
> x1 = normalizePlates(KcViabSmall, normalizationMethod="median", zscore="-")
> ## Not run:
> ##D x2 = normalizePlates(KcViabSmall, normalizationMethod="Bscore", zscore="-")
> ##D
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>