Description Arguments Examples
This class defines how peaks in an MS spectrum are annotated. In its current
preliminary implementation, if defines lists of peaks and and annotations,
both of which must have the same length. Each element of peaks
is
annotated by the corresponding element of annotations
. Elements of peaks
can contain a single numeric corresponding to the m/z of a peak in a
centroided spectrum, of a vector of m/z values when a set of peaks (for
instance in case of profile mode data) are annotated by an
annotation.
Currently, there are no constrains on either peaks
and annotations
elements. The latters can be either descriptive characters, as in the
examples below, or could be encoded as dataframes. This is likely to change
in the future.
Objects are created with the PeakAnnotation(peaks, annotations)
and PeakAnnotations(...)
contructors.
peaks |
A |
annotations |
A |
... |
Objects of class |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | pa1 <- PeakAnnotation(peaks = list(123.3,
c(234.1, 234.12, 234.15)),
annotations = list("b2", "y3"))
pa1
pa2 <- PeakAnnotation(peaks = list(c(345.3, 345.32, 345.35, 345.39, 345.4),
657.01,
1231.182),
annotations = list("a5", "z3", "y7"))
pa2
pas <- PeakAnnotations(pa1, pa2)
pas
dfr <- DataFrame(x = 1:2,
y = LETTERS[1:2],
annot = pas)
dfr
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.