plot_ionduplicate: Loop-based EIC Plotter for Ion Mode Duplicates

Description Usage Arguments Value Examples

View source: R/plotting-functions.R

Description

Plots EICs from ion mode duplicates using plotEICs-methods from CAMERA.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plot_ionduplicate(
  anposGa,
  xpos,
  annegGa,
  xneg,
  rt.method,
  Peak.list,
  gen.plots,
  file.base,
  QC.id,
  mytable,
  maxEIC,
  maxQC,
  ...
)

Arguments

anposGa

xsannotate object in parent environment with isotopes, ion adducts and fragments for positive mode.

xpos

xcmsSet object shoud have grouping, retention time correction and fillPeaks applied. Default is to look for this in anposGa.

annegGa

xsannotate object in parent environment with isotopes, ion adducts and fragments for negative mode.

xneg

xcmsSet object shoud have grouping, retention time correction and fillPeaks applied. Default is to look for this in annegGa.

rt.method

Which method to use for EIC. Can be one of c("corrected","raw").

Peak.list

data.frame containing combined ion mode peaklist with column "Duplicate_ID". Alternatively can be retrieved from databases. Default is NULL.

gen.plots

logical indicating whether to create plots for ion mode duplicates. Default is FALSE.

file.base

character string used to name graphical output. Default is "EIC_plots".

QC.id

character identifier for pooled QC samples. Default is "Pooled_QC".

mytable

character name of table in database to return

maxEIC

numeric Max number of features for which to plotEICs for each metabolite.

maxQC

numeric Max number of QCs used to plotEICs.

...

parameters to be passed to database functions

Value

list of length 2 EIC indices for the ion duplicate plots

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
25
26
library(LUMA)
if(require(lcmsfishdata, quietly = TRUE)) {

file <- system.file("extdata","CAMERA_objects_Pos.Rdata", package =
"lcmsfishdata") # is case sensitive on Linux
load(file, envir = environment())
file2 <- system.file("extdata","CAMERA_objects_Neg.Rdata", package =
"lcmsfishdata") # is case sensitive on Linux
load(file2, envir = environment())

Peak.list <- lcmsfishdata::Peaklist_db[["Peaklist_Combined_with_Duplicate_IDs"]]

test <- plot_ionduplicate(anposGa = anposGa, annegGa = annegGa, Peak.list =
Peak.list, gen.plots = FALSE)
class(test) ##is list
length(test) ## with 2 elements

  ## Not run: 
  #Runs with pdf plotting. This requires access to raw datafiles and won't
  #work with lcmsfishdata. Better to use your own data here.
  test <- plot_ionduplicate(anposGa = anposGa, annegGa = annegGa, Peak.list =
  Peak.list, gen.plots = TRUE)

  
## End(Not run)
}

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