averageInterFragSpectra-purityA-method: Using a purityA object, average and filter fragmentation...

Description Usage Arguments Value Examples

Description

General

Average and filter fragmentation spectra for each XCMS feature across MS data files. This can only be run after averageIntraFragSpectra has been used.

The averaging is performed using hierarchical clustering of the m/z values of each peaks, where m/z values within a set ppm tolerance will be clustered. The clustered peaks are then averaged (or summed).

The fragmentation can be filtered on the averaged spectra (with the arguments snr, rsd, minfrac and ra)

Example LC-MS/MS processing workflow

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S4 method for signature 'purityA'
averageInterFragSpectra(
  pa,
  minfrac = 0.5,
  minnum = 1,
  ppm = 5,
  snr = 0,
  ra = 0,
  av = "median",
  sumi = TRUE,
  rmp = FALSE,
  cores = 1
)

Arguments

pa

object; purityA object

minfrac

numeric; minimum ratio of the peak fraction (peak count / total peaks) across files

minnum

numeric; minimum number of times peak is present across fragmentation spectra across files

ppm

numeric; ppm threshold to average across files

snr

numeric; minimum signal-to-noise of the peak across files

ra

numeric; minimum relative abundance of the peak across files

av

character; type of averaging to use (median or mean)

sumi

boolean; TRUE if the intensity for each peak is summed across averaged spectra

rmp

boolean; TRUE if peaks are to be removed that do not meet the threshold criteria. Otherwise they will just be flagged

cores

numeric; Number of cores for multiprocessing

Value

Returns a purityA object (pa) with the following slots now with data

Each spectra in the av_spectra list contains the following columns: *

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#msmsPths <- list.files(system.file("extdata",
#"lcms", "mzML", package="msPurityData"), full.names = TRUE, pattern = "MSMS")
#xset <- xcms::xcmsSet(msmsPths, nSlaves = 1)
#xset <- xcms::group(xset)
#xset <- xcms::retcor(xset)
#xset <- xcms::group(xset)

#pa  <- purityA(msmsPths, interpol = "linear")
#pa <- frag4feature(pa, xset)
#pa <- averageIntraFragSpectra(pa)
pa <- readRDS(system.file("extdata", "tests", "purityA",
                          "4_averageIntraFragSpectra_no_filter_pa.rds",
                          package="msPurity"))
pa <- averageInterFragSpectra(pa)

msPurity documentation built on Jan. 14, 2021, 2:44 a.m.