sneumann / Rdisop

This is the git repository matching the Bioconductor package Rdisop: Decomposition of Isotopic Patterns
4 stars 7 forks source link

Addressing issue with minElements in decomposeMass()/decomposeIsotopes() #19

Closed mjhelf closed 5 years ago

mjhelf commented 5 years ago

Fixing issue as discussed in #6.

Before:

> decomposeMass(347.0630844422, ppm = 5,  mzabs = 0, minElements = "C10O6PN", maxElements = "O10P1S3")$formula
 [1] "C10H14N5O7P"  "C14H11N4O7"   "C10H22NO6PS2" "C14H19O6S2"   "C16H13NO8"    "C10H138N4S"   "C23H11N2S"    "C12H16N2O8P"  "C19H14N3PS"   "C12H9N7O6" 

After:

> decomposeMass(347.0630844422, ppm = 5,  mzabs = 0, minElements = "C10O6PN", maxElements = "O10P1S3")$formula
[1] "C10H14N5O7P"  "C10H22NO6PS2" "C12H16N2O8P" 

Unit tests check if results are correctly applying element filters, and expected results were externally verified by running the same mass query on chemcalc.org.

sneumann commented 5 years ago

Thanks for the PR! I'll merge into the next devel cycle in a few days, and then backport into RELEASE_3_9 if everything works out. While this looks straight-forward, I'd like to not touch the release candidate this late. Yours, Steffen