adductMatch.massdiffhist: Report closest-matching adduct type for a mass difference...

Description Usage Arguments Value See Also

View source: R/adductMatch.massdiffhist.R

Description

Given a histogram of mass differences (from applying hist on a massdiff object), report the bins most closely matching a list of potential molecular transformations (adduct types). The built-in data sets adducts and adducts2 are examples of such lists of potential adducts. This function is designed for a quick exploratory overview of an MSI data set, especially when the number of peaks is large. To report each peak pair that has a match to the list of potential adducts, apply adductMatch directly to a massdiff object.

Usage

1
2
3
## S3 method for class 'massdiffhist'
adductMatch(x, add = mass2adduct::adducts,
  density = FALSE)

Arguments

x

massdiffhist object produced by hist.massdiff

add

data.frame of adduct masses (default: "adducts" dataset in package)

density

logical; return density instead of counts? (default: FALSE)

Value

data.frame of adducts with counts/density from closest-matching bin and their corresponding quantiles in mass difference bins

See Also

adductMatch.massdiff reports closest-matching adducts for each individual peak pair.

topAdducts to find the closest-matching adducts for the mass differences with the highest counts (the converse of the current function)


kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.