navMS | R Documentation |
MSnExp
objectNavigate an MSnExp
object by moving to the next or previous
spectrum.
navMS(i, object, msLevel, nav = c("nextMS", "prevMS"), ...)
nextMS(...)
prevMS(...)
i |
The name or index of the current spectrum |
object |
The |
msLevel |
The MS level of the next or previous spectrum. If missing (default), then the level of the current spectrum is used. |
nav |
One of |
... |
Additional parameters. Currently ignored. |
An object of class Spectrum1
or Spectrum2
,
depending on the value of msLevel
or NULL
, of no
spectrum is found.
Laurent Gatto
f <- msdata::proteomics(full.names = TRUE, pattern = "MS3")
x <- readMSData(f, centroided. = c(FALSE, TRUE, FALSE), mode = "onDisk")
(sp <- which(msLevel(x) == 3)[2]) ## 2nd MS3 spectrum
x[[sp]] ## curent MS3
MSnbase:::nextMS(sp, x) ## next MS3
MSnbase:::prevMS(sp, x) ## prev MS3
MSnbase:::prevMS(sp, x, 2L) ## prev MS2
MSnbase:::prevMS(sp, x, 1L) ## prev MS1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.