37 #include <OpenMS/config.h> 91 virtual void generateScores(
93 std::vector<std::pair<Size,double>>& scores,
98 const std::vector<MSSpectrum>& library,
99 const std::map<String,DataValue>& options
116 std::vector<std::pair<Size,double>>& scores,
121 const BinnedSpectrum in_bs(spec, bin_size_,
false, peak_spread_, bin_offset_);
122 for (
Size i = 0; i < bs_library_.size(); ++i)
124 const double cmp_score = cmp_bs_(in_bs, bs_library_[i]);
125 if (cmp_score >= min_score)
127 scores.emplace_back(i, cmp_score);
132 void init(
const std::vector<MSSpectrum>& library,
const std::map<String,DataValue>& options)
134 if (options.count(
"bin_size"))
136 bin_size_ = options.at(
"bin_size");
138 if (options.count(
"peak_spread"))
140 peak_spread_ = options.at(
"peak_spread");
142 if (options.count(
"bin_offset"))
144 bin_offset_ = options.at(
"bin_offset");
150 bs_library_.emplace_back(s, bin_size_,
false, peak_spread_, bin_offset_);
152 LOG_INFO <<
"The library contains " << bs_library_.size() <<
" spectra." << std::endl;
157 double bin_size_ = 1.0;
158 double peak_spread_ = 0.0;
159 double bin_offset_ = 0.4;
162 void getDefaultParameters(
Param& params)
const;
180 void annotateSpectra(
181 const std::vector<MSSpectrum>& spectra,
183 std::vector<MSSpectrum>& annotated_spectra,
185 const bool compute_features =
true 202 void annotateSpectra(
203 const std::vector<MSSpectrum>& spectra,
205 std::vector<MSSpectrum>& annotated_spectra
246 const std::vector<MSSpectrum>& annotated_spectra,
247 const std::vector<MSSpectrum>& picked_spectra,
249 std::vector<MSSpectrum>& scored_spectra,
250 const bool compute_features =
true 267 const std::vector<MSSpectrum>& annotated_spectra,
268 const std::vector<MSSpectrum>& picked_spectra,
269 std::vector<MSSpectrum>& scored_spectra
285 const std::vector<MSSpectrum>& scored_spectra,
287 std::vector<MSSpectrum>& selected_spectra,
289 const bool compute_features =
true 300 const std::vector<MSSpectrum>& scored_spectra,
301 std::vector<MSSpectrum>& selected_spectra
323 std::vector<MSSpectrum>& extracted_spectra,
325 const bool compute_features =
true 344 std::vector<MSSpectrum>& extracted_spectra
358 std::vector<Match>& matches
383 void targetedMatching(
384 const std::vector<MSSpectrum>& spectra,
410 void untargetedMatching(
411 const std::vector<MSSpectrum>& spectra,
418 void updateMembers_();
#define LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:454
A container for features.
Definition: FeatureMap.h:93
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:75
Compare functor scoring the spectral contrast angle for similarity measurement.
Definition: BinnedSpectralContrastAngle.h:57
Management and storage of parameters / INI files.
Definition: Param.h:74
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:64
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91