mzchannel2pktab: Conversion between peak lists from hyphenated MS (LCMS, GCMS,...

Description Usage Arguments Value Author(s) Examples

View source: R/wccStick.R

Description

Function pktab2mzchannel allows to split a list of peaks into several sublists, for instance on the basis of m/z values. The result can be aligned with stptw. The peak list can be obtained from packages like XCMS. The reverse function, mzchannel2pktab, simply gathers all peak positions in one matrix.

Usage

1
2
pktab2mzchannel(pktab, Ivalue = "maxo", masses = NULL, nMasses = 0, massDigits = 2) 
mzchannel2pktab(mzchannels)

Arguments

pktab

a peak table as generated for example by XCMS. Necessary information: m/z value (column name "mz"), retention time (column name "rt") and intensity.

Ivalue

the name of the intensity value to be used. Default is "maxo", one of the columns generated by the XCMS package.

masses

a vector of specific masses

nMasses

an optional number limiting the number of mass channels. When both masses and nMasses are defined, the former takes preference

massDigits

number of significant mass digits - if no masses are supplied this number determines the number of distinct categories in the output

mzchannels

a list of peak matrices, e.g. the output of pktab2mzchannel

Value

Function pktab2mzchannel returns a list of peak matrices; list elements have the name of the mz value that they represent. Function mzchannel2pktab returns one peak matrix where all masses are in a specific column.

Author(s)

Ron Wehrens

Examples

1
2
3
4
5
6
7
data(lcms)
## first couple of peaks in the first three channels
(smallset <- lapply(lcms.pks[[1]][1:3], head))
## all in one data matrix
allpeaks <- mzchannel2pktab(smallset)
## and back again
pktab2mzchannel(allpeaks, Ivalue = "I")

ptw documentation built on Jan. 19, 2022, 5:07 p.m.