LOB_findMS2: Find MS2 spectra in a rawSpec object based on retention time...

View source: R/LOB_findms2.R

LOB_findMS2R Documentation

Find MS2 spectra in a rawSpec object based on retention time and precursor m/z

Description

This function allows the user to quickly search a rawSpec object for MS2 cooresponding to either an inputed m/z and retention time or search with multiple MS1 peaks at once by inputing a peaklist.

Usage

LOB_findMS2(XCMSnExp, peakdata = NULL, mz, rt, rtspan = 175, ppm_pre = 100)

Arguments

XCMSnExp

A XCMSnExp object to be searched contianing both MS1 and MS2 spectra.

peakdata

A data.frame generated from LOBSTAHS peaklist containing info for multiple peaks for which coresponding MS2 spectra will be searched. The input 'peakdata' must have columns 'peakgroup_rt', 'LOBdbase_mz', and 'compound_name' with rows for each lipid.

mz

A single numeric vector equal to the m/z of a peak.

rt

A single numeric vector equal to the rt of a peak.

rtspan

A single numeric vector equal setting the retention time window around the peak 'rt' (defaults to ±175 seconds).

ppm

A single numeric vector equal setting the mass range around the peak 'm/z' for which to search for scans (defaults to ±100 ppm).

Details

Using the 'peakdata' argumnet overides the 'mz' and 'rt' arguments. Use 'peakdata' to search using multiple annotations at once. Use 'mz' and 'rt' to search with a single peak.

Value

Returns a data.frame or a list of data.frame if multipule peaks were searched with at once.

Note

Currently in development.

Author(s)

Henry Holm, hholm@mit.edu
Dan Lowenstien, dlowenstein@whoi.edu Max Jahns, mjahns@mit.edu Shavonna Bent, sbent@mit.edu

Examples

#Example - find MS2 of DNPPE
DNPPE_ms2 <- LOB_findMS2(XCMSnExp = rawSpec,
                         mz = 875.550487,
                         rt = 1000,
                         ppm = 2.5)

hholm/LOB_tools documentation built on Jan. 10, 2025, 7:14 p.m.