wrap_xcms: Wraps xcms

Description Usage Arguments Value Examples

View source: R/wrapper-functions.R

Description

Run a simple XCMS workflow with user defined input parameters and return xcms objects

Usage

1
wrap_xcms(mzdatafiles, XCMS.par, file.base)

Arguments

mzdatafiles

a character vector of data files with full path names

XCMS.par

a single-row data frame with 13 variables containing parameters for xcms. Must include the columns "Peakwidth1", "Peakwidth2","ppm","noise","snthresh","mzdiff",

"prefilter1","prefilter2","center","gapInit","bw", "mzwid","minfrac".

file.base

character return from gen_filebase.

Value

two xcmsSet objects xset,xset4 without and with retention time alignment, peak grouping, and imputed missing values, respectively.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(LUMA)
if(require(lcmsfishdata, quietly = TRUE)) {

    file <- system.file("extdata","Sample_Data.csv", package =
    "lcmsfishdata") # is case sensitive on Linux
    sample_data <- read.table(file, header = TRUE, sep = ",")
    mzdatafiles <- sample_data$CT.ID

    file.base <- gen_filebase(mzdatafiles = mzdatafiles, BLANK = FALSE, IonMode
    = "Positive", ion.id = c("Pos","Neg"))
    file2 <- system.file("extdata","Best_XCMS_parameters_positive.csv",
    package = "lcmsfishdata")  # is case sensitive on Linux
    XCMS.par <- read.table(file2, header = TRUE, sep = ",")

    ## Not run: 

    #Runs XCMS This requires access to raw datafiles and won't work with
    #lcmsfishdata. Better to use your own data here.
    test <- wrap_xcms(mzdatafiles = mzdatafiles, XCMS.par = XCMS.par,
    file.base = file.base)
    
## End(Not run)

}

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