wrap_camera: Wraps CAMERA

Description Usage Arguments Value Examples

View source: R/wrapper-functions.R

Description

Run a simple CAMERA workflow with user defined input parameters and return xsAnnotate objects

Usage

1
wrap_camera(xcms.obj, CAMERA.par, IonMode)

Arguments

xcms.obj

an xcmsSet object that has had peak picking, retention time alignment, peak grouping, and imputing missing values performed.

CAMERA.par

a single-row data frame with 9 variables containing CAMERA parameters. Must include columns "perfwhm","sigma","minfrac", "mzabs","maxiso","corval_eic","corval_exp","pval", "mzabs.1".

IonMode

a character string defining the ionization mode. Must be one of c("Positive","Negative").

Value

two grouped xsannotate objects mz1setpos,anposGa without and with annotated isotopes and ion adducts and fragments, respectively.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(LUMA)
if(require(lcmsfishdata, quietly = TRUE)) {
file <- system.file("extdata","XCMS_objects_Pos.Rdata", package =
"lcmsfishdata") # is case sensitive on Linux
load(file, envir = environment())
file2 <- system.file("extdata","Best_CAMERA_parameters_positive.csv", package
= "lcmsfishdata")  # is case sensitive on Linux
CAMERA.par <- read.table(file2, header = TRUE, sep = ",")

## Not run: 

#Runs CAMERA. This requires access to raw datafiles and won't work with
#lcmsfishdata. Better to use your own data here.
test <- wrap_camera(xcms.obj = xset4, CAMERA.par = CAMERA.par, IonMode = "Positive")

## End(Not run)

}

USEPA/LUMA documentation built on Aug. 29, 2020, 1:40 p.m.