![]() |
OpenMS
|
One small-molecule hit produced by AccurateMassSearchEngine. More...
#include <OpenMS/ANALYSIS/ID/AccurateMassSearchEngine.h>
Public Member Functions | |
| AccurateMassSearchResult () | |
| Default constructor; all numeric fields zero, strings and vectors empty. | |
| ~AccurateMassSearchResult () | |
| Default destructor. | |
| AccurateMassSearchResult (const AccurateMassSearchResult &other) | |
| Copy constructor. | |
| AccurateMassSearchResult & | operator= (const AccurateMassSearchResult &other) |
| Copy-assignment operator. | |
| double | getObservedMZ () const |
| Observed m/z of the source feature (Th). | |
| void | setObservedMZ (const double &mz) |
| Set the observed m/z of the source feature. | |
| double | getCalculatedMZ () const |
| Theoretical m/z of the matched compound + adduct (Th). | |
| void | setCalculatedMZ (const double &mz) |
| Set the theoretical m/z of the matched compound + adduct. | |
| double | getQueryMass () const |
| Neutral mass used to query the database (Dalton), back- calculated from getObservedMZ assuming getFoundAdduct and getCharge. | |
| void | setQueryMass (const double &mass) |
| Set the neutral mass used to query the database. | |
| double | getFoundMass () const |
| Neutral mass of the matched database compound (Dalton). | |
| void | setFoundMass (const double &mass) |
| Set the neutral mass of the matched database compound. | |
| Int | getCharge () const |
| Ion charge under which this match was attempted (positive for cations, negative for anions). | |
| void | setCharge (const Int &ch) |
| Set the ion charge under which this match was attempted. | |
| double | getMZErrorPPM () const |
| Signed m/z error in ppm: (observed − theoretical) / theoretical · 1e6. | |
| void | setMZErrorPPM (const double ppm) |
| Set the signed m/z error in ppm. | |
| double | getObservedRT () const |
| Retention time of the source feature (seconds). | |
| void | setObservedRT (const double &rt) |
| Set the retention time of the source feature (seconds). | |
| double | getObservedIntensity () const |
| Intensity of the source feature (consensus-aggregated when the input was a ConsensusMap). | |
| void | setObservedIntensity (const double &intensity) |
| Set the intensity of the source feature. | |
| std::vector< double > | getIndividualIntensities () const |
| Per-sample intensities of the source feature when the input is a ConsensusMap; empty otherwise. | |
| void | setIndividualIntensities (const std::vector< double > &indiv_ints) |
| Set the per-sample intensities of the source feature. | |
| Size | getMatchingIndex () const |
| Index of this hit in the engine's internal candidate list for the source feature. Useful when reconstructing scoring details after export. | |
| void | setMatchingIndex (const Size &idx) |
| Set the candidate-list index. | |
| Size | getSourceFeatureIndex () const |
| Index of the source feature in the input map (back- reference to the raw observation). | |
| void | setSourceFeatureIndex (const Size &idx) |
| Set the source feature index. | |
| const std::string & | getFoundAdduct () const |
Adduct that produced the match, in AdductInfo notation (e.g. "M+H;1+", "M-H2O+H;1+"). | |
| void | setFoundAdduct (const std::string &add) |
| Set the adduct that produced the match. | |
| const std::string & | getFormulaString () const |
| Empirical formula of the matched database compound. | |
| void | setEmpiricalFormula (const std::string &ep) |
| Set the empirical formula of the matched database compound. | |
| const std::vector< std::string > & | getMatchingHMDBids () const |
| All database identifiers (HMDB-style) that share the matched compound's formula and mass; can be empty when no identifier mapping is available. | |
| void | setMatchingHMDBids (const std::vector< std::string > &ids) |
| Set the matched database identifiers. | |
| const std::vector< double > & | getMasstraceIntensities () const |
| Per-isotopologue intensities of the underlying feature's mass traces; used as the empirical isotope pattern when computing getIsotopesSimScore. | |
| void | setMasstraceIntensities (const std::vector< double > &intensities) |
| Set the underlying feature's per-isotopologue intensities. | |
| double | getIsotopesSimScore () const |
| Similarity between the observed isotope pattern (from getMasstraceIntensities) and the theoretical pattern of the matched compound. Higher values indicate a better match. | |
| void | setIsotopesSimScore (const double &score) |
| Set the isotope-pattern similarity score. | |
Private Attributes | |
| double | observed_mz_ |
| Stored information/results of DB query. | |
| double | theoretical_mz_ |
| theoretical m/z of matched compound + adduct (Th) | |
| double | searched_mass_ |
| neutral mass used to query the database (Da) | |
| double | db_mass_ |
| neutral mass of the matched database compound (Da) | |
| Int | charge_ |
| charge assumed for this match (positive for cations) | |
| double | mz_error_ppm_ |
| signed m/z error (observed − theoretical), ppm | |
| double | observed_rt_ |
| RT of source feature (s) | |
| double | observed_intensity_ |
| intensity of source feature | |
| std::vector< double > | individual_intensities_ |
| per-sample intensities (ConsensusMap input) | |
| Size | matching_index_ |
| index in the engine's internal candidate list | |
| Size | source_feature_index_ |
| index in the input feature/peak map | |
| std::string | found_adduct_ |
| adduct in AdductInfo notation (e.g. "M+H;1+") | |
| std::string | empirical_formula_ |
| empirical formula of matched compound | |
| std::vector< std::string > | matching_hmdb_ids_ |
| zero or more DB IDs (multiple isobars share a formula) | |
| std::vector< double > | mass_trace_intensities_ |
| per-isotopologue intensities from the feature | |
| double | isotopes_sim_score_ |
| observed vs. theoretical isotope-pattern similarity | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const AccurateMassSearchResult &amsr) |
| Diagnostic stream output of all fields (not a parseable serialization). | |
One small-molecule hit produced by AccurateMassSearchEngine.
Represents a single (observed feature/peak) — (database compound + adduct) match. AccurateMassSearchEngine emits one of these per accepted (feature, adduct, candidate-compound) combination, so the same input feature can appear in several results if it is consistent with more than one adduct or matches multiple isobaric compounds in the database.
Each result is built up incrementally by the search engine via the setters and exposed read-only to consumers via the getters. The class holds no logic of its own — it is a plain value object grouping the observable, the database hit, and the diagnostics that explain why the two were matched.
Observed quantities (from the spectrum / feature):
observed_mz : observed m/z of the feature.observed_rt : retention time of the feature.observed_intensity: intensity of the feature.individual_intensities : per-FeatureHandle intensities, populated only on the ConsensusMap overload of AccurateMassSearchEngine::run; stays empty when the engine is invoked on a plain FeatureMap.mass_trace_intensities : per-isotopologue intensities of the underlying mass traces (used for the isotope-pattern similarity score).Match-derived quantities:
searched_mass : neutral mass back-calculated from observed_mz under the assumption of found_adduct and charge. Used as the database query.db_mass : neutral mass of the matched database compound (the "ground truth" for this hit).theoretical_mz: m/z that the matched compound + adduct would produce; differs from observed_mz by mz_error_ppm.mz_error_ppm : signed m/z error in ppm, observed vs. theoretical.charge : ion charge under which the match was attempted (positive for cations, negative for anions).Compound annotation:
found_adduct : adduct that produced the match, in the notation used by AdductInfo (e.g. "M+H;1+", "M-H2O+H;1+").empirical_formula : empirical formula of the matched compound.matching_hmdb_ids : zero or more database IDs that share the formula and mass (multiple isobars are common in HMDB-style databases).Back-references:
matching_index : index of the hit within the engine's internal candidate list (useful when reconstructing scoring details after export).source_feature_index: index of the source feature/peak in the input map (lets callers traceback to the raw observation).Quality score:
isotopes_sim_score : isotope-pattern similarity between the feature's observed mass-trace intensities and the theoretical pattern of the candidate compound. Higher = better.Default constructor; all numeric fields zero, strings and vectors empty.
Default destructor.
| AccurateMassSearchResult | ( | const AccurateMassSearchResult & | other | ) |
Copy constructor.
| [in] | other | Source result to copy from. |
| double getCalculatedMZ | ( | ) | const |
Theoretical m/z of the matched compound + adduct (Th).
| Int getCharge | ( | ) | const |
Ion charge under which this match was attempted (positive for cations, negative for anions).
| const std::string & getFormulaString | ( | ) | const |
Empirical formula of the matched database compound.
| const std::string & getFoundAdduct | ( | ) | const |
Adduct that produced the match, in AdductInfo notation (e.g. "M+H;1+", "M-H2O+H;1+").
| double getFoundMass | ( | ) | const |
Neutral mass of the matched database compound (Dalton).
| std::vector< double > getIndividualIntensities | ( | ) | const |
Per-sample intensities of the source feature when the input is a ConsensusMap; empty otherwise.
| double getIsotopesSimScore | ( | ) | const |
Similarity between the observed isotope pattern (from getMasstraceIntensities) and the theoretical pattern of the matched compound. Higher values indicate a better match.
| const std::vector< double > & getMasstraceIntensities | ( | ) | const |
Per-isotopologue intensities of the underlying feature's mass traces; used as the empirical isotope pattern when computing getIsotopesSimScore.
| const std::vector< std::string > & getMatchingHMDBids | ( | ) | const |
All database identifiers (HMDB-style) that share the matched compound's formula and mass; can be empty when no identifier mapping is available.
| Size getMatchingIndex | ( | ) | const |
Index of this hit in the engine's internal candidate list for the source feature. Useful when reconstructing scoring details after export.
| double getMZErrorPPM | ( | ) | const |
Signed m/z error in ppm: (observed − theoretical) / theoretical · 1e6.
| double getObservedIntensity | ( | ) | const |
Intensity of the source feature (consensus-aggregated when the input was a ConsensusMap).
| double getObservedMZ | ( | ) | const |
Observed m/z of the source feature (Th).
| double getObservedRT | ( | ) | const |
Retention time of the source feature (seconds).
| double getQueryMass | ( | ) | const |
Neutral mass used to query the database (Dalton), back- calculated from getObservedMZ assuming getFoundAdduct and getCharge.
| Size getSourceFeatureIndex | ( | ) | const |
Index of the source feature in the input map (back- reference to the raw observation).
| AccurateMassSearchResult & operator= | ( | const AccurateMassSearchResult & | other | ) |
Copy-assignment operator.
| [in] | other | Source result to copy from. |
| void setCalculatedMZ | ( | const double & | mz | ) |
Set the theoretical m/z of the matched compound + adduct.
| [in] | mz | Theoretical m/z of compound + adduct (Th). |
| void setCharge | ( | const Int & | ch | ) |
Set the ion charge under which this match was attempted.
| [in] | ch | Signed ion charge (positive for cations). |
| void setEmpiricalFormula | ( | const std::string & | ep | ) |
Set the empirical formula of the matched database compound.
| [in] | ep | Empirical formula of the matched compound. |
| void setFoundAdduct | ( | const std::string & | add | ) |
Set the adduct that produced the match.
| [in] | add | Adduct in AdductInfo notation (e.g. "M+H;1+"). |
| void setFoundMass | ( | const double & | mass | ) |
Set the neutral mass of the matched database compound.
| [in] | mass | Neutral mass of the matched compound (Da). |
| void setIndividualIntensities | ( | const std::vector< double > & | indiv_ints | ) |
Set the per-sample intensities of the source feature.
| [in] | indiv_ints | Per-sample intensities (ConsensusMap input). |
| void setIsotopesSimScore | ( | const double & | score | ) |
Set the isotope-pattern similarity score.
| [in] | score | Isotope-pattern similarity score (higher = better. |
| void setMasstraceIntensities | ( | const std::vector< double > & | intensities | ) |
Set the underlying feature's per-isotopologue intensities.
| [in] | intensities | Per-isotopologue intensities from the feature. |
| void setMatchingHMDBids | ( | const std::vector< std::string > & | ids | ) |
Set the matched database identifiers.
| [in] | ids | Database identifiers (HMDB-style). |
| void setMatchingIndex | ( | const Size & | idx | ) |
Set the candidate-list index.
| [in] | idx | Index in the engine's internal candidate list. |
| void setMZErrorPPM | ( | const double | ppm | ) |
Set the signed m/z error in ppm.
| [in] | ppm | Signed m/z error (observed − theoretical) in ppm. |
| void setObservedIntensity | ( | const double & | intensity | ) |
Set the intensity of the source feature.
| [in] | intensity | Intensity of the source feature. |
| void setObservedMZ | ( | const double & | mz | ) |
Set the observed m/z of the source feature.
| [in] | mz | Observed m/z (Th). |
| void setObservedRT | ( | const double & | rt | ) |
Set the retention time of the source feature (seconds).
| [in] | rt | Retention time of the source feature (s). |
| void setQueryMass | ( | const double & | mass | ) |
Set the neutral mass used to query the database.
| [in] | mass | Neutral mass used to query the database (Da). |
| void setSourceFeatureIndex | ( | const Size & | idx | ) |
Set the source feature index.
| [in] | idx | Index in the input feature/peak map. |
|
friend |
Diagnostic stream output of all fields (not a parseable serialization).
|
private |
charge assumed for this match (positive for cations)
|
private |
neutral mass of the matched database compound (Da)
|
private |
empirical formula of matched compound
|
private |
adduct in AdductInfo notation (e.g. "M+H;1+")
|
private |
per-sample intensities (ConsensusMap input)
|
private |
observed vs. theoretical isotope-pattern similarity
|
private |
per-isotopologue intensities from the feature
|
private |
zero or more DB IDs (multiple isobars share a formula)
|
private |
index in the engine's internal candidate list
|
private |
signed m/z error (observed − theoretical), ppm
|
private |
intensity of source feature
|
private |
Stored information/results of DB query.
observed m/z of source feature (Th)
|
private |
RT of source feature (s)
|
private |
neutral mass used to query the database (Da)
|
private |
index in the input feature/peak map
|
private |
theoretical m/z of matched compound + adduct (Th)