51 explicit PeakGroup(
int min_abs_charge,
int max_abs_charge,
bool is_positive);
245 std::vector<FLASHHelperClasses::LogMzPeak>::const_iterator
begin() const noexcept;
260 std::vector<
float> getMassErrors(
bool ppm = true) const;
276 void updateChargeFitScoreAndChargeIntensities_(
bool is_low_charge);
278 void updateAvgMassError_();
284 void updateSNR_(
float mul_factor);
288 void getPerIsotopeIntensities_(std::vector<
float>& intensities,
int& min_isotope_index,
int& max_isotope_index,
int abs_charge,
int min_negative_isotope_index,
double tol);
290 void updatePerChargeInformation_(const std::vector<
LogMzPeak>& noisy_peaks, const
double tol, const
bool is_last);
292 void updateChargeRange_();
303 float getNoisePeakPower_(const std::vector<
LogMzPeak>& noisy_peaks, const
int z, const
double tol) const;
310 std::vector<
float> per_charge_sum_signal_squared_;
311 std::vector<
float> per_charge_noise_pwr_;
312 std::vector<
float> per_charge_cos_;
313 std::vector<
float> per_charge_int_;
314 std::vector<
float> per_charge_snr_;
316 std::vector<
float> per_isotope_int_;
318 int min_abs_charge_ = 0, max_abs_charge_ = -1;
324 int scan_number_ = 0;
326 bool is_positive_ = false;
328 bool is_targeted_ = false;
330 double monoisotopic_mass_ = -1.0;
331 float intensity_ = 0.f;
335 int min_negative_isotope_index_ = -1;
340 int max_snr_abs_charge_ = -1;
341 float isotope_cosine_score_ = 0.f;
342 float charge_score_ = 0.f;
344 double qscore2D_ = -1.0f;
345 float avg_ppm_error_ = 0.f;
346 float avg_da_error_ = 0.f;
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition: FLASHHelperClasses.h:177
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition: FLASHHelperClasses.h:35
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:26
FLASHHelperClasses::PrecalculatedAveragine PrecalculatedAveragine
Definition: PeakGroup.h:28
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
std::tuple< double, double > getMzRange(int abs_charge) const
get mz range of the charge
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
int getFeatureIndex() const
get feature index of this peak group
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 Q score 2D
bool operator>(const PeakGroup &a) const
float getChargeScore() const
get charge score
float getPeakOccupancy() const
get the density of the peaks within charge and isotope range
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
int updateQscore(const std::vector< LogMzPeak > &noisy_peaks, const MSSpectrum &spec, const FLASHHelperClasses::PrecalculatedAveragine &avg, double min_cos, double tol, bool is_low_charge, int allowed_iso_error, const bool is_last=false)
Update setQscore. Cosine and SNRs are also updated.
PeakGroup(int min_abs_charge, int max_abs_charge, bool is_positive)
Constructor specifying charge range.
int getScanNumber() const
get scan number
PeakGroup()=default
default constructor
~PeakGroup()=default
default destructor
std::tuple< int, int > getAbsChargeRange() const
get charge range - the actual charge values
void setChargeIsotopeCosine(int abs_charge, float cos)
set per abs_charge isotope cosine
double getQscore() const
get Q score
PeakGroup(const PeakGroup &)=default
copy constructor
float getIsotopeCosine() const
get isotopic cosine score
FLASHHelperClasses::LogMzPeak LogMzPeak
Definition: PeakGroup.h:27
void setFeatureIndex(uint findex)
set feature index
PeakGroup & operator=(const PeakGroup &t)=default
assignment operator
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
std::vector< FLASHHelperClasses::LogMzPeak >::const_iterator begin() const noexcept
iterators for the signal LogMz peaks in this PeakGroup
void setIndex(uint i)
set index of this peak group
void setQscore(double qscore)
set Q score - 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
const std::vector< float > & getIsotopeIntensities() const
get per isotope intensities
bool operator==(const PeakGroup &a) const
PeakGroup::TargetDecoyType getTargetDecoyType() const
get the target decoy type of this
bool isSignalMZ(double mz, double tol) const
determine is an mz is a signal of this peakgroup. Input tol is ppm tolerance (e.g....
double getMonoMass() const
get monoisotopic mass
bool isPositive() const
get if it is positive mode
std::tuple< double, double > getRepMzRange() const
get mz range that results in max setQscore
void updateMonoMassAndIsotopeIntensities(double tol)
add monoisotopic indices of peaks by offset and discard negative isotope peaks. Total intensity is al...
TargetDecoyType
target decoy type of PeakGroup. This specifies if a PeakGroup is a target (0), charge decoy (1),...
Definition: PeakGroup.h:33
@ charge_decoy
Definition: PeakGroup.h:35
@ noise_decoy
Definition: PeakGroup.h:36
@ isotope_decoy
Definition: PeakGroup.h:37
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....
double getQscore2D() const
get feature Q score
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
const double ISOTOPE_MASSDIFF_55K_U
Definition: Constants.h:100
FLASHIda C++ to C# (or vice versa) bridge functions The functions here are called in C# to invoke fun...
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
static FLASHHelperClasses::PrecalculatedAveragine avg
keeps the precalculated averagine to calculate average masses from monoisotopic masses
Definition: FLASHIdaBridgeFunctions.h:92
Wrapper struct for all the structs needed by the FLASHDeconv Three structures are defined: Precalcula...
Definition: FLASHHelperClasses.h:32