Profile: Average the correlating masses for each metabolite

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Profile.R

Description

This function makes a profile from the masses that correlate for each metabolite.

Usage

1
Profile(samples, Lib, peakData, r_thres = 0.95, method = "dayNorm", minPairObs = 5)

Arguments

samples

A tsSample object created by ImportSamples function.

Lib

A tsLib object created by ImportLibrary function with corrected RI values. See medianRILib.

peakData

A tsMSdata object. See peakFind.

r_thres

A correlation threshold.

method

Normalisation method. Options are "dayNorm", a day based median normalisation, "medianNorm", normalisation using the median of all the intensities of a given mass, and "none", no normalisation at all.

minPairObs

Minimum number of pair observations. Correlations between two variables are computed using all complete pairs of observations in those variables. If the number of observations is too small, you may get high correlations values just by chance, so this parameters is used to avoid that. Cannot be set lower than 5.

Value

A tsProfile object. The slots are:

Info

A data frame with a profile of all masses that correlate.

Intensity

A list containing peak-intensity matrices, one matrix per metabolite.

RI

A list containing RI matrices, one matrix per metabolite.

profInt

A matrix with the averaged intensities of the correlating masses.

profRI

A matrix with the averaged RI of the correlating masses.

Author(s)

Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

See Also

ImportSamples, ImportLibrary, medianRILib, peakFind, tsProfile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
require(TargetSearchData)
data(TSExample)

# get RI file path
RI.path <- file.path(find.package("TargetSearchData"), "gc-ms-data")
# update RI file path
RIpath(sampleDescription) <- RI.path
# Import Library
refLibrary        <- ImportLibrary(file.path(RI.path,'library.txt'))
# update median RI
refLibrary        <- medianRILib(sampleDescription, refLibrary)
# get the sample RI
corRI             <- sampleRI(sampleDescription, refLibrary, r_thres = 0.95)
# obtain the peak Intensities of all the masses in the library
peakData          <- peakFind(sampleDescription, refLibrary, corRI)
# make a profile of the metabolite data
metabProfile      <- Profile(sampleDescription, refLibrary, peakData, r_thres = 0.95)

# same as above, but with different thresholds.
metabProfile      <- Profile(sampleDescription, refLibrary, peakData,
                     r_thres = 0.9, minPairObs = 5)

TargetSearch documentation built on March 12, 2021, 2 a.m.