pmfxcms: pmfxcms

Description Usage Arguments Details Value Author(s)

View source: R/pmf-xcms.R

Description

A wrapper function for XCMS using common PMF platforms.

Usage

 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
27
28
29
pmfxcms(
  ExpDes = NULL,
  MStag = "01.cdf",
  idMSMStag = "02.cdf",
  filetype = "cdf",
  factorfile = "seq.csv",
  cores = 4,
  minpw = 3,
  maxpw = 30,
  filtPeaks = TRUE,
  ppmerr = 35,
  minTIC = 10,
  outTIC = TRUE,
  outPCA = TRUE,
  pcut = 0.05,
  p.adj = "BH",
  snthresh = 10,
  mzdiffquad = 0.5,
  bwpre = 3,
  bwpost = 1,
  minfrac = 0.15,
  fwhm = 3,
  maxt = NULL,
  step = NULL,
  rtcor = "loess",
  seqskip = 0,
  regroup = FALSE,
  rem.files = NULL
)

Arguments

ExpDes

R object generated by RAMClustR::defineExperiment function.

MStag

Character: "01.cdf" the text string used to recognize xmcs files as MS (low collision energy) when using indiscriminant MS/MS (MSE, AIF, ...)

idMSMStag

Character: "02.cdf",the text string used to recognize xmcs files as MS/MS (high collision energy) when using indiscriminant MS/MS (MSE, AIF, ...)

filetype

Character "cdf", The file extension - will be appended to file names in the csv 'factor file'. case insensitive.

factorfile

Character "seq.csv", The csv file containing filename (column 1) and sample name (column 2), Sample names can contain a delimitor separating factors, but all samples must contain the same number of factors (delimitors)

cores

Integer default = 4, how many computer cores to use in processing

minpw

Numerica (3) minimum peak width in seconds

maxpw

Numeric (30) maximum peak width in seconds

filtPeaks

Logical - TRUE. Should a filtering step be performed after peak detection to remove peaks out of minpw-maxpw range?

ppmerr

Numeric (35). If CentWave is used, what ppm error setting is used for feature detection?

minTIC

Numeric (10). If outTIC = TRUE, total ion signal minTIC fold lower than the median total ion signal are removed.

outTIC

Logical (TRUE). Should we remove injections based on total ion signal following peak detection? Uses outlier detection based on the distribution of signal values across samples and a cutoff defined by minTIC (on the low end of the distribution only)

outPCA

Logical (TRUE). Should we remove injections based on binned mass distribution after peak detection? Uses outlier detection on PC1 scores.

pcut

Numeric (0.05). p.value cutoff used to detect outliers. p values optionall corrected by p.adj (benhamini hochberg by default)

p.adj

character ("BH"). what pvalue false discovery rate correction to use on outlier detection steps. see ?p.adjust for options.

snthresh

numeric (10). signal to noise threshold used for feature detection (centWave or matchedFilter)

mzdiffquad

(0.5) mz bin size used for matchedFilter algorithm.

bwpre

numeric (3). bw parameter used in the feature grouping (correspondence) step BEFORE retention time adjustement

bwpost

numeric (1.5). bw parameter used in the feature grouping (correspondence) step AFTER retention time adjustment. If rt adjustment works well, we should be able to use a lower value than bwpre.

minfrac

numeric (0.15). minimum fraction of samples a feature must be found in (of full dataset) to be passed to final sample set.

fwhm

numeric (3). peak width at half height, used in matchedFilter algorithm.

maxt

numeric (NULL). retention time in seconds - peaks with retention times greater than maxt are excluded.

step

?? (NULL).

rtcor

character("loess"). one of NULL, "loess", "linear", "obiwarp", "nearest" NULL

seqskip

integer (0). Number of lines from top of factorfile to skip before starting. rarely used.

regroup

logical (FALSE). If true, try to load saved xcms object from 'datasets/' directory in working directory, skipping peak detection.

rem.files

vector of integer values. if regroup == TRUE, optional vector of sample numbers to remove.

Details

This function uses a template file as input to guide XCMS parameter selection.

Peak detection using centwave (LC-TOF) or matchedFilter (GC-Quad), density based peak grouping, loess rt correction, regrouping, and fillPeaks.

Additionally performs unsupervised removal of ultrawide chromatgoraphic peaks and outlier detection and removal after peak detection step.

an XCMS object is returned.

Value

returns an xcms object

Author(s)

Corey Broeckling


cbroeckl/csu.pmf.tools documentation built on Nov. 25, 2021, 1:20 p.m.