An algorithm to search for exact mass matches from a spectrum against a database (e.g. HMDB).
More...
|
| AccurateMassSearchEngine () |
| Default constructor. More...
|
|
| ~AccurateMassSearchEngine () override |
| Default destructor. More...
|
|
void | queryByMZ (const double &observed_mz, const Int &observed_charge, const String &ion_mode, std::vector< AccurateMassSearchResult > &results, const EmpiricalFormula &observed_adduct=EmpiricalFormula()) const |
| search for a specific observed mass by enumerating all possible adducts and search M+X against database. If use_feature_adducts is activated, queryByMZ uses annotated, observed adducts as EmpiricalFormulas, restricting M+X candidates. More...
|
|
void | queryByFeature (const Feature &feature, const Size &feature_index, const String &ion_mode, std::vector< AccurateMassSearchResult > &results) const |
|
void | queryByConsensusFeature (const ConsensusFeature &cfeat, const Size &cf_index, const Size &number_of_maps, const String &ion_mode, std::vector< AccurateMassSearchResult > &results) const |
|
void | run (FeatureMap &, MzTab &) const |
|
void | run (FeatureMap &, MzTabM &) const |
|
void | run (ConsensusMap &, MzTab &) const |
|
void | init () |
| parse database and adduct files More...
|
|
Public Member Functions inherited from DefaultParamHandler |
| DefaultParamHandler (const String &name) |
| Constructor with name that is displayed in error messages. More...
|
|
| DefaultParamHandler (const DefaultParamHandler &rhs) |
| Copy constructor. More...
|
|
virtual | ~DefaultParamHandler () |
| Destructor. More...
|
|
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. More...
|
|
virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. More...
|
|
void | setParameters (const Param ¶m) |
| Sets the parameters. More...
|
|
const Param & | getParameters () const |
| Non-mutable access to the parameters. More...
|
|
const Param & | getDefaults () const |
| Non-mutable access to the default parameters. More...
|
|
const String & | getName () const |
| Non-mutable access to the name. More...
|
|
void | setName (const String &name) |
| Mutable access to the name. More...
|
|
const std::vector< String > & | getSubsections () const |
| Non-mutable access to the registered subsections. More...
|
|
| ProgressLogger () |
| Constructor. More...
|
|
virtual | ~ProgressLogger () |
| Destructor. More...
|
|
| ProgressLogger (const ProgressLogger &other) |
| Copy constructor. More...
|
|
ProgressLogger & | operator= (const ProgressLogger &other) |
| Assignment Operator. More...
|
|
void | setLogType (LogType type) const |
| Sets the progress log that should be used. The default type is NONE! More...
|
|
LogType | getLogType () const |
| Returns the type of progress log being used. More...
|
|
void | startProgress (SignedSize begin, SignedSize end, const String &label) const |
| Initializes the progress display. More...
|
|
void | setProgress (SignedSize value) const |
| Sets the current progress. More...
|
|
void | endProgress () const |
| Ends the progress display. More...
|
|
void | nextProgress () const |
| increment progress by 1 (according to range begin-end) More...
|
|
|
template<typename MAPTYPE > |
String | resolveAutoMode_ (const MAPTYPE &map) const |
| private member functions More...
|
|
void | parseMappingFile_ (const StringList &) |
|
void | parseStructMappingFile_ (const StringList &) |
|
void | parseAdductsFile_ (const String &filename, std::vector< AdductInfo > &result) |
|
void | searchMass_ (double neutral_query_mass, double diff_mass, std::pair< Size, Size > &hit_indices) const |
|
void | annotate_ (const std::vector< AccurateMassSearchResult > &, BaseFeature &) const |
| Add search results to a Consensus/Feature. More...
|
|
std::vector< AccurateMassSearchResult > | extractQueryResults_ (const Feature &feature, const Size &feature_index, const String &ion_mode_internal, Size &dummy_count) const |
| Extract query results from feature. More...
|
|
void | addMatchesToID_ (IdentificationData &id, const std::vector< AccurateMassSearchResult > &amr, const IdentificationData::InputFileRef &file_ref, const IdentificationData::ScoreTypeRef &mass_error_ppm_score_ref, const IdentificationData::ScoreTypeRef &mass_error_Da_score_ref, const IdentificationData::ProcessingStepRef &step_ref, BaseFeature &f) const |
| Add resulting matches to IdentificationData. More...
|
|
double | computeCosineSim_ (const std::vector< double > &x, const std::vector< double > &y) const |
|
double | computeIsotopePatternSimilarity_ (const Feature &feat, const EmpiricalFormula &form) const |
|
void | exportMzTab_ (const QueryResultsTable &overall_results, const Size number_of_maps, MzTab &mztab_out, const std::vector< String > &file_locations) const |
|
void | exportMzTabM_ (const FeatureMap &fmap, MzTabM &mztabm_out) const |
|
An algorithm to search for exact mass matches from a spectrum against a database (e.g. HMDB).
For each peak, neutral masses are reconstructed from observed (spectrum) m/z values by enumerating all possible adducts with matching charge. The resulting neutral masses (can be more than one, depending on list of possible adducts) are matched against masses from a database within a certain mass error (Da or ppm).
Supports any database which contains an identifier, chemical sum formula and (optional) mass. If masses in the database are not given (= set to 0), they are computed from sum formulas.
Both positive and negative ion mode is supported. Charge for (Consensus-)Features can be either positive or negative, but only the absolute value is used since many FeatureFinders will only report positive charges even in negative ion mode. Entities with charge=0 are treated as "unknown charge" and are tested with all potential adducts and subsequently matched against the database.
A file with a list of potential adducts can be given for each mode separately. Each line contains a chemical formula (plus quantor) and a charge (separated by semicolon), e.g. M+H;1+ The M can be preceded by a quantor (e.g.2M, 3M), implicitly assumed as 1. The chemical formula can contain multiple segments, separated by + or - operators, e.g. M+H-H2O;+1 (water loss in positive mode). Brackets are implicit per segment, i.e. M+H-H2O is parsed as M + (H) - (H2O). Each segment can also be preceded by a quantor, e.g. M+H-H2O would parse as M + (H) - 2x(H2O). If debug mode is enabled, the masses of each segment are printed for verification. In particular, typing H20 (twenty H) is different from H2O (water).
Ionization mode of the observed m/z values can be determined automatically if the input map (either FeatureMap or ConsensusMap) is annotated with a meta value, as done by FeatureFinderMetabo.