Description Usage Arguments Details Value Author(s) References See Also Examples
Normalise a metabolomic data matrix according to a specified scaling method.
1 2 |
featuredata |
featuredata A data frame in the featuredata format. This is a dataframe with metabolites in columns and samples in rows. Unique sample names should be provided as row names. |
method |
A character string indicating the required scaling-based normalization
method. Must be one of " |
refvec |
A reference vector to be used with the method " |
saveoutput |
A logical indicating whether the normalised data matrix should be saved as a .csv file. |
outputname |
The name of the output file if the output has to be saved. |
... |
Arguments to other functions |
The normalisation methods based on scaling include normalisation to a total
sum, or by the median or mean of each sample, and are denoted by
"sum
", "median
", and "mean
" respectively. The method
"ref
" normalises the metabolite abundances to a specified reference
vector.
The result is an object of class
alldata
.
Alysha M De Livera, Gavriel Olshansky
De Livera, Alysha M De, M. Aho-Sysi, Laurent Jacob, J. Gagnon-Bartch, Sandra Castillo, J.A. Simpson, and Terence P. Speed. 2015. Statistical Methods for Handling Unwanted Variation in Metabolomics Data. Analytical Chemistry 87 (7). American Chemical Society: 3606-3615.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Reading the data
data(mixdata)
featuredata <- mixdata$featuredata
sampledata<-mixdata$sampledata
metabolitedata<-mixdata$metabolitedata
refvec<-featuredata[,which(metabolitedata$type =="IS")[1]]
## Normalise by the median
norm_med <- NormScaling(featuredata, method = "median")
## Normalise by a reference vector, in this case an internal standard
norm_is <- NormScaling(featuredata, method = "ref",
refvec=refvec)
## Normalise by the sum
norm_sum <- NormScaling(featuredata, method = "sum")
## Rla Plots after normalising by the median
RlaPlots(norm_med$featuredata, group= sampledata$batch)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.