53 explicit PeakGroup(
int min_abs_charge,
int max_abs_charge,
bool is_positive);
91 double tol,
bool is_low_charge,
const std::vector<double>& excluded_masses,
bool is_last =
false);
296 std::vector<FLASHHelperClasses::LogMzPeak>::const_iterator
begin() const noexcept;
315 std::vector<
float> getMassErrors(
bool ppm = true) const;
342 void updateChargeFitScoreAndChargeIntensities_(
bool is_low_charge);
344 void updateAvgMassError_();
350 void updateSNR_(
float mul_factor);
354 void getPerIsotopeIntensities_(
std::vector<
float>& intensities,
int& min_isotope_index,
int& max_isotope_index,
int abs_charge,
int min_negative_isotope_index,
double tol);
356 void updatePerChargeInformation_(const
std::vector<
LogMzPeak>& noisy_peaks,
double tol,
bool is_last);
358 void updateChargeRange_();
369 float getNoisePeakPower_(const
std::vector<
LogMzPeak>& noisy_peaks,
int z,
double tol) const;
376 std::vector<
float> per_charge_sum_signal_squared_;
377 std::vector<
float> per_charge_noise_pwr_;
378 std::vector<
float> per_charge_cos_;
379 std::vector<
float> per_charge_int_;
380 std::vector<
float> per_charge_snr_;
382 std::vector<
float> per_isotope_int_;
384 int min_abs_charge_ = 0, max_abs_charge_ = -1;
390 int scan_number_ = 0;
392 bool is_positive_ = false;
394 bool is_targeted_ = false;
396 double monoisotopic_mass_ = -1.0;
398 float intensity_ = 0.f;
403 int min_negative_isotope_index_ = -1;
406 double iso_da_distance_ = Constants::ISOTOPE_MASSDIFF_55K_U;
409 int max_snr_abs_charge_ = -1;
411 float isotope_cosine_score_ = 0.f;
413 float charge_score_ = 0.f;
417 double qscore2D_ = -1.0f;
418 float avg_ppm_error_ = 0.f;
419 float avg_da_error_ = 0.f;
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition FLASHHelperClasses.h:189
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition FLASHHelperClasses.h:41
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
Class describing a deconvolved mass. A mass contains multiple (LogMz) peaks of different charges and ...
Definition PeakGroup.h:29
std::vector< LogMzPeak > getNoisyPeaks(const MSSpectrum &spec, double tol, const FLASHHelperClasses::PrecalculatedAveragine &avg) const
Get noisy peaks for this PeakGroup without modifying any state (const-safe). This is a const alternat...
std::vector< FLASHHelperClasses::LogMzPeak >::const_iterator begin() const noexcept
iterators for the signal LogMz peaks in this PeakGroup
FLASHHelperClasses::PrecalculatedAveragine PrecalculatedAveragine
Definition PeakGroup.h:31
void setTargeted()
set if it is targeted
void setTargetDecoyType(PeakGroup::TargetDecoyType index)
for this PeakGroup, specify the target decoy type.
int getMinNegativeIsotopeIndex() const
get minimum neagative isotope index
void setIsotopeCosine(float cos)
set isotope cosine score
void setAvgPPMError(float error)
set average mass ppm error
bool isTargeted() const
get if it is targeted
float getChargeSNR(int abs_charge) const
get per abs_charge SNR
uint getIndex() const
get index of this peak group
std::tuple< int, int > getAbsChargeRange() const
get charge range - the actual charge values
std::vector< LogMzPeak > recruitAllPeaksInSpectrum(const MSSpectrum &spec, double tol, const FLASHHelperClasses::PrecalculatedAveragine &avg, double mono_mass, bool renew_signal_peaks=true)
given a monoisotopic mass, recruit raw peaks from the raw input spectrum and add to this peakGroup....
float getIntensity() const
get intensity
float getAvgDaError() const
get average mass ppm error;
float getSNR() const
get total SNR
float getChargeIntensity(int abs_charge) const
get per abs_charge intenstiy
int getRepAbsCharge() const
get representative charge
bool operator<(const PeakGroup &a) const
comparison operators
void setSNR(float snr)
set SNR manually - for FLASHIda log file parsing
void setIsotopeDaDistance(double d)
set distance between consecutive isotopes
float getChargeIsotopeCosine(int abs_charge) const
get per abs_charge isotope cosine
void setChargeSNR(int abs_charge, float c_snr)
set charge SNR manually - for FLASHIda log file parsing
void setQscore2D(double fqscore)
Set the two-dimensional quality score for this peak group.
bool operator>(const PeakGroup &a) const
const std::vector< float > & getIsotopeIntensities() const
get per isotope intensities
float getChargeScore() const
get charge score
float getPeakOccupancy() const
get the density of the peaks within charge and isotope range
std::tuple< double, double > getRepMzRange() const
get mz range that results in max setQscore
void setAbsChargeRange(int min_abs_charge, int max_abs_charge)
set min_abs_charge and max_abs_charge charge range
void setMonoisotopicMass(double mono_mass)
set monoisotopic mass
PeakGroup(int min_abs_charge, int max_abs_charge, bool is_positive)
Constructor specifying charge range.
int updateQscore(const std::vector< LogMzPeak > &noisy_peaks, const FLASHHelperClasses::PrecalculatedAveragine &avg, double min_cos, double tol, bool is_low_charge, const std::vector< double > &excluded_masses, bool is_last=false)
Update setQscore. Cosine and SNRs are also updated.
int getScanNumber() const
get scan number
PeakGroup()=default
default constructor
~PeakGroup()=default
default destructor
uint getFeatureIndex() const
Get the feature index associated with this peak group.
void setChargeIsotopeCosine(int abs_charge, float cos)
set per abs_charge isotope cosine
double getQscore() const
Get the one-dimensional quality score for this peak group.
PeakGroup(const PeakGroup &)=default
copy constructor
std::tuple< double, double > getMzRange(int abs_charge) const
get mz range of the charge
float getIsotopeCosine() const
get isotopic cosine score
FLASHHelperClasses::LogMzPeak LogMzPeak
Definition PeakGroup.h:30
PeakGroup & operator=(const PeakGroup &t)=default
assignment operator
void setFeatureIndex(uint findex)
Set the feature index for this peak group.
void setRepAbsCharge(int max_snr_abs_charge)
set representative max_snr_abs_charge
void setScanNumber(int scan_number)
set scan number
PeakGroup(PeakGroup &&other)=default
move constructor
void setIndex(uint i)
set index of this peak group
void setQscore(double qscore)
set Qscore - for FLASHIda log file parsing
double getIsotopeDaDistance() const
get distance between consecutive isotopes
void setChargeScore(float charge_score)
set charge score - for FLASHIda log file parsing
bool operator==(const PeakGroup &a) const
PeakGroup::TargetDecoyType getTargetDecoyType() const
get the target decoy type of this
double getMonoMass() const
get monoisotopic mass
bool isPositive() const
get if it is positive mode
void updateMonoMassAndIsotopeIntensities(double tol)
add monoisotopic indices of peaks by offset and discard negative isotope peaks. Total intensity is al...
TargetDecoyType
Definition PeakGroup.h:37
@ noise_decoy
Definition PeakGroup.h:39
@ signal_decoy
Definition PeakGroup.h:40
double getQscore2D() const
Get the two-dimensional quality score incorporating feature-level information.
float getAvgPPMError() const
get average mass ppm error;
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
void hash_combine(std::size_t &seed, std::size_t value) noexcept
Combine a hash value with additional data using golden ratio mixing.
Definition HashUtils.h:87
std::size_t hash_float(T value) noexcept
Hash for a floating point type (float or double).
Definition HashUtils.h:142
Wrapper struct for all the structs needed by the FLASHDeconv The following structures/classes are def...
Definition FLASHHelperClasses.h:38
std::size_t operator()(const OpenMS::PeakGroup &pg) const noexcept
Definition PeakGroup.h:434