Repository navigation
Description
I noticed that OpenMS misses to correctly group some isotpe and adduct peaks.
This is based on FeatureFindingMetabo and MetaboliteFeatureDeconvolution.
In my opinion, the computation of the overlap over retention time of 2 mass traces plays a major role in this. The problem occurs if the 2 mass traces to be grouped are very different in intensity and thus differ in length.
Isotope detection in FeatureFindingMetabo
Currently the shorter mass trace must have at least 70% the length of the longer one, else these cannot be grouped together.
double proportion(overlap / max_length);
if (proportion < 0.7)
{
return 0.0;
}
return computeCosineSim_(x, y);But isotope peaks, especially all >+1 peaks, are usually low in intensity and thus the detected mass traces will be much shorter.
Solution: Isn't it more reasonable to assume that the shorter mass trace must lie to at least 95% or 99% within the longer mass trace (note, that the monoisotopic mass trace usually is, but does not have to be the longer one)? Additionally, it should be checked if the maximum of the longer mass trace (the longer mass trace should be more intense than the shorter one) lies within the range of the shorter peak.
Adduct grouping in MetaboliteFeatureDeconvolution
Currently, the overlap is computed by intersect_length / union_length. Again adduct mass traces with huge intensity differences may not be grouped since union_length is mainly the length of the high intense adduct mass trace and intersect_length is mainly the length of the low intensity adduct mass trace.
if (!(f1.getConvexHull().getBoundingBox().isEmpty() || f2.getConvexHull().getBoundingBox().isEmpty()))
{
double f_start1 = std::min(f1.getConvexHull().getBoundingBox().minX(), f2.getConvexHull().getBoundingBox().minX());
double f_start2 = std::max(f1.getConvexHull().getBoundingBox().minX(), f2.getConvexHull().getBoundingBox().minX());
double f_end1 = std::min(f1.getConvexHull().getBoundingBox().maxX(), f2.getConvexHull().getBoundingBox().maxX());
double f_end2 = std::max(f1.getConvexHull().getBoundingBox().maxX(), f2.getConvexHull().getBoundingBox().maxX());
double union_length = f_end2 - f_start1;
double intersect_length = std::max(0., f_end1 - f_start2);
if (intersect_length / union_length < rt_min_overlap)
continue;
}Suggestion: I my opinion it is not uncommon to see e.g. a high intense [M+H]+ and low intense [M+Na]+ and a modified rule such as _intersect_length / shorter_mass_trace_length < rt_min_overlap would still detect this. I just do not know if there are adducts which are expected to have different retention times and how these are influenced by this.
Activity
[-][Improvement] Isotope and adduct grouping for metabolites[/-][+][Enhancement] Isotope and adduct grouping for metabolites[/+]oliveralka commentedon Jan 21, 2020
I think we should implement your suggestions in both cases. I had to fight with the grouping as well and it makes a lot of sense for metabolites with elements such as Cl, F, Br.
In my opinion, the optimal case would be an overlap of 99% - I guess it would be best to have some control over it - maybe it should be an advanced parameter which you can alternate between 95% and 99%.
Do you mean that the max. intensity peak should be within the retention time of the potential isotopic peak? Should that not be covered by the overlap of 99% or is that a certain edge case? Shouldn't that be already handled in the hypothesis testing (@timosachsenberg)?
@FabianAicheler Do you have time to take a look at the Adducts?
marcus-ludwig commentedon Jan 21, 2020
No, this is the other direction. Say, mass trace A is longer (over RT) and more intense than mass trace B. A is 5 sec, B is 2 sec. The usual scenario would be A is the monoisotopic and B the +1 isotope.
Here, B should lie within A. But the apex of mass trace A (most intense peak) should lie in the 2 sec range of B as well. If you do not see an +1 isotope peak in the MS1 with the most intense monoisotopic peak, something is wrong.
Of course there are scenarios in which the longer mass trace is not the monoisotopic but the other way around. That is why we define the rule based on "longer" and "shorter" mass trace and not lower and higher m/z.
stale commentedon Mar 30, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
github-actions commentedon Jan 7, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Fix isotope and adduct peak grouping for metabolites (#4483)
github-actions commentedon Jul 7, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Make improved isotope RT grouping opt-in to preserve default behavior
Improve isotope/adduct RT grouping for low-intensity mass traces (#4483…
docs(CHANGELOG): add missing entry for PR #9711 (#9713)
[PARAM] FeatureFinderMetabo: assemble isotope traces of low intensity (…