Learn R Programming

TargetSearch (version 1.28.1)

peakFind: Intensities and RI matrices

Description

This function returns a list of the intensities and RI matrices that were searched.

Usage

peakFind(samples, Lib, cor_RI, columns = c("SPECTRUM", "RETENTION_TIME_INDEX", "RETENTION_TIME"), showProgressBar = FALSE)

Arguments

samples
A tsSample object created by ImportSamples function.
Lib
A tsLib object created by ImportLibrary function with corrected RI values. See medianRILib.
cor_RI
A matrix of correlating selective masses RI for every sample. See sampleRI.
columns
A numeric vector with the positions of the columns SPECTRUM, RETENTION_TIME_INDEX, and RETENTION_TIME or a character vector with the header names of those columns.
showProgressBar
Logical. Should the progress bar be displayed?

Value

A tsMSdata object.

See Also

ImportSamples, ImportLibrary, medianRILib, sampleRI, tsMSdata, tsLib, tsSample

Examples

Run this code
require(TargetSearchData)
data(TargetSearchData)

# get RI file path
RI.path <- file.path(find.package("TargetSearchData"), "gc-ms-data")
refLibrary <- ImportLibrary(file.path(RI.path,"library.txt"))

# update RI file path
RIpath(sampleDescription) <- RI.path

peakData <- peakFind(sampleDescription, refLibrary, corRI)
# show peak Intensities. 
head(Intensity(peakData), 2)

# How to get intensities for a particular metabolite
# just select the identifier. Here extract the intensities
# for the first metabolite in the library
IntMatrix <- Intensity(peakData)[[1]]

Run the code above in your browser using DataLab