glog_transformation: Variance stabilising generalised logarithm (glog)...

View source: R/glog_transformation.R

glog_transformationR Documentation

Variance stabilising generalised logarithm (glog) transformation

Description

Performs glog transformation on the data set. QC samples can be used to estimate technical variation in the data set and calculate transformation parameter \lambda (lambda). QC samples usually comprise a pool of aliquots taken from all other samples in the study and analysed repeatedly throughout an analytical batch.

Usage

glog_transformation(df, classes, qc_label, lambda = NULL)

Arguments

df

A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class numeric() or integer() of peak intensities, areas or other quantitative characteristic.

classes

character(), vector of class labels. Must be the same length as the number of sample in the input peak table. If input is SummarizedExperiment object, use SummarizedExperiment_object$meta_data_column_name.

qc_label

character(1) or NULL, class label used to identify QC samples.

lambda

NULL or numeric(1), if not NULL will use provided value for glog lambda.

Details

Many univariate and multivariate statistical tests require homogeneity and n ormality of dataset variance. Real-world metabolomics datasets often fail to meet these criteria due to asymmetric (i.e. non-'normal') and/or heteroscedatic (i.e. non-homogenous) variance structure. To address this issue, glog data transformations may be applied.
For each cell within the data matrix, transform the raw value (x) according to: log10(x + sqrt(x^2 + \lambda)). The parameter \lambda is typically calculated using quality control (QC) samples analysed throughout an analysis batch.

Value

Object of class SummarizedExperiment. If input data are a matrix-like (e.g. an ordinary matrix, a data frame) object, function returns the same R data structure as input with all value of data type numeric().

References

Parsons HM et. al., BMC Bionf., 8(234), 2007. https://doi.org/10.1186/1471-2105-8-234

Examples

df <- MTBLS79[, MTBLS79$Batch == 1]
out <- mv_imputation(df=df, method="knn")
out <- glog_transformation (df=out, classes=df$Class,
    qc_label="QC")


computational-metabolomics/pmp documentation built on March 9, 2024, 4:25 p.m.