Description Usage Arguments Value Author(s) Examples
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.
1 2 | pktab2mzchannel(pktab, Ivalue = "maxo", masses = NULL, nMasses = 0, massDigits = 2)
mzchannel2pktab(mzchannels)
|
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 |
massDigits |
number of significant mass digits - if no
|
mzchannels |
a list of peak matrices, e.g. the output of
|
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.
Ron Wehrens
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.