![]() |
OpenMS
|
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. | |
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.
| 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.
| 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. |
| 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.
| 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. |
|
default |
Default constructor.
|
default |
Destructor.
|
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.
| [in] | feature_map | Features to search (top-level features and their subordinates). |
| [in] | component_name | Required value of the subordinate's "native_id" meta value. |
| [out] | feature_found | The matching subordinate feature; only written on a successful return. |
true if a matching subordinate was found, false otherwise. | 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.
| [in] | run_concentrations | Calibration entries to filter. |
| [in] | feature_maps | Feature maps to search. |
| [in] | component_name | Only entries with this component name are considered. |
| [out] | feature_concentrations | Result vector; only assigned when at least one match is produced. |
| 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:
sample_name or component_name are skipped.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."native_id" meta value equals component_name. If no such subordinate exists, the entry is skipped.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).| [in] | run_concentrations | Calibration entries to consider. |
| [in] | feature_maps | Feature maps to search. |
| [out] | components_to_concentrations | Result, keyed by component_name. Cleared at the start of the call. |