runLC | R Documentation |
Main function of the pipeline for LC-MS data processing. It includes XCMS peak detection, grouping and alignment, CAMERA and feature annotation by comparison to a database of standards. The function also calculates the mass tolerance on the bases of the ion intensity and ion mass.
runLC(files, xset, settings, rtrange = NULL, mzrange = NULL, DB = NULL, polarity = "positive", errf = NULL, returnXset = FALSE, intensity = "into", nSlaves = 0)
files |
input files, given as a vector of strings containing the complete paths. All formats supported by XCMS can be used. |
xset |
alternatively, one can present an object of class
|
settings |
nested list of settings, to be used at individual
steps of the pipeline. See the help of |
rtrange |
An optional vector to slice the retention time range (in minutes). |
mzrange |
An optional vector to slice the mass spectrum |
DB |
database containing the spectra of the pure standards. For
the description refer to the |
polarity |
The polarity of the analysis used for CAMERA annotation. Either "positive" or "negative". |
errf |
A model used to calculate the mass tolerance in ppm
for each features on the bases of its mass, retention time and intensity.
For further details refer to the help of |
returnXset |
logical: should the XCMS output be returned? If yes,
this is a a list of |
intensity |
The intensity measure used in the output
peaktable. The available intensities are the ones provided by
|
nSlaves |
Number of cores to be used in peak picking. |
The mzrange
and rtrange
parameters are used to
subset the mass and retention times considered in the analysis,
reducing possible alignment problems at the extremes.
The error function calculates the expected m/z tolerance for feature
annotation based on the mz and I values of each feature. To have a
more complete description of the process refer to the help of
AnnotateTable
and the literature reference. An example is
provided as well. Note that the use of "lm" is only one of the
possible choices, but all kind of functional approximations working
with the predict
function could be used. If the error function
is not provided the mass tolerance will be fixed to the value defined
in the settings
list.
A list with three elements:
PeakTable |
data.frame containing annotation information. Every line is a feature. The first columns are used to give information about these features, annotation, CAMERA, Chemspider IDs, etcetera. The last of these meta-information columns is always the one giving the retention time: "rt". After that, columns correspond to input files, and give measures of intensities for every single one of the features. |
Annoation |
The complete output of the |
Settings |
The settings used in the pipeline. |
xset |
optionally, the xcmsSet/CAMERA object is returned, which can be useful for more detailed inspection of the results. |
sessionInfo |
The output of |
Pietro Franceschi
N. Shahaf, P. Franceschi, P. Arapitsas, I. Rogachev, U. Vrhovsek and R. Wehrens: "Constructing a mass measurement error surface to improve automatic annotations in liquid chromatography/mass spectrometry based metabolomics". Rapid Communications in Mass Spectrometry, 27(21), 2425 (2013).
data(LCresults) names(LCresults) ## Not run: ## load the settings for the analysis data(FEMsettings) ## load the annotation DB data(LCDBtest) ## load the Synapt Q-TOF error function data(errf) results.xset <- runLC(xset = LCresults$xset, settings = Synapt.RP, DB = LCDBtest$DB) ## to start directly from the CDF files and include peak picking in the ## pipeline, simply provide the "files" argument rather than the "xset" argument if (require(metaMSdata)) { ## get the path cdfpath <- system.file("extdata", package = "metaMSdata") ## files files <- list.files(cdfpath, "_RP_", full.names=TRUE) ## <------------- Use the Synapt Q-TOF error function -------------- > result.adaptive <- runLC(files, settings = Synapt.RP, DB = LCDBtest$DB, errf = errf) ## <-------- Run the analysis with a fixed mass tolerance --------- > result.fixed <- runLC(files, settings = Synapt.RP, DB = LCDBtest$DB) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.