findFragment: Find spectra that contain a specific fragment

Description Usage Arguments Value Examples

View source: R/accessory_functions.R

Description

findFragment is used to find spectra that contain a specific fragment ion. Its sister function is findNL, which finds specific neutral losses. Both functions work analogous to getSpectrum.

Usage

1
findFragment(featlist, mz, tolerance = 1e-05)

Arguments

featlist

a list that contains only objects of class MS2spectrum

mz

The mass-to-charge ratio of the fragment ion of interest.

tolerance

The m/z tolerance for the fragment ion search. Default is 1E-05, i.e. +/- 10ppm.

Value

If the respective fragment is only found in one spectrum, the output is an object of class MS2spectrum; if it is found in more than one spectrum, the output is a list of MS2spectrum objects.

Examples

1
2
3
4
load(file = system.file("extdata",
    "annotatedSpeclist.RData",
    package = "CluMSIDdata"))
putativeAQs <- findFragment(annotatedSpeclist, 159.068)

CluMSID documentation built on Nov. 8, 2020, 7:46 p.m.