45 #include <boost/dynamic_bitset.hpp> 92 void performSpectrumDeconvolution(
const MSSpectrum& spec,
93 const std::vector<DeconvolvedSpectrum>& survey_scans,
95 const std::map<
int, std::vector<std::vector<float>>>& precursor_map_for_FLASHIda);
109 void setTargetMasses(
const std::vector<double>& masses,
bool exclude =
false);
114 void calculateAveragine(
bool use_RNA_averagine);
117 static int getNominalMass(
double mass);
128 static float getCosine(
const std::vector<float>& a,
147 static float getIsotopeCosineAndDetermineIsotopeIndex(
double mono_mass,
148 const std::vector<float>& per_isotope_intensities,
151 int window_width = -1,
int allowed_iso_error_for_second_best_cos = 0,
PeakGroup::DecoyFlag decoyFlag = PeakGroup::DecoyFlag::target);
157 void updateMembers_()
override;
163 const static int min_iso_size_ = 2;
166 int allowed_iso_error_ = 1;
187 const static int min_support_peak_count_ = 2;
254 static double getBinValue_(
Size bin,
double min_value,
double bin_width);
262 static Size getBinNumber_(
double value,
double min_value,
double bin_width);
265 void updateLogMzPeaks_();
271 void updateMzBins_(
Size bin_number, std::vector<float>& mz_bin_intensities);
275 double getMassFromMassBin_(
Size mass_bin,
double bin_width)
const;
278 double getMzFromMzBin_(
Size mass_bin,
double bin_width)
const;
281 void generatePeakGroupsFromSpectrum_();
287 Matrix<int> updateMassBins_(
const std::vector<float>& mz_intensities);
293 Matrix<int> filterMassBins_(
const std::vector<float>& mass_intensities);
299 void updateCandidateMassBins_(std::vector<float>& mass_intensities,
const std::vector<float>& mz_intensities);
304 void getCandidatePeakGroups_(
const Matrix<int>& per_mass_abs_charge_ranges);
310 void scoreAndFilterPeakGroups_();
326 bool registerPrecursor_(
const std::vector<DeconvolvedSpectrum>& survey_scans,
327 const std::map<
int, std::vector<std::vector<float>>>& precursor_map_for_real_time_acquisition);
double min_mz_
range of mz subject to analysis
Definition: FLASHDeconvAlgorithm.h:171
double current_max_mass_
max mass is controlled by precursor mass for MSn n>1; otherwise just max_mass
Definition: FLASHDeconvAlgorithm.h:181
FLASHDeconv algorithm: ultrafast mass deconvolution algorithm for top down mass spectrometry dataset ...
Definition: FLASHDeconvAlgorithm.h:60
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition: FLASHDeconvHelperStructs.h:59
double min_mass_
mass ranges of deconvolution, set by users
Definition: FLASHDeconvAlgorithm.h:177
DoubleList bin_width_
bin size for first stage of mass selection - for fast convolution, binning is used ...
Definition: FLASHDeconvAlgorithm.h:191
std::vector< double > DoubleList
Vector of double precision real types.
Definition: ListUtils.h:62
double mass_bin_min_value_
minimum mass and mz values representing the first bin of massBin and mzBin, respectively: to save mem...
Definition: FLASHDeconvAlgorithm.h:238
FLASHDeconvHelperStructs::PrecalculatedAveragine PrecalculatedAveragine
Definition: FLASHDeconvAlgorithm.h:64
double current_min_mass_
max mass is max_mass for MS1 and 50 for MS2
Definition: FLASHDeconvAlgorithm.h:183
boost::dynamic_bitset previously_deconved_mass_bins_for_decoy
mass bins that are previsouly deconvolved and excluded for decoy mass generation
Definition: FLASHDeconvAlgorithm.h:211
int current_max_charge_
current_max_charge_: controlled by precursor charge for MSn n>1; otherwise just max_abs_charge_ ...
Definition: FLASHDeconvAlgorithm.h:179
Definition: IsotopeDistribution.h:64
boost::dynamic_bitset mz_bins_
mz_bins_ stores the binned log mz peaks
Definition: FLASHDeconvAlgorithm.h:222
bool is_positive_
is positive mode
Definition: FLASHDeconvAlgorithm.h:175
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition: FLASHDeconvHelperStructs.h:164
std::vector< double > filter_
This stores the "universal pattern".
Definition: FLASHDeconvAlgorithm.h:225
double isolation_window_size_
default precursor isolation window size.
Definition: FLASHDeconvAlgorithm.h:246
std::vector< double > target_mono_masses_
Definition: FLASHDeconvAlgorithm.h:205
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
int min_abs_charge_
min charge and max charge subject to analysis, set by users
Definition: FLASHDeconvAlgorithm.h:173
std::vector< LogMzPeak > log_mz_peaks_
Stores log mz peaks.
Definition: FLASHDeconvAlgorithm.h:216
DeconvolvedSpectrum deconvolved_spectrum_
deconvolved_spectrum_ stores the deconvolved mass peak groups
Definition: FLASHDeconvAlgorithm.h:218
double mz_bin_min_value_
Definition: FLASHDeconvAlgorithm.h:239
std::vector< double > excluded_masses_
mass bins that are excluded for FLASHIda global targeting mode
Definition: FLASHDeconvAlgorithm.h:208
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
Matrix< double > harmonic_filter_matrix_
This stores the patterns for harmonic reduction.
Definition: FLASHDeconvAlgorithm.h:227
uint ms_level_
current ms Level
Definition: FLASHDeconvAlgorithm.h:242
boost::dynamic_bitset mass_bins_
mass_bins_ stores the selected bins for this spectrum + overlapped spectrum (previous a few spectra)...
Definition: FLASHDeconvAlgorithm.h:220
std::vector< double > previously_deconved_mono_masses_for_decoy
Definition: FLASHDeconvAlgorithm.h:212
std::vector< int > bin_offsets_
This stores the "universal pattern" in binned dimension.
Definition: FLASHDeconvAlgorithm.h:233
DoubleList tolerance_
tolerance in ppm for each MS level
Definition: FLASHDeconvAlgorithm.h:189
FLASHDeconvAlgorithm * targetFD_
Definition: FLASHDeconvAlgorithm.h:195
std::unordered_set< int > excluded_integer_mzs_
Definition: FLASHDeconvAlgorithm.h:213
double iso_da_distance_
isotope dalton distance
Definition: FLASHDeconvAlgorithm.h:230
double min_rt_
range of RT subject to analysis (in seconds)
Definition: FLASHDeconvAlgorithm.h:169
boost::dynamic_bitset target_mass_bins_
mass bins that are targeted for FLASHIda global targeting mode
Definition: FLASHDeconvAlgorithm.h:204
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
DoubleList min_isotope_cosine_
cosine threshold between observed and theoretical isotope patterns for each MS level ...
Definition: FLASHDeconvAlgorithm.h:193
double intensity_threshold_
peak intensity threshold subject to analysis
Definition: FLASHDeconvAlgorithm.h:185
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Matrix< int > harmonic_bin_offset_matrix_
This stores the patterns for harmonic reduction in binned dimension.
Definition: FLASHDeconvAlgorithm.h:235
A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroups representing ...
Definition: DeconvolvedSpectrum.h:56
FLASHDeconvHelperStructs::PrecalculatedAveragine avg_
precalculated averagine distributions for fast averagine generation
Definition: FLASHDeconvAlgorithm.h:201
DecoyFlag
decoy flag. This flag specifies if a PeakGroup is a target, charge decoy, noise decoy, or isotope decoy.
Definition: PeakGroup.h:58
FLASHDeconvHelperStructs::LogMzPeak LogMzPeak
Definition: FLASHDeconvAlgorithm.h:65