extractPrecSpectra-methods: Extracts precursor-specific spectra from an 'MSnExp' object

extractPrecSpectra-methodsR Documentation

Extracts precursor-specific spectra from an 'MSnExp' object

Description

Extracts the MSMS spectra that originate from the precursor(s) having the same MZ value as defined in theprec argument.

A warning will be issued of one or several of the precursor MZ values in prec are absent in the experiment precursor MZ values (i.e in precursorMz(object)).

Methods

signature(object = "MSnExp", prec = "numeric")

Returns an "MSnExp" containing MSMS spectra whose precursor MZ values are in prec.

Author(s)

Laurent Gatto

Examples

file <- dir(system.file(package="MSnbase",dir="extdata"),
            full.name=TRUE,pattern="mzXML$")
aa <- readMSData(file,verbose=FALSE)
my.prec <- precursorMz(aa)[1]
my.prec
bb <- extractPrecSpectra(aa,my.prec)
precursorMz(bb)
processingData(bb)

lgatto/MSnbase documentation built on Nov. 12, 2024, 10:58 a.m.