OpenMS
Loading...
Searching...
No Matches
FeatureFinderAlgorithmMetaboIdent::FeatureFinderMetaboIdentCompound Struct Reference

One target compound for the FeatureFinderAlgorithmMetaboIdent assay library. More...

#include <OpenMS/FEATUREFINDER/FeatureFinderAlgorithmMetaboIdent.h>

Collaboration diagram for FeatureFinderAlgorithmMetaboIdent::FeatureFinderMetaboIdentCompound:
[legend]

Public Member Functions

 FeatureFinderMetaboIdentCompound (const std::string &_name, const std::string &_formula, double _mass, const std::vector< int > &_charges, const std::vector< double > &_rts, const std::vector< double > &_rt_ranges, const std::vector< double > &_iso_distrib, const std::vector< double > &_ion_mobilities={}, const std::string &_adduct="")
 Construct a target compound by aggregating its identification data.
 
const std::string & getName () const
 Return the target name.
 
const std::string & getFormula () const
 Return the molecular formula (may be empty if only mass was provided).
 
double getMass () const
 Return the monoisotopic mass; <= 0 means "compute from @c formula at library-build time".
 
const std::vector< int > & getCharges () const
 Return the list of charge states to register for this target.
 
const std::vector< double > & getRTs () const
 Return the expected retention times (one library transition per entry).
 
const std::vector< double > & getRTRanges () const
 Return the RT tolerance per rts_ entry (or a single broadcast value, or empty for the algorithm default).
 
const std::vector< double > & getIsotopeDistribution () const
 Return the pre-computed isotope-intensity distribution (or empty / [0] for runtime computation from formula).
 
const std::vector< double > & getIonMobilities () const
 Return the optional ion-mobility values per rts_ entry (or a single broadcast value, or empty to disable IM filtering).
 
const std::string & getAdduct () const
 

Private Attributes

std::string name_
 Target name; used as the name meta value and in the auto-generated library ID.
 
std::string formula_
 Molecular formula; empty if the caller only provides mass_.
 
double mass_
 Monoisotopic mass; <= 0 means "compute from @c formula_".
 
std::vector< int > charges_
 Charge states to register; entries == 0 are dropped at library-build time.
 
std::vector< double > rts_
 Expected retention times; one library transition per entry.
 
std::vector< double > rt_ranges_
 RT tolerance per rts_ entry; one-element broadcasts, empty falls back to the algorithm default.
 
std::vector< double > iso_distrib_
 Optional pre-computed isotope-intensity distribution; empty (or [0]) triggers computation from formula_.
 
std::vector< double > ion_mobilities_
 Optional ion-mobility values per rts_ entry; one-element broadcasts, empty disables IM filtering.
 
std::string adduct_
 Adduct string (e.g. "M+H;1+", "M+Na;1+", "M-H;1-"). Empty lets downstream logic infer defaults from charge polarity.
 

Detailed Description

One target compound for the FeatureFinderAlgorithmMetaboIdent assay library.

Plain data container. No validation is performed in the constructor or accessors — the contract below is enforced when the compound is consumed by FeatureFinderAlgorithmMetaboIdent::run via the internal addTargetToLibrary_ helper. Compounds that violate the contract are silently dropped with an OPENMS_LOG_ERROR message at run time:

  • Either mass > 0 or a non-empty formula is required (one of the two must be present so the m/z can be derived).
  • rts must be non-empty.
  • For each entry in charges, the charge state must be non-zero.
  • rt_ranges (when provided) and ion_mobilities (when provided) must have either 1 entry (broadcast to every RT) or exactly rts.size() entries.

The struct stores the per-target data verbatim; the downstream library builder fills in defaults (e.g. RT range 0.0, ion mobility sentinel -1.0 for "no IM filter") and computes the isotope distribution from formula when iso_distrib is empty or its first entry is 0.

Constructor & Destructor Documentation

◆ FeatureFinderMetaboIdentCompound()

FeatureFinderMetaboIdentCompound ( const std::string &  _name,
const std::string &  _formula,
double  _mass,
const std::vector< int > &  _charges,
const std::vector< double > &  _rts,
const std::vector< double > &  _rt_ranges,
const std::vector< double > &  _iso_distrib,
const std::vector< double > &  _ion_mobilities = {},
const std::string &  _adduct = "" 
)
inline

Construct a target compound by aggregating its identification data.

Parameters
[in]_nameTarget name (used as a tag in the resulting assay library).
[in]_formulaMolecular formula (e.g. "C12H22O11"); empty when only _mass is provided.
[in]_massMonoisotopic mass; <= 0 means "derive from @p _formula".
[in]_chargesCharge states to register for this target; each non-zero entry produces one library transition.
[in]_rtsExpected retention times (one library entry per RT). Must be non-empty when the compound is fed into FeatureFinderAlgorithmMetaboIdent::run.
[in]_rt_rangesRT tolerance per RT (parallel to _rts); a one-element vector is broadcast, an empty vector uses the algorithm default.
[in]_iso_distribPre-computed isotope-intensity distribution; empty (or first entry 0) triggers computation from _formula at library-build time.
[in]_ion_mobilitiesOptional ion-mobility values (parallel to _rts); a one-element vector is broadcast, an empty vector disables IM filtering for this target.
[in]_adductAdduct string (e.g. "M+H;1+", "M+Na;1+"); empty lets downstream logic infer defaults from charge polarity.

Member Function Documentation

◆ getAdduct()

const std::string & getAdduct ( ) const
inline

◆ getCharges()

const std::vector< int > & getCharges ( ) const
inline

Return the list of charge states to register for this target.

◆ getFormula()

const std::string & getFormula ( ) const
inline

Return the molecular formula (may be empty if only mass was provided).

◆ getIonMobilities()

const std::vector< double > & getIonMobilities ( ) const
inline

Return the optional ion-mobility values per rts_ entry (or a single broadcast value, or empty to disable IM filtering).

◆ getIsotopeDistribution()

const std::vector< double > & getIsotopeDistribution ( ) const
inline

Return the pre-computed isotope-intensity distribution (or empty / [0] for runtime computation from formula).

◆ getMass()

double getMass ( ) const
inline

Return the monoisotopic mass; <= 0 means "compute from @c formula at library-build time".

◆ getName()

const std::string & getName ( ) const
inline

Return the target name.

◆ getRTRanges()

const std::vector< double > & getRTRanges ( ) const
inline

Return the RT tolerance per rts_ entry (or a single broadcast value, or empty for the algorithm default).

◆ getRTs()

const std::vector< double > & getRTs ( ) const
inline

Return the expected retention times (one library transition per entry).

Member Data Documentation

◆ adduct_

std::string adduct_
private

Adduct string (e.g. "M+H;1+", "M+Na;1+", "M-H;1-"). Empty lets downstream logic infer defaults from charge polarity.

◆ charges_

std::vector<int> charges_
private

Charge states to register; entries == 0 are dropped at library-build time.

◆ formula_

std::string formula_
private

Molecular formula; empty if the caller only provides mass_.

◆ ion_mobilities_

std::vector<double> ion_mobilities_
private

Optional ion-mobility values per rts_ entry; one-element broadcasts, empty disables IM filtering.

◆ iso_distrib_

std::vector<double> iso_distrib_
private

Optional pre-computed isotope-intensity distribution; empty (or [0]) triggers computation from formula_.

◆ mass_

double mass_
private

Monoisotopic mass; <= 0 means "compute from @c formula_".

◆ name_

std::string name_
private

Target name; used as the name meta value and in the auto-generated library ID.

◆ rt_ranges_

std::vector<double> rt_ranges_
private

RT tolerance per rts_ entry; one-element broadcasts, empty falls back to the algorithm default.

◆ rts_

std::vector<double> rts_
private

Expected retention times; one library transition per entry.