Learn R Programming

TargetSearch (version 1.28.1)

FindPeaks: Extract peaks from chromatogram files

Description

This function extracts the maximum intensity of a list of masses in a given RI window.

Usage

FindPeaks(my.files, refLib, columns = c("SPECTRUM", "RETENTION_TIME_INDEX", "RETENTION_TIME"), showProgressBar = FALSE)

Arguments

my.files
A character vector naming RI files to be searched.
refLib
A numeric matrix with three columns or a list of three column matrices. The second column contains the masses and the first and third column contains the RI limits.
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.

Details

The reference library parameter refLib can be either a single three-column matrix or a list of such matrices. If it is a list, the length must match the length of my.files. In this case, every component will be used to iteratively search in the corresponding file.

The RI files format can be either "text" or "binary". The type is detected dinamically.

See Also

medianRILib, sampleRI, peakFind, tsMSdata

Examples

Run this code
require(TargetSearchData)
data(TargetSearchData)

# get RI file path
RI.path <- file.path(find.package("TargetSearchData"), "gc-ms-data")
# update RI file path
RIpath(sampleDescription) <- RI.path

my.files <- RIfiles(sampleDescription)
# make a three column matrix: lower RI, mass, upper RI
refLib   <- refLib(refLibrary)
head(refLib)

# extract the peaks
peaks <- FindPeaks(my.files, refLib)
    

Run the code above in your browser using DataLab