findMsMsHR {RMassBank} | R Documentation |
Extracts MS/MS spectra from LC-MS raw data for a specified precursor, specified
either via the RMassBank compound list (see loadList
) or via a mass.
findMsMsHR(fileName = NULL, msRaw = NULL, cpdID, mode = "pH", confirmMode = 0, useRtLimit = TRUE, ppmFine = getOption("RMassBank")$findMsMsRawSettings$ppmFine, mzCoarse = getOption("RMassBank")$findMsMsRawSettings$mzCoarse, fillPrecursorScan = getOption("RMassBank")$findMsMsRawSettings$fillPrecursorScan, rtMargin = getOption("RMassBank")$rtMargin, deprofile = getOption("RMassBank")$deprofile, headerCache = NULL, peaksCache = NULL, retrieval = "standard") findMsMsHR.mass(msRaw, mz, limit.coarse, limit.fine, rtLimits = NA, maxCount = NA, headerCache = NULL, fillPrecursorScan = FALSE, deprofile = getOption("RMassBank")$deprofile, peaksCache = NULL, cpdID = NA)
fileName |
The file to open and search the MS2 spectrum in. |
msRaw |
The opened raw file (mzR file handle) to search the MS2 spectrum in. Specify either this
or |
cpdID |
The compound ID in the compound list (see |
mode |
The processing mode (determines which ion/adduct is searched):
|
confirmMode |
Whether to use the highest-intensity precursor (=0), second- highest (=1), third-highest (=2)... |
useRtLimit |
Whether to respect retention time limits from the compound list. |
ppmFine |
The limit in ppm to use for fine limit (see below) calculation. |
mzCoarse |
The coarse limit to use for locating potential MS2 scans: this tolerance is used when finding scans with a suitable precursor ion value. |
fillPrecursorScan |
If |
rtMargin |
The retention time tolerance to use. |
deprofile |
Whether deprofiling should take place, and what method should be
used (cf. |
headerCache |
If present, the complete |
peaksCache |
If present, the complete output of |
retrieval |
A value that determines whether the files should be handled either as "standard", if the compoundlist is complete, "tentative", if at least a formula is present or "unknown" if the only know thing is the m/z |
mz |
The mass to use for spectrum search. |
limit.coarse |
Parameter in |
limit.fine |
The fine limit to use for locating MS2 scans: this tolerance is used when locating an appropriate analyte peak in the MS1 precursor spectrum. |
rtLimits |
|
maxCount |
The maximal number of spectra groups to return. One spectra group consists of all data-dependent scans from the same precursor whose precursor mass matches the specified search mass. |
Different versions of the function get the data from different sources. Note that findMsMsHR and findMsMsHR.direct differ mainly in that findMsMsHR opens a file whereas findMsMs.direct uses an open file handle - both are intended to be used in a full process which involves compound lists etc. In contrast, findMsMsHR.mass is a low-level function which uses the mass directly for lookup and is intended for use as a standalone function in unrelated applications.
An RmbSpectraSet
(for findMsMsHR
). Contains parent MS1 spectrum (@parent
), a block of dependent MS2 spectra ((@children
)
and some metadata (id
,mz
,name
,mode
in which the spectrum was acquired.
For findMsMsHR.mass
: a list of RmbSpectraSet
s as defined above, sorted
by decreasing precursor intensity.
findMsMsHR.mass
: A submethod of find MsMsHR that retrieves basic spectrum data
findMsMs.direct
is deactivated
Michael A. Stravs, Eawag <michael.stravs@eawag.ch>
findEIC
## Not run: loadList("mycompoundlist.csv") # if Atrazine has compound ID 1: msms_atrazine <- findMsMsHR(fileName = "Atrazine_0001_pos.mzML", cpdID = 1, mode = "pH") # Or alternatively: msRaw <- openMSfile("Atrazine_0001_pos.mzML") msms_atrazine <- findMsMsHR(msRaw=msRaw, cpdID = 1, mode = "pH") # Or directly by mass (this will return a list of spectra sets): mz <- findMz(1)$mzCenter msms_atrazine_all <- findMsMsHR.mass(msRaw, mz, 1, ppm(msRaw, 10, p=TRUE)) msms_atrazine <- msms_atrazine_all[[1]] ## End(Not run)