rformassspectrometry / CompoundDb

Creating and using (chemical) compound databases
https://rformassspectrometry.github.io/CompoundDb/index.html
16 stars 16 forks source link

Add basic function to annotate m/z #39

Closed jorainer closed 5 years ago

jorainer commented 5 years ago

Add a simple function that takes one or more m/z values and a list of possible adducts and returns the matching database entries.

Possible names for the (exported) function:

jorainer commented 5 years ago

annotateMz will annotate m/z values for provided adducts with compound masses (allowing to specify mass differences with the ppm parameter).

Different methods are implemented to annotate either numeric vectors or data.frame-like input values with reference anotations provided either as a CompDb database or a data.frame-like object (including tibble...).