Learn R Programming

MAIT (version 1.6.0)

peakAggregation: Performs a peak aggregation procedure to the rawData of a MAIT object

Description

peakAggregation function applies a peak aggregation technique to the data of a MAIT-class object. Several aggregation techniques are available (see methods below).

Usage

peakAggregation(MAIT.object=NULL, method="None", clases=NULL, samples=NULL, PCAscale=FALSE, PCAcenter=FALSE, scale=FALSE, signVariables=NULL, RemoveOnePeakSpectra=FALSE, printCSVfile=TRUE)

Arguments

MAIT.object
A MAIT-class object where function peakAnnotation has already been applied. The output of the function is going to be an update of the same MAIT-class object.
method
Chosen method to perform the dimensionality reduction using the non-free pagR package: - If it is set to "None", no reduction is performed and the spectral peaks are taken as variables. This is the default method. - If it is set to "Mean", the intensity mean value over each sample is taken and used as spectral intensity. - If it is set to "PCA", the first scores vector of a principal components analysis (PCA) decomposition is used as spectral intensity. - If it is set to "NMF", the first scores vector of a non-negative matrix factorization (NMF) is used as spectral intensity. - If it is set to "Single", the spectral peak having the highest intensity mean value over samples among all the spectral peaks is used as spectral intensity.
clases
Parameter to explicitly define the clases of the future spectralData object. If it is set to NULL this value is taken from the annotatedPeaks input.

samples
If the spectralData object has to include just a subset of the annotatedPeaks' samples, this input must be the vector having the wanted sample's IDs.
PCAscale
If method="PCA" and PCAscale is set to TRUE, then the data is scaled following the prcomp function. If it is set to TRUE, scale input is ignored.
PCAcenter
If method="PCA" and PCAscale is set to TRUE, then the data is centered following the prcomp function. If it is set to TRUE, scale input is ignored.
scale
If it is set to TRUE, the data is scaled through the spectral mean value. Set to FALSE by default.
signVariables
If this input field is a numeric vector, only the spectra/peaks having an ID number present in such vector are used as input data. If it is set to NULL, all the variables are taken into account to build the input data.
RemoveOnePeakSpectra
If it is set to TRUE, all the one-peak spectra are deleted from the dataSet and the resulting spectralData object will only contain spectra with more than one peak.
printCSVfile
If it is set to TRUE, an output matrix showing the spectral/peak intensity is build, where each column is a sample and each row is a variable (spectra or peak depending on the method used).

Value

An MAIT-class object.

Examples

Run this code
data(MAIT_sample)
peakAggregation(MAIT)

Run the code above in your browser using DataLab