gcProcess: Function for GCMS data preprocessing

Description Usage Arguments Examples

View source: R/NcmsPreProcess.R

Description

In gcProcess function we have inherited function for filteration, peak i dentification, group, retentiontime correction from XCMS and annotation from CAM ERA package.

Usage

1
gcProcess(object, ...)

Arguments

object
...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (object, ...) 
{
    cdffiles <- list.files(object, recursive = TRUE, full.names = TRUE)
    xset <- xcms::xcmsSet(cdffiles)
    xset <- xcms::group(xset, bw = 20, mzwid = 0.01, minfrac = 1)
    xset2 <- xcms::retcor(xset, family = "symmetric", plottype = "mdevden")
    xset2 <- xcms::group(xset2, bw = 20)
    xset3 <- xcms::fillPeaks(xset2)
    an <- CAMERA::xsAnnotate(xset3)
    a <- CAMERA::getPeaklist(an)
    dat <- as.matrix(a[, 10:16])
    colnames(dat) <- rownames(xset@phenoData)
    new("NcmsProcessData", qData = dat, phenoData = phenodata1)
  }

HTDA documentation built on May 2, 2019, 4:53 p.m.