OpenMS
Loading...
Searching...
No Matches
AbsoluteQuantitationStandards Class Reference

Bridges sample-level concentration tables with the FeatureMap output of a feature finder, for building calibration curves used in absolute quantitation. More...

#include <OpenMS/METADATA/AbsoluteQuantitationStandards.h>

Classes

struct  featureConcentration
 One target component matched to a feature in the corresponding FeatureMap, paired with its known concentration. More...
 
struct  runConcentration
 One (sample, target, internal-standard, concentration) entry as provided by the user. More...
 

Public Member Functions

 AbsoluteQuantitationStandards ()=default
 Default constructor.
 
 ~AbsoluteQuantitationStandards ()=default
 Destructor.
 
void mapComponentsToConcentrations (const std::vector< AbsoluteQuantitationStandards::runConcentration > &run_concentrations, const std::vector< FeatureMap > &feature_maps, std::map< std::string, std::vector< AbsoluteQuantitationStandards::featureConcentration > > &components_to_concentrations) const
 Match each runConcentration to a feature in feature_maps and produce one featureConcentration record per match, keyed by component name.
 
void getComponentFeatureConcentrations (const std::vector< AbsoluteQuantitationStandards::runConcentration > &run_concentrations, const std::vector< FeatureMap > &feature_maps, const std::string &component_name, std::vector< AbsoluteQuantitationStandards::featureConcentration > &feature_concentrations) const
 Return the featureConcentration records for a single component name.
 

Private Member Functions

bool findComponentFeature_ (const FeatureMap &feature_map, const std::string &component_name, Feature &feature_found) const
 Locate a subordinate feature whose "native_id" meta value equals component_name.
 

Detailed Description

Bridges sample-level concentration tables with the FeatureMap output of a feature finder, for building calibration curves used in absolute quantitation.

The user supplies a list of runConcentration entries – one per (sample, target component, internal-standard) triple with the known concentrations – together with the FeatureMap instances produced for each sample. The class then locates each component (and its internal standard, when given) in the matching FeatureMap and pairs it with the entry's concentration, yielding featureConcentration records that downstream calibration code can consume.


Class Documentation

◆ OpenMS::AbsoluteQuantitationStandards::featureConcentration

struct OpenMS::AbsoluteQuantitationStandards::featureConcentration

One target component matched to a feature in the corresponding FeatureMap, paired with its known concentration.

Produced by mapComponentsToConcentrations and getComponentFeatureConcentrations.

Collaboration diagram for AbsoluteQuantitationStandards::featureConcentration:
[legend]
Class Members
double actual_concentration Copied from runConcentration::actual_concentration.
string concentration_units Copied from runConcentration::concentration_units.
double dilution_factor Copied from runConcentration::dilution_factor.
Feature feature Subordinate feature found in the matching FeatureMap (see mapComponentsToConcentrations for the match rule).
double IS_actual_concentration Copied from runConcentration::IS_actual_concentration.
Feature IS_feature Subordinate feature for the internal standard. Default-constructed when runConcentration::IS_component_name was empty or no IS subordinate was found.

◆ OpenMS::AbsoluteQuantitationStandards::runConcentration

struct OpenMS::AbsoluteQuantitationStandards::runConcentration

One (sample, target, internal-standard, concentration) entry as provided by the user.

Typically populated from a calibration-table file before the standards are mapped to feature data.

Collaboration diagram for AbsoluteQuantitationStandards::runConcentration:
[legend]
Class Members
double actual_concentration Known concentration of the target component in this sample.
string component_name Identifier of the target component (matched against subordinate-feature meta value "native_id").
string concentration_units Units the concentration values are expressed in.
double dilution_factor Sample dilution factor.
double IS_actual_concentration Known concentration of the internal standard in this sample.
string IS_component_name Identifier of the paired internal standard, or empty if there is none.
string sample_name Sample identifier; matched against FeatureMap::getPrimaryMSRunPath after stripping a .mzML or .txt suffix.

Constructor & Destructor Documentation

◆ AbsoluteQuantitationStandards()

Default constructor.

◆ ~AbsoluteQuantitationStandards()

Destructor.

Member Function Documentation

◆ findComponentFeature_()

bool findComponentFeature_ ( const FeatureMap feature_map,
const std::string &  component_name,
Feature feature_found 
) const
private

Locate a subordinate feature whose "native_id" meta value equals component_name.

Walks every Feature in feature_map and, for each, its subordinates; the first subordinate whose "native_id" meta value equals component_name is copied into feature_found.

Parameters
[in]feature_mapFeatures to search (top-level features and their subordinates).
[in]component_nameRequired value of the subordinate's "native_id" meta value.
[out]feature_foundThe matching subordinate feature; only written on a successful return.
Returns
true if a matching subordinate was found, false otherwise.

◆ getComponentFeatureConcentrations()

void getComponentFeatureConcentrations ( const std::vector< AbsoluteQuantitationStandards::runConcentration > &  run_concentrations,
const std::vector< FeatureMap > &  feature_maps,
const std::string &  component_name,
std::vector< AbsoluteQuantitationStandards::featureConcentration > &  feature_concentrations 
) const

Return the featureConcentration records for a single component name.

Equivalent to filtering run_concentrations down to entries whose component_name matches component_name and running mapComponentsToConcentrations on the result; the records for component_name are then written to feature_concentrations. If no matching record is produced, feature_concentrations is left unchanged.

Parameters
[in]run_concentrationsCalibration entries to filter.
[in]feature_mapsFeature maps to search.
[in]component_nameOnly entries with this component name are considered.
[out]feature_concentrationsResult vector; only assigned when at least one match is produced.

◆ mapComponentsToConcentrations()

void mapComponentsToConcentrations ( const std::vector< AbsoluteQuantitationStandards::runConcentration > &  run_concentrations,
const std::vector< FeatureMap > &  feature_maps,
std::map< std::string, std::vector< AbsoluteQuantitationStandards::featureConcentration > > &  components_to_concentrations 
) const

Match each runConcentration to a feature in feature_maps and produce one featureConcentration record per match, keyed by component name.

For every entry in run_concentrations:

  • Entries with an empty sample_name or component_name are skipped.
  • A FeatureMap from feature_maps is considered a candidate when its first FeatureMap::getPrimaryMSRunPath entry, with a trailing .mzML or .txt suffix removed, equals the entry's sample_name. When the primary-run-path list is empty the candidate is accepted unconditionally.
  • Within the chosen FeatureMap, the target component is located as a subordinate feature whose "native_id" meta value equals component_name. If no such subordinate exists, the entry is skipped.
  • When IS_component_name is non-empty, the same subordinate lookup is performed for the internal standard, but the entry is kept even when the IS lookup fails (the resulting featureConcentration::IS_feature is then default-constructed).
  • At most one FeatureMap is matched per entry; matching stops at the first hit.
Parameters
[in]run_concentrationsCalibration entries to consider.
[in]feature_mapsFeature maps to search.
[out]components_to_concentrationsResult, keyed by component_name. Cleared at the start of the call.