Usage
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)
Arguments
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 fileName
.
cpdID
The compound ID in the compound list (see loadList
)
to use for formula lookup. Note: In \codefindMsMsHR.mass, this is entirely optional and
used only in case a warning must be displayed; compound lookup is done via mass only. mode
The processing mode (determines which ion/adduct is searched):
"pH", "pNa", "pM", "pNH4", "mH", "mM", "mFA"
for different ions
([M+H]+, [M+Na]+, [M]+, [M+NH4]+, [M-H]-, [M]-, [M+FA]-).
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 TRUE
, the precursor scan will be filled from MS1 data.
To be used for data where the precursor scan is not stored in the raw data.
rtMargin
The retention time tolerance to use.
deprofile
Whether deprofiling should take place, and what method should be
used (cf. deprofile
) headerCache
If present, the complete mzR::header(msRaw)
. Passing
this value is useful if spectra for multiple compounds should be
extracted from the same mzML file, since it avoids getting the data
freshly from msRaw
for every compound.
peaksCache
If present, the complete output of mzR::peaks(msRaw)
. This speeds up the lookup
if multiple compounds should be searched in the same file.
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 findMsMsHR.mass
corresponding to mzCoarse
.
(The parameters are distinct to clearly conceptually distinguish findMsMsHR.mass
(a standalone useful function) from the cpdID based functions (workflow functions).)
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
c(min, max)
: Minimum and maximum retention time to use
when locating the MS2 scans.
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.