Repository navigation
feat: add multimer detection to MetaboliteAdductDecharger - #8888
Conversation
Design for mass-aware multimer detection (dimers, trimers, etc.) in the MetaboliteFeatureDeconvolution algorithm. Uses exact algebraic M cancellation for cross-multiplier matches, controlled by max_multimer parameter (default 1 preserves backward compatibility). Supersedes PR #8431's cosmetic-only approach. Co-Authored-By: Claude Opus 4.6 <[email protected]>
9-task TDD plan covering: Compomer::getSideMass(), ChargePair multiplier fields, Adduct::toAdductString with multiplier, MassExplainer::queryMultimer(), MetaboliteFeatureDeconvolution parameter wiring, candidateEdges_() multiplier loop, annotation updates, and integration tests. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…annotation Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add multiplier loop (n1, n2) around the MassExplainer query in candidateEdges_(). Same-multiplier (n1==n2) uses existing binary search path unchanged. Cross-multiplier (n1!=n2) uses queryMultimer() with exact algebraic M cancellation. Extract hit processing into lambda for shared use by both paths. Apply multimer_log_penalty to edge score for cross-multiplier edges. Set multiplier info on ChargePair for downstream annotation. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…labels Pass mol_multiplier from ChargePair through annotate_feature_() to produce [2M+H]+ style adduct strings via static Adduct::toAdductString. Set mol_multiplier metadata on features with multiplier > 1. Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add end-to-end integration test for cross-adduct multimer detection ([M+Na]+ monomer / [2M+H]+ dimer) with regression test for max_multimer=1 backward compatibility - Fix ILP penalty: use multiplicative exp(penalty) instead of additive to keep edge scores positive for the ILP maximizer - Skip redundant same-multiplier queries (n1=n2>1 produces identical edges to n1=n2=1 since M cancels identically) - Eliminate toAdductString code duplication: 2-param delegates to 3-param Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…duct multimers Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Same-adduct multimer [M+H]+ / [2M+H]+ (identity compomers) - Annotation strings and trimer detection (n=3) - Extreme penalty suppresses multimer edge selection - Negative mode multimer [M-H]- / [2M-H]- - Mixed-charge multimer [M+H]+ / [2M+2H]2+ Co-Authored-By: Claude Opus 4.6 <[email protected]>
…st assertions - Add missing max_neutrals_ to assignment operator (pre-existing bug) - Make adducts annotation checks unconditional in trimer test Co-Authored-By: Claude Opus 4.6 <[email protected]>
…loop Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
ddb15e0 to
e8cc79c
Compare
📝 WalkthroughWalkthroughAdds multimer (molecule-multiplier) support across deconvolution and mass-explanation: multiplier-aware querying, edge generation, metadata propagation, adduct-string formatting, and tests; propagates mol_multiplier through ChargePair, Compomer, MassExplainer, Adduct, ILP wrapper, and MetaboliteFeatureDeconvolution. Changes
Sequence DiagramsequenceDiagram
participant Input as rgba(100,150,240,0.5)
participant Deconv as rgba(240,200,80,0.5)
participant MassExp as rgba(160,200,120,0.5)
participant EdgeMgr as rgba(200,140,220,0.5)
participant CP as rgba(220,120,120,0.5)
participant Annot as rgba(120,180,200,0.5)
Input->>Deconv: provide FeatureMap
Deconv->>Deconv: iterate multiplier combos (n1,n2)
alt same-multiplier (n1 == n2)
Deconv->>MassExp: query (adjusted tolerance)
MassExp-->>Deconv: compomer hits
else cross-multiplier (n1 != n2)
Deconv->>MassExp: queryMultimer(net_charge,m1,m2,n1,n2,...)
MassExp-->>Deconv: compomer hits
end
Deconv->>EdgeMgr: create edges with mol_multiplier metadata
EdgeMgr->>CP: set/get mol_multiplier on ChargePair
EdgeMgr-->>Deconv: edges (scored, penalized)
Deconv->>Annot: annotate_feature_(..., mol_multiplier)
Annot-->>Input: annotated FeatureMap (adduct strings, mol_multiplier metadata)
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Replace pre-existing std::cout with OPENMS_LOG_DEBUG in MassExplainer - Remove redundant best_hit tracking in same-multiplier path - Tighten integration test assertions to verify exact group sizes - Add queryMultimer unit test with non-zero net_charge Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/openms/include/OpenMS/DATASTRUCTURES/Compomer.h (1)
244-252: Minor: Add direction indicator to@paramtag.The Doxygen comment is well-structured, but per coding guidelines,
@paramtags should include direction indicators ([in],[out], or[in,out]).📝 Suggested fix
/** `@brief` Get total adduct mass on a specific side Computes sum of amount * singleMass for all adducts on the given side. - `@param` side Which side (LEFT or RIGHT) + `@param`[in] side Which side (LEFT or RIGHT) `@return` Total adduct mass contribution on that side */ double getSideMass(const UInt side) const;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/DATASTRUCTURES/Compomer.h` around lines 244 - 252, Update the Doxygen for getSideMass to mark the parameter direction: modify the `@param` tag for the parameter 'side' in the getSideMass(const UInt side) declaration to include the direction indicator (e.g., "@param[in] side Which side (LEFT or RIGHT)"), keeping the rest of the description unchanged.src/openms/include/OpenMS/DATASTRUCTURES/Adduct.h (1)
72-74: Add complete Doxygen documentation for the new static method.The new overload should have proper Doxygen documentation with
@briefand@paramtags as required by coding guidelines.📝 Suggested documentation
- /// Convert to adduct string with explicit multiplier (e.g., mol_multiplier=2 -> "[2M+H]+") - static String toAdductString(const String& ion_string, const Int& charge, Int mol_multiplier); + /** + `@brief` Convert to adduct string with explicit multiplier + + Generates adduct notation string with molecular multiplier prefix when > 1 + (e.g., mol_multiplier=2 -> "[2M+H]+"). + + `@param`[in] ion_string Chemical formula of the adduct ion (e.g., "H1", "Na1") + `@param`[in] charge Charge state of the adduct + `@param`[in] mol_multiplier Molecular multiplier (1=monomer, 2=dimer, etc.) + `@return` Formatted adduct string (e.g., "[M+H]+", "[2M+Na]+") + */ + static String toAdductString(const String& ion_string, const Int& charge, Int mol_multiplier);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/DATASTRUCTURES/Adduct.h` around lines 72 - 74, Add full Doxygen for the new static overload toAdductString: add an `@brief` describing that it converts an ion string, charge, and explicit molecule multiplier into an adduct string (e.g., mol_multiplier=2 -> "[2M+H]+"), and include `@param` tags for ion_string, charge, and mol_multiplier describing types/roles and expected values, plus an `@return` describing the returned String; update the declaration of toAdductString(const String& ion_string, const Int& charge, Int mol_multiplier) in Adduct.h with this documentation immediately above the method.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/openms/include/OpenMS/DATASTRUCTURES/Adduct.h`:
- Around line 72-74: Add full Doxygen for the new static overload
toAdductString: add an `@brief` describing that it converts an ion string, charge,
and explicit molecule multiplier into an adduct string (e.g., mol_multiplier=2
-> "[2M+H]+"), and include `@param` tags for ion_string, charge, and
mol_multiplier describing types/roles and expected values, plus an `@return`
describing the returned String; update the declaration of toAdductString(const
String& ion_string, const Int& charge, Int mol_multiplier) in Adduct.h with this
documentation immediately above the method.
In `@src/openms/include/OpenMS/DATASTRUCTURES/Compomer.h`:
- Around line 244-252: Update the Doxygen for getSideMass to mark the parameter
direction: modify the `@param` tag for the parameter 'side' in the
getSideMass(const UInt side) declaration to include the direction indicator
(e.g., "@param[in] side Which side (LEFT or RIGHT)"), keeping the rest of the
description unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c93edd6d-d899-412b-b295-2071eb462035
📒 Files selected for processing (15)
src/openms/include/OpenMS/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.hsrc/openms/include/OpenMS/DATASTRUCTURES/Adduct.hsrc/openms/include/OpenMS/DATASTRUCTURES/ChargePair.hsrc/openms/include/OpenMS/DATASTRUCTURES/Compomer.hsrc/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.hsrc/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cppsrc/openms/source/DATASTRUCTURES/Adduct.cppsrc/openms/source/DATASTRUCTURES/ChargePair.cppsrc/openms/source/DATASTRUCTURES/Compomer.cppsrc/openms/source/DATASTRUCTURES/MassExplainer.cppsrc/tests/class_tests/openms/source/Adduct_test.cppsrc/tests/class_tests/openms/source/ChargePair_test.cppsrc/tests/class_tests/openms/source/Compomer_test.cppsrc/tests/class_tests/openms/source/MassExplainer_test.cppsrc/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp (1)
332-345:⚠️ Potential issue | 🟡 MinorReset
mol_multiplierwhen the current assignment is monomeric.This key is only written in the first-annotation branch. If
fm_inalready carriesmol_multiplierfrom a previous decharging pass, a feature that is now monomeric or singleton keeps the old dimer/trimer tag becausecompute()only clearsDC_CHARGE_ADDUCTS; the existing-meta path also never validates multiplier consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp` around lines 332 - 345, The code currently only writes "mol_multiplier" when mol_multiplier>1 in the new-annotation path, leaving stale mol_multiplier metadata on monomeric assignments; update the logic around fm_out[f_idx] (inside the block checking Constants::UserParam::DC_CHARGE_ADDUCTS and its else) so that whenever mol_multiplier==1 you explicitly clear the existing "mol_multiplier" meta value (or set it to 1 consistently) and when mol_multiplier>1 you set it as before; ensure this change is applied both in the branch that validates an existing DC_CHARGE_ADDUCTS (where ef_.toString() matches) and in the branch that sets DC_CHARGE_ADDUCTS (the else), so compute() will not leave old dimer/trimer tags on monomeric features.
🧹 Nitpick comments (1)
src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp (1)
511-512: Brace the new guard clauses.The newly added
if (...) return;/if (...) continue;guards here don't follow the repo's C++ style and make an already dense lambda harder to scan.As per coding guidelines,
**/*.{h,cpp}files should "use braces even for single-line blocks".Also applies to: 526-527, 556-557, 605-605
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp` around lines 511 - 512, The lambda in MetaboliteFeatureDeconvolution.cpp contains single-line guard clauses like "if (fabs(f1.getRT() - f2.getRT() + hit_cmp.getRTShift()) > rt_diff_max_local) return;" (and similar guards using "continue") that violate the repo style; update each of these guards (the ones referencing f1, f2, hit_cmp.getRTShift(), rt_diff_max_local and the other similar checks reported) to use braced blocks (e.g. if (cond) { return; } or if (cond) { continue; }) so the lambda follows the "use braces even for single-line blocks" guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp`:
- Around line 417-418: The n1==n2 branch is picking up zero-shift identity
compomers that me.compute(/*include_identity=*/ max_multimer > 1) injects when
max_multimer>1, causing false same-charge edges; modify the n1==n2 handling so
that me.query(...) ignores identity hits (filter out compomers with zero shift
or marked identity) or instantiate/use a MassExplainer configured with
include_identity=false for the ordinary (non-multimer) query path; specifically
update the code around the me.query call and the MassExplainer usage so identity
compomers are excluded (or a non-identity MassExplainer is used) when collecting
edges in the n1==n2 branch (also apply the same fix to the analogous block
covering lines 596-618).
---
Outside diff comments:
In `@src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp`:
- Around line 332-345: The code currently only writes "mol_multiplier" when
mol_multiplier>1 in the new-annotation path, leaving stale mol_multiplier
metadata on monomeric assignments; update the logic around fm_out[f_idx] (inside
the block checking Constants::UserParam::DC_CHARGE_ADDUCTS and its else) so that
whenever mol_multiplier==1 you explicitly clear the existing "mol_multiplier"
meta value (or set it to 1 consistently) and when mol_multiplier>1 you set it as
before; ensure this change is applied both in the branch that validates an
existing DC_CHARGE_ADDUCTS (where ef_.toString() matches) and in the branch that
sets DC_CHARGE_ADDUCTS (the else), so compute() will not leave old dimer/trimer
tags on monomeric features.
---
Nitpick comments:
In `@src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cpp`:
- Around line 511-512: The lambda in MetaboliteFeatureDeconvolution.cpp contains
single-line guard clauses like "if (fabs(f1.getRT() - f2.getRT() +
hit_cmp.getRTShift()) > rt_diff_max_local) return;" (and similar guards using
"continue") that violate the repo style; update each of these guards (the ones
referencing f1, f2, hit_cmp.getRTShift(), rt_diff_max_local and the other
similar checks reported) to use braced blocks (e.g. if (cond) { return; } or if
(cond) { continue; }) so the lambda follows the "use braces even for single-line
blocks" guideline.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b9ff3ff5-e73a-4d92-af9a-ccb0e583e70c
📒 Files selected for processing (4)
src/openms/source/ANALYSIS/DECHARGING/MetaboliteFeatureDeconvolution.cppsrc/openms/source/DATASTRUCTURES/MassExplainer.cppsrc/tests/class_tests/openms/source/MassExplainer_test.cppsrc/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
- src/tests/class_tests/openms/source/MassExplainer_test.cpp
|
I think there are still two correctness gaps here if the goal is practical multimer detection in metabolomics workflows.
My take:
|
…ry assignments
Without the multiplier in the variant key, the ILP could activate edges
that assign the same feature different multipliers simultaneously (e.g.,
both monomer and dimer). Adding _m{multiplier} to the variant string
forces the solver to choose a single consistent interpretation per feature.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp (1)
779-838: Consider adding annotation verification for consistency.The test correctly validates that mixed-charge multimers ([M+H]+ ↔ [2M+2H]2+) are detected and grouped. However, unlike the other multimer tests, this one doesn't verify the
mol_multiplierannotation. Adding a check similar to lines 766-775 would improve consistency and ensure the annotation path works correctly for mixed-charge cases.✏️ Suggested addition after line 836
TEST_EQUAL(group_count, 1); TEST_EQUAL(group_size, 2); + + // Verify dimer annotation exists + bool found_dimer = false; + for (Size i = 0; i < fm_out.size(); ++i) + { + if (fm_out[i].metaValueExists("mol_multiplier")) + { + TEST_EQUAL((Int)fm_out[i].getMetaValue("mol_multiplier"), 2); + found_dimer = true; + } + } + TEST_EQUAL(found_dimer, true); } END_SECTION🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp` around lines 779 - 838, The test misses verifying the multimer annotation for the mixed-charge grouping; after compute(...) inspect the grouped ConsensusFeature in cm_out (the one with size 2) and assert its meta-value "mol_multiplier" (or the same key used by MetaboliteFeatureDeconvolution for multiplier annotations) equals "2" (or the expected multiplier for the dimer) to match other tests' checks; locate the group by iterating cm_out, find the ConsensusFeature with size() >= 2 and use its getMetaValue("mol_multiplier") (or equivalent key) and add a TEST_EQUAL comparing it to the expected string/integer value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp`:
- Around line 779-838: The test misses verifying the multimer annotation for the
mixed-charge grouping; after compute(...) inspect the grouped ConsensusFeature
in cm_out (the one with size 2) and assert its meta-value "mol_multiplier" (or
the same key used by MetaboliteFeatureDeconvolution for multiplier annotations)
equals "2" (or the expected multiplier for the dimer) to match other tests'
checks; locate the group by iterating cm_out, find the ConsensusFeature with
size() >= 2 and use its getMetaValue("mol_multiplier") (or equivalent key) and
add a TEST_EQUAL comparing it to the expected string/integer value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d46a1461-7c4a-4cbd-a067-c75522630f4a
📒 Files selected for processing (2)
src/openms/source/ANALYSIS/DECHARGING/ILPDCWrapper.cppsrc/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp
…multimers The identity compomer loop previously only generated A1_LEFT/A1_RIGHT, which limited multimer detection to same-charge pairs like [M+H]+ <-> [2M+H]+. Now enumerates Ai_LEFT/Aj_RIGHT for all valid amounts (bounded by charge_max), enabling detection of charge-changing multimers like [M+H]+ <-> [2M+2H]2+ common in lipidomics (e.g. phospholipid dimers with divalent cations). Tightens the mixed-charge test tolerance from 0.5 to 0.01 Da so the correct H1_LEFT/H2_RIGHT compomer is required (the old loose tolerance allowed a spurious match via H1_RIGHT with ~1 Da residual). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Scoring analysis: are the defaults reasonable?Checked whether the ILP scoring model correctly prefers simpler (monomer) interpretations over multimer ones by default. Score computation per edge
Default adduct probabilities
Default multimer penalty: -2.0 per step
Does the more likely interpretation win?Yes. Concrete example with three competing edges for the same feature:
Even the least probable monomer adduct (K+, score=0.04) beats the most probable dimer (H+, score=0.022). The multimer penalty of -2.0 is the main discriminator — it makes monomer interpretations ~5–7× more favorable than dimers at the same adduct probability. The identity compomer (H1_L/H1_R) pays the H+ probability twice (once per side), giving For lipidomics workflows where dimers are more prevalent, users can increase |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.h (1)
185-210: Documentation statesn2"must differ from n1" but this isn't enforced.Line 197 says n2 "must differ from n1", but the implementation performs no such validation. Mathematically, n1==n2 is a degenerate case better handled by
query(), so either add an assertion/early-return in the implementation, or soften the documentation to "should differ" or "typically differs".🛠️ Option A: Soften documentation
- `@param`[in] n2 Molecular multiplier for feature 2 (must differ from n1) + `@param`[in] n2 Molecular multiplier for feature 2 (typically differs from n1; same-multiplier cases are better served by query())🛠️ Option B: Enforce in implementation (MassExplainer.cpp)
SignedSize MassExplainer::queryMultimer(const Int net_charge, const double m1, const double m2, const Int n1, const Int n2, const double tolerance, const float thresh_log_p, std::vector<CompomerIterator>& hits) const { hits.clear(); + if (n1 == n2) + { + return 0; // same-multiplier: use query() instead + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.h` around lines 185 - 210, The documentation for queryMultimer claims n2 "must differ from n1" but the implementation doesn't enforce it; update the implementation (MassExplainer.cpp) to handle this degenerate case by checking if n1 == n2 at the start of MassExplainer::queryMultimer and returning 0 (no hits) or otherwise short-circuiting (or assert if preferred), ensuring hits is left empty and no further computation runs; reference the queryMultimer function signature and add the early-return/assert at the top of that function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.h`:
- Around line 185-210: The documentation for queryMultimer claims n2 "must
differ from n1" but the implementation doesn't enforce it; update the
implementation (MassExplainer.cpp) to handle this degenerate case by checking if
n1 == n2 at the start of MassExplainer::queryMultimer and returning 0 (no hits)
or otherwise short-circuiting (or assert if preferred), ensuring hits is left
empty and no further computation runs; reference the queryMultimer function
signature and add the early-return/assert at the top of that function.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f71e06c3-339a-432f-9572-ce0b8b0ca9ff
📒 Files selected for processing (3)
src/openms/include/OpenMS/DATASTRUCTURES/MassExplainer.hsrc/openms/source/DATASTRUCTURES/MassExplainer.cppsrc/tests/class_tests/openms/source/MetaboliteFeatureDeconvolution_test.cpp
- install-win.doxygen: replace Qt6Networkd.dll example with Qt6Cored.dll; Qt::Network was removed from the core library in #8841 (replaced by libcurl), so non-GUI TOPP tools no longer depend on Qt6Network.dll. Qt6Core.dll is still required by all Qt-dependent executables. - MetaboliteAdductDecharger.cpp + TOPP.doxygen: document new multimer detection capability added in #8888. The max_multimer parameter (default 1, backward-compatible) enables detection of dimers, trimers, etc. (e.g. [M+H]+ <-> [2M+2H]2+). Updated brief description, page description, and TOPP tool listing. Co-authored-by: Copilot <[email protected]>
#8895) - install-win.doxygen: replace Qt6Networkd.dll example with Qt6Cored.dll; Qt::Network was removed from the core library in #8841 (replaced by libcurl), so non-GUI TOPP tools no longer depend on Qt6Network.dll. Qt6Core.dll is still required by all Qt-dependent executables. - MetaboliteAdductDecharger.cpp + TOPP.doxygen: document new multimer detection capability added in #8888. The max_multimer parameter (default 1, backward-compatible) enables detection of dimers, trimers, etc. (e.g. [M+H]+ <-> [2M+2H]2+). Updated brief description, page description, and TOPP tool listing. Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Add missing changelog entries for changes merged in the past 7 days: - PyOpenMS: PeptideAndProteinQuant.getPeptideResults/getProteinResults exposed (#8543) - PyOpenMS BREAKING: zero-copy _mv methods renamed to _view (#8857) - TOPP BREAKING: FeatureFinderMultiplex/MultiplexResolver parameter missed_cleavages renamed to max_nr_labelled_aas (#8911) - TOPP: MaRaClusterAdapter annotates consensus spectra with native IDs and cluster metadata (#8864) - TOPP: MetaboliteAdductDecharger adds multimer detection (#8888) - OpenMS Library BREAKING: ChromatogramPeak::IntensityType changed double -> float (#8857) - Build: CMake 4.x compat fix for Windows packaging (#8880) - Build: Fix pyOpenMS dev build RPATH (#8892) - Build: Correctly locate locally installed nanobind (#8874) Co-authored-by: Copilot <[email protected]>
Add missing changelog entries for changes merged in the past 7 days: - PyOpenMS: PeptideAndProteinQuant.getPeptideResults/getProteinResults exposed (#8543) - PyOpenMS BREAKING: zero-copy _mv methods renamed to _view (#8857) - TOPP BREAKING: FeatureFinderMultiplex/MultiplexResolver parameter missed_cleavages renamed to max_nr_labelled_aas (#8911) - TOPP: MaRaClusterAdapter annotates consensus spectra with native IDs and cluster metadata (#8864) - TOPP: MetaboliteAdductDecharger adds multimer detection (#8888) - OpenMS Library BREAKING: ChromatogramPeak::IntensityType changed double -> float (#8857) - Build: CMake 4.x compat fix for Windows packaging (#8880) - Build: Fix pyOpenMS dev build RPATH (#8892) - Build: Correctly locate locally installed nanobind (#8874) Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
Summary
max_multimerparameter (default=1, fully backward compatible)n2*m1 - n1*m2 = n2*left_adduct - n1*right_adductwhere neutral mass M cancels exactly[2M+H]+,[3M+Na]+) andmol_multipliermetadatamultimer_log_penaltyparameter to weight multimer edges lower than monomer explanations in ILP optimizationChanges
New APIs:
Compomer::getSideMass()— per-side adduct mass for algebraic matchingMassExplainer::queryMultimer()— cross-multiplier query via linear scan within net_charge groupAdduct::toAdductString(formula, charge, mol_multiplier)— static overload for multimer annotationChargePair::getMolMultiplier()/setMolMultiplier()— multiplier fields per feature in edgeCore changes:
candidateEdges_()refactored withprocessHitlambda and n1/n2 multiplier loopannotate_feature_()uses multiplier from ChargePair for[nM+X]+notation and metadataDesign decisions
exp(log_penalty)to keep ILP edge scores positiveTest plan
Compomer::getSideMass,ChargePairmultiplier fields,Adduct::toAdductStringwith multiplier,MassExplainer::queryMultimer[M+Na]+/[2M+H]+detected and annotatedmax_multimer=1produces no multimer groupings🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests