OpenMS
Loading...
Searching...
No Matches
NuXLModificationMassesResult Struct Reference

Result of NuXLModificationsGenerator::initModificationMassesNA — empirical formulas with their monoisotopic mass and the disambiguating nucleotide-composition lookup. More...

#include <OpenNuXL/include/NuXLModificationsGenerator.h>

Classes

struct  MyStringLengthCompare
 Comparator that orders strings primarily by length (shortest first) and lexicographically within the same length. More...
 
struct  PrecursorAdduct
 Sum formula and precursor adduct (nucleotide composition) returned by findPrecursorAdduct. More...
 

Public Types

using NucleotideFormulas = std::set< std::string, MyStringLengthCompare >
 Length-ordered set of nucleotide-composition strings producing the same empirical formula.
 
using MapSumFormulaToNucleotideFormulas = std::map< std::string, NucleotideFormulas >
 Empirical formula → NucleotideFormulas.
 

Public Member Functions

PrecursorAdduct findPrecursorAdduct (Size NA_mod_index, Size NA_adduct_amb_index) const
 Looks up the precursor adduct that a hit refers to by its indices.
 

Public Attributes

std::map< std::string, double > formula2mass
 Empirical formula → monoisotopic mass.
 
MapSumFormulaToNucleotideFormulas mod_combinations
 Empirical formula → all nucleotide compositions yielding that formula (kept as a set because mutations / losses can make the mapping ambiguous).
 

Detailed Description

Result of NuXLModificationsGenerator::initModificationMassesNA — empirical formulas with their monoisotopic mass and the disambiguating nucleotide-composition lookup.

Two parallel maps keyed by the same empirical-formula string:

  • formula2mass — empirical formula → monoisotopic mass.
  • mod_combinations — empirical formula → set of nucleotide-composition strings that produce that formula. A set rather than a single value because different oligos can share a chemical formula, e.g. C18H22N4O16P2 → {CU-H3N1, UU-H2O1}.

The nested MyStringLengthCompare comparator orders the composition strings primarily by length and lexicographically within the same length so the shortest (most likely) composition appears first when iterating a value.


Class Documentation

◆ OpenMS::NuXLModificationMassesResult::PrecursorAdduct

struct OpenMS::NuXLModificationMassesResult::PrecursorAdduct

Sum formula and precursor adduct (nucleotide composition) returned by findPrecursorAdduct.

Class Members
const string * adduct = nullptr Entry in the set of nucleotide compositions with that sum formula, nullptr if not found.
const string * sum_formula = nullptr Key in mod_combinations, nullptr if not found.

Member Typedef Documentation

◆ MapSumFormulaToNucleotideFormulas

using MapSumFormulaToNucleotideFormulas = std::map<std::string, NucleotideFormulas>

Empirical formula → NucleotideFormulas.

◆ NucleotideFormulas

using NucleotideFormulas = std::set<std::string, MyStringLengthCompare>

Length-ordered set of nucleotide-composition strings producing the same empirical formula.

Member Function Documentation

◆ findPrecursorAdduct()

PrecursorAdduct findPrecursorAdduct ( Size  NA_mod_index,
Size  NA_adduct_amb_index 
) const
inline

Looks up the precursor adduct that a hit refers to by its indices.

Parameters
[in]NA_mod_indexIndex of the sum formula in mod_combinations.
[in]NA_adduct_amb_indexIndex of the adduct in the set of nucleotide compositions with that sum formula (e.g., 0 for C-H3N1 and 1 for U-H2O1).
Returns
Pointers to the sum formula and the adduct, both nullptr if either index is out of range.

References NuXLModificationMassesResult::mod_combinations.

Referenced by NuXLAnnotateAndLocate::annotateAndLocate_().

Member Data Documentation

◆ formula2mass

std::map<std::string, double> formula2mass

◆ mod_combinations

Empirical formula → all nucleotide compositions yielding that formula (kept as a set because mutations / losses can make the mapping ambiguous).

Referenced by NuXLModificationMassesResult::findPrecursorAdduct(), NuXLParameterParsing::getAllFeasibleFragmentAdducts(), and NuXLModificationsGenerator::initModificationMassesNA().