|
OpenMS
2.5.0
|
Go to the documentation of this file.
55 class EmpiricalFormula;
74 double getNeutralMass(
double observed_mz)
const;
77 double getMZ(
double neutral_mass)
const;
84 int getCharge()
const;
87 const String& getName()
const;
125 double getObservedMZ()
const;
128 void setObservedMZ(
const double&);
131 double getCalculatedMZ()
const;
134 void setCalculatedMZ(
const double&);
137 double getQueryMass()
const;
140 void setQueryMass(
const double&);
143 double getFoundMass()
const;
146 void setFoundMass(
const double&);
149 Int getCharge()
const;
152 void setCharge(
const Int&);
155 double getMZErrorPPM()
const;
158 void setMZErrorPPM(
const double);
161 double getObservedRT()
const;
164 void setObservedRT(
const double& rt);
167 double getObservedIntensity()
const;
170 void setObservedIntensity(
const double&);
173 std::vector<double> getIndividualIntensities()
const;
176 void setIndividualIntensities(
const std::vector<double>&);
178 Size getMatchingIndex()
const;
179 void setMatchingIndex(
const Size&);
181 Size getSourceFeatureIndex()
const;
182 void setSourceFeatureIndex(
const Size&);
184 const String& getFoundAdduct()
const;
185 void setFoundAdduct(
const String&);
187 const String& getFormulaString()
const;
188 void setEmpiricalFormula(
const String&);
190 const std::vector<String>& getMatchingHMDBids()
const;
191 void setMatchingHMDBids(
const std::vector<String>&);
194 const std::vector<double>& getMasstraceIntensities()
const;
195 void setMasstraceIntensities(
const std::vector<double>&);
197 double getIsotopesSimScore()
const;
198 void setIsotopesSimScore(
const double&);
274 void queryByMZ(
const double& observed_mz,
const Int& observed_charge,
const String& ion_mode, std::vector<AccurateMassSearchResult>& results,
const EmpiricalFormula& observed_adduct =
EmpiricalFormula())
const;
275 void queryByFeature(
const Feature& feature,
const Size& feature_index,
const String& ion_mode, std::vector<AccurateMassSearchResult>& results)
const;
276 void queryByConsensusFeature(
const ConsensusFeature& cfeat,
const Size& cf_index,
const Size& number_of_maps,
const String& ion_mode, std::vector<AccurateMassSearchResult>& results)
const;
291 void updateMembers_()
override;
301 String ion_mode_detect_msg =
"";
304 if (map[0].metaValueExists(
"scan_polarity"))
306 StringList pols = ListUtils::create<String>(
String(map[0].getMetaValue(
"scan_polarity")),
';');
307 if (pols.size() == 1 && pols[0].size() > 0)
310 if (pols[0] ==
"positive" || pols[0] ==
"negative")
312 ion_mode_internal = pols[0];
313 OPENMS_LOG_INFO <<
"Setting auto ion-mode to '" << ion_mode_internal <<
"' for file " <<
File::basename(map.getLoadedFilePath()) << std::endl;
315 else ion_mode_detect_msg =
String(
"Meta value 'scan_polarity' does not contain unknown ion mode") +
String(map[0].getMetaValue(
"scan_polarity"));
319 ion_mode_detect_msg =
String(
"ambiguous ion mode: ") +
String(map[0].getMetaValue(
"scan_polarity"));
324 ion_mode_detect_msg =
String(
"Meta value 'scan_polarity' not found in (Consensus-)Feature map");
329 OPENMS_LOG_INFO <<
"Meta value 'scan_polarity' cannot be determined since (Consensus-)Feature map is empty!" << std::endl;
332 if (ion_mode_detect_msg.size() > 0)
334 throw Exception::InvalidParameter(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
String(
"Auto ionization mode could not resolve ion mode of data (") + ion_mode_detect_msg +
"!");
337 return ion_mode_internal;
341 void parseStructMappingFile_(
const StringList&);
342 void parseAdductsFile_(
const String& filename, std::vector<AdductInfo>& result);
343 void searchMass_(
double neutral_query_mass,
double diff_mass, std::pair<Size, Size>& hit_indices)
const;
346 void annotate_(
const std::vector<AccurateMassSearchResult>&,
BaseFeature&)
const;
350 double computeCosineSim_(
const std::vector<double>& x,
const std::vector<double>& y)
const;
382 template <
typename T1,
typename T2>
385 return asMass(t1) < asMass(t2);
int charge_
negative or positive charge; must not be 0
Definition: AccurateMassSearchEngine.h:105
double isotopes_sim_score_
Definition: AccurateMassSearchEngine.h:222
String found_adduct_
Definition: AccurateMassSearchEngine.h:217
double asMass(double t) const
Definition: AccurateMassSearchEngine.h:377
Base class for TOPP applications.
Definition: TOPPBase.h:144
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
File adapter for MzTab files.
Definition: MzTabFile.h:58
double mass_
computed from ef_.getMonoWeight(), but stored explicitly for efficiency
Definition: AccurateMassSearchEngine.h:104
String pos_adducts_fname_
Definition: AccurateMassSearchEngine.h:400
double observed_mz_
Stored information/results of DB query.
Definition: AccurateMassSearchEngine.h:205
Int charge_
Definition: AccurateMassSearchEngine.h:209
void store(const String &filename, const ConsensusMap &consensus_map)
Stores a consensus map to file.
Definition: AccurateMassSearchEngine.h:362
An algorithm to search for exact mass matches from a spectrum against a database (e....
Definition: AccurateMassSearchEngine.h:258
std::vector< std::vector< AccurateMassSearchResult > > QueryResultsTable
Definition: AccurateMassSearchEngine.h:354
std::vector< double > individual_intensities_
Definition: AccurateMassSearchEngine.h:213
static String basename(const String &file)
Returns the basename of the file (without the path).
Definition: AccurateMassSearchEngine.h:370
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
std::vector< String > matching_hmdb_ids_
Definition: AccurateMassSearchEngine.h:219
A more convenient string class.
Definition: String.h:58
A basic LC-MS feature.
Definition: BaseFeature.h:56
OpenMS consensus map format (.consensusXML)
Definition: FileTypes.h:67
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
double mass_error_value_
parameter stuff
Definition: AccurateMassSearchEngine.h:395
String neg_adducts_fname_
Definition: AccurateMassSearchEngine.h:401
Data model of MzTab files. Please see the official MzTab specification at https://code....
Definition: MzTab.h:855
String name_
members
Definition: AccurateMassSearchEngine.h:102
void init()
parse database and adduct files
double searched_mass_
Definition: AccurateMassSearchEngine.h:207
String database_version_
Definition: AccurateMassSearchEngine.h:410
std::vector< MappingEntry_ > mass_mappings_
Definition: AccurateMassSearchEngine.h:368
Size matching_index_
Definition: AccurateMassSearchEngine.h:214
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
double mass
Definition: AccurateMassSearchEngine.h:364
Exception indicating that an invalid parameter was handed over to an algorithm.
Definition: Exception.h:347
std::vector< AdductInfo > pos_adducts_
Definition: AccurateMassSearchEngine.h:406
StringList db_struct_file_
Definition: AccurateMassSearchEngine.h:404
String ion_mode_
Definition: AccurateMassSearchEngine.h:397
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool is_initialized_
true if init_() was called without any subsequent param changes
Definition: AccurateMassSearchEngine.h:392
OpenMS feature file (.featureXML)
Definition: FileTypes.h:65
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
std::vector< String > massIDs
Definition: AccurateMassSearchEngine.h:365
bool keep_unidentified_masses_
Definition: AccurateMassSearchEngine.h:412
double observed_intensity_
Definition: AccurateMassSearchEngine.h:212
String formula
Definition: AccurateMassSearchEngine.h:366
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
Definition: AccurateMassSearchEngine.h:57
Type
Actual file types enum.
Definition: FileTypes.h:58
Size source_feature_index_
Definition: AccurateMassSearchEngine.h:215
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
std::vector< std::vector< String > > MassIDMapping
private member variables
Definition: AccurateMassSearchEngine.h:359
bool iso_similarity_
Definition: AccurateMassSearchEngine.h:398
void store(const String &filename, const MzTab &mz_tab) const
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
void setParameters(const Param ¶m)
Sets the parameters.
const Param & getDefaults() const
Non-mutable access to the default parameters.
UInt mol_multiplier_
Mol multiplier, e.g. 2 in 2M+H;+1.
Definition: AccurateMassSearchEngine.h:106
EmpiricalFormula ef_
EF for the actual adduct e.g. 'H' in 2M+H;+1.
Definition: AccurateMassSearchEngine.h:103
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
A container for consensus elements.
Definition: ConsensusMap.h:79
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
std::vector< double > mass_trace_intensities_
Definition: AccurateMassSearchEngine.h:221
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
bool operator()(T1 const &t1, T2 const &t2) const
Definition: AccurateMassSearchEngine.h:383
String mass_error_unit_
Definition: AccurateMassSearchEngine.h:396
A container for features.
Definition: FeatureMap.h:95
void remove(const String &key)
Remove the entry key or a section key (when suffix is ':')
An LC-MS feature.
Definition: Feature.h:70
std::vector< AdductInfo > neg_adducts_
Definition: AccurateMassSearchEngine.h:407
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
double db_mass_
Definition: AccurateMassSearchEngine.h:208
Management and storage of parameters / INI files.
Definition: Param.h:73
HMDBPropsMapping hmdb_properties_mapping_
Definition: AccurateMassSearchEngine.h:390
std::map< String, std::vector< String > > HMDBPropsMapping
Definition: AccurateMassSearchEngine.h:360
String empirical_formula_
Definition: AccurateMassSearchEngine.h:218
void run(FeatureMap &, MzTab &) const
double observed_rt_
Definition: AccurateMassSearchEngine.h:211
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
Definition: AccurateMassSearchEngine.h:109
StringList db_mapping_file_
Definition: AccurateMassSearchEngine.h:403
double mz_error_ppm_
Definition: AccurateMassSearchEngine.h:210
double theoretical_mz_
Definition: AccurateMassSearchEngine.h:206
String database_name_
Definition: AccurateMassSearchEngine.h:409
double asMass(const MappingEntry_ &v) const
Definition: AccurateMassSearchEngine.h:372
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61
String resolveAutoMode_(const MAPTYPE &map) const
private member functions
Definition: AccurateMassSearchEngine.h:298