Description Usage Arguments Details Value See Also Examples
View source: R/adductMatch.massdiff.R
Given a set of mass differences produced by function massdiff
,
report for each pair of masses the closest-matching molecular transformation
from a list of such potential adduct types. The built-in data sets
adducts
and adducts2
are examples of such lists
of potential adducts.
1 2 3 | ## S3 method for class 'massdiff'
adductMatch(x, add = mass2adduct::adducts, ppm = 2,
mDa = NULL)
|
x |
massdiff; Mass differences produced by |
add |
data.frame of adduct masses (default: "adducts" dataset in package) |
ppm |
numeric; the peak width (uncertainty) of the calculated peaks in proportional units, as parts per million (default: 2) |
mDa |
numeric; the peak width (uncertainty) of the calculated peaks in absolute mass units, as milliDaltons (default: NULL) |
There are two options for setting a cutoff to match a given mass to a given
potential adduct. The cutoff can be either proportional to the mass (and
expressed as parts per million ppm
) or a flat absolute value (in
milliDaltons mDa
). ppm is used by default. If a value for mDa is
specified, then any value given to ppm is ignored. The ppm or mDa values are
usually reported by the peak-picking software used.
Object of class massdiff, with additional element "matches" reporting the closest matches
adductMatch.massdiffhist
gives an overview for large data
sets by matching closest adducts to mass differences already binned
into a histogram.
topAdducts
to find the closest-matching adducts for
the mass differences with the highest counts (the converse of the
current function)
1 2 3 | d <- msimat(csv=system.file("extdata","msi.csv",package="mass2adduct"),sep=";")
d.diff <- massdiff(d) # Calculate mass differences from imported MSI data
d.diff.annotate <- adductMatch(d.diff,add=adducts2) # Report closest matches
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.