ElucidataInc / ElMaven

LC-MS data processing tool for large-scale metabolomics experiments.
https://resources.elucidata.io/elmaven/
GNU General Public License v2.0
85 stars 52 forks source link

na correction #84

Closed chubukov closed 7 years ago

chubukov commented 7 years ago

Something is really screwy with the 13C natural abundance correction. It seems particularly problematic for sulfur-containing compounds.

Seems to happen in both negative and positive mode.

If I disable the checkbox for natural abundance correction in the options, everything looks fine. If I enable it, some compounds (e.g. taurine) get completely blank isotope % plots. There are a few other ones that are incorrect, I can give more examples, but it's not all sulfur compounds (e.g. methionine looks ok).

I see this in Maven 776 also (weird-looking blank isotope plot for taurine) but some of the specifics are different -- again, can get into more detail later.

I think the NA correction was one of the things that we were going to look at more carefully as part of the refactoring process anyway, right? Maybe this can take this up then.

We could actually disable the checkbox for now.

GeorgeSabu commented 7 years ago

@chubukov The NA correction is not running for compounds with less than or equal to two carbons. For reasons we do not understand the code uses nc = nc - 2 to do the NA correction. "2" is hard coded.

png

That is the reason it's showing the odd behavior.

chubukov commented 7 years ago

@GeorgeSabu hmm, that's a little weird. I guess we can fix this without completely revamping the NA correction.

GeorgeSabu commented 7 years ago

@chubukov I have updated the develop with the refactored NA correction code.