Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs normalization for sample loading after quantification.
It is typically invoked as part of the process of creating summary
information from an RPPASet
object.
1 2 3 4 5 6 | ## S4 method for signature 'MatrixLike'
normalize(object,
method=getRegisteredNormalizationMethodKeys(),
calc.medians=TRUE,
sweep.cols=calc.medians,
...)
|
object |
data frame or matrix to be normalized |
method |
character string specifying name of method of sample loading normalization (see section ‘Details’ below) |
calc.medians |
logical scalar. If |
sweep.cols |
logical scalar. If |
... |
extra arguments for normalization routines |
By default, column medians are subtracted from the input data values; these adjusted data values are then passed to the requested normalization routine for further processing.
The method
argument may be augmented with user-provided normalization
methods. Package-provided values are:
medpolish | Tukey's median polish normalization |
median | sample median normalization |
house | housekeeping normalization |
vs | variable slope normalization |
Specifying “median” as the method
argument causes the row
median to be subtracted from each sample. Specifying “house” causes
the median of one or more housekeeping antibodies to be used. The names of
the antibodies to be used must be supplied as a named argument to this
method. Specifying “vs” causes the sample median to be used along
with a multiplicative gamma (see reference below).
Returns normalized concentrations as matrix appropriately annotated.
P. Roebuck proebuck@mdanderson.org, E. Shannon Neeley sneeley@stat.byu.edu
Neeley ES, Kornblau SM, Coombes KR, Baggerly KA.
Variable slope normalization of reverse phase protein arrays
Bioinformatics (2009) 25(11): 1384-1389.
https://academic.oup.com/bioinformatics/article/25/11/1384/331482/Variable-slope-normalization-of-reverse-phase
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 33 34 35 36 37 38 39 | antibodies <- c("FOO", "BAR", "PLUGH", "WALDO")
concs <- matrix(rnorm(1024),
ncol=length(antibodies),
dimnames=list(samples=NULL, antibodies=antibodies))
## Normalize using sample median
normconcs <- normalize(concs, method="median")
str(normconcs)
## Normalize using housekeeping antibodies
normconcs <- normalize(concs, method="house", antibodies=c("FOO", "PLUGH"))
str(normconcs)
## Normalize using variable slope
normconcs <- normalize(concs, method="vs")
str(normconcs)
## Normalize using Tukey's median polish (previous default method)
normconcs <- normalize(concs, method="medpolish", calc.medians=FALSE)
str(normconcs)
## Normalize using user-provided method (in this case, robust sample mean)
normalize.robustmean <- function(concs, trim=0, na.rm=FALSE) {
stopifnot(is.matrix(concs) || is.data.frame(concs))
stopifnot(is.numeric(trim))
stopifnot(is.logical(na.rm))
rowMean <- apply(concs, 1, mean, trim=trim, na.rm=na.rm)
normconcs <- sweep(concs, 1, rowMean, FUN="-")
## Store method-specific info in "normalization" attribute
attr(normconcs, "normalization") <- list(rowMean=rowMean)
normconcs
}
registerNormalizationMethod("rmean", normalize.robustmean)
normconcs <- normalize(concs, method="rmean", trim=0.1, na.rm=TRUE)
str(normconcs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.