ImportLibrary {TargetSearch}R Documentation

Library import

Description

This function imports a metabolite library file that will be used to processed the GC-MS data.

Usage

ImportLibrary(libfile, RI_dev = c(2000, 1000, 200), SelMasses = 5,
              TopMasses = 15, ExcludeMasses)

Arguments

libfile A character string naming a library file. See details.
RI_dev A three component vector with RI windows.
SelMasses The number of selective masses that will be used.
TopMasses The number of most intensive masses that will be taken from the spectrum, if no TOP_MASSES is provided.
ExcludeMasses Optional. A vector containing a list of masses that will be excluded.

Details

The library file is a tab delimited text file with the following column names.

The columns Name and RI are mandatory. At least one of columns SEL_MASSES, TOP_MASSES and SPECTRUM must be given as well. By using the parameters SelMasses or TopMasses it is possible to set the selective masses or the top masses from the spectra. The parameter ExcludeMasses is used only when masses are obtained from the spectra. The parameter RI_dev can be used to set the RI windows. Note that in this case, all metabolites would have the same RI windows.

Value

A tsLib object.

Author(s)

Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

See Also

ImportSamples, tsLib

Examples

# get the reference library file
cdfpath <- file.path(.find.package("TargetSearchData"), "gc-ms-data")
lib.file  <- file.path(cdfpath, "library.txt")

# Import the reference library
refLibrary <- ImportLibrary(lib.file) 

# set new names for the first 3 metabolites
libName(refLibrary)[1:3] <- c("Metab01", "Metab02", "Metab03")

# change the retention time deviations of Metabolite 3
RIdev(refLibrary)[3,] <- c(3000,1500,150)


[Package TargetSearch version 1.0.0 Index]