37 #include <OpenMS/config.h>
94 std::vector<std::pair<Size,double>>& scores,
99 const std::vector<MSSpectrum>& library,
100 const std::map<String,DataValue>& options
118 std::vector<std::pair<Size,double>>& scores,
123 const BinnedSpectrum in_bs(spec, bin_size_,
false, peak_spread_, bin_offset_);
124 for (
Size i = 0; i < bs_library_.size(); ++i)
126 const double cmp_score = cmp_bs_(in_bs, bs_library_[i]);
127 if (cmp_score >= min_score)
129 scores.emplace_back(i, cmp_score);
134 void init(
const std::vector<MSSpectrum>& library,
const std::map<String,DataValue>& options)
override
136 if (options.count(
"bin_size"))
138 bin_size_ = options.at(
"bin_size");
140 if (options.count(
"peak_spread"))
142 peak_spread_ = options.at(
"peak_spread");
144 if (options.count(
"bin_offset"))
146 bin_offset_ = options.at(
"bin_offset");
152 bs_library_.emplace_back(s, bin_size_,
false, peak_spread_, bin_offset_);
154 OPENMS_LOG_INFO <<
"The library contains " << bs_library_.size() <<
" spectra." << std::endl;
159 double bin_size_ = 1.0;
161 double bin_offset_ = 0.4;
183 const std::vector<MSSpectrum>& spectra,
185 std::vector<MSSpectrum>& annotated_spectra,
187 bool compute_features =
true
205 const std::vector<MSSpectrum>& spectra,
207 std::vector<MSSpectrum>& annotated_spectra
223 const std::vector<MSSpectrum>& spectra,
226 std::vector<MSSpectrum>& annotated_spectra)
const;
276 const std::vector<MSSpectrum>& annotated_spectra,
277 const std::vector<MSSpectrum>& picked_spectra,
279 std::vector<MSSpectrum>& scored_spectra,
280 bool compute_features =
true
297 const std::vector<MSSpectrum>& annotated_spectra,
298 const std::vector<MSSpectrum>& picked_spectra,
299 std::vector<MSSpectrum>& scored_spectra
315 const std::vector<MSSpectrum>& scored_spectra,
317 std::vector<MSSpectrum>& selected_spectra,
319 bool compute_features =
true
330 const std::vector<MSSpectrum>& scored_spectra,
331 std::vector<MSSpectrum>& selected_spectra
353 std::vector<MSSpectrum>& extracted_spectra,
355 bool compute_features =
true
374 std::vector<MSSpectrum>& extracted_spectra
388 std::vector<Match>& matches
414 const std::vector<MSSpectrum>& spectra,
441 const std::vector<MSSpectrum>& spectra,
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
Compare functor scoring the spectral contrast angle for similarity measurement.
Definition: BinnedSpectralContrastAngle.h:59
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:76
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:93
A container for features.
Definition: FeatureMap.h:105
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:80
The representation of a 1D spectrum.
Definition: MSSpectrum.h:71
Management and storage of parameters / INI files.
Definition: Param.h:70
A more convenient string class.
Definition: String.h:61
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:65
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47