MSnbase (version 1.20.7)

extractPrecSpectra-methods: 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)).

Arguments

Methods

signature(object = "MSnExp", prec = "numeric")
Returns an "MSnExp" containing MSMS spectra whose precursor MZ values are in prec.

Examples

Run this code
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)

Run the code above in your browser using DataCamp Workspace