51 explicit PeakGroup(
int min_abs_charge,
int max_abs_charge,
bool is_positive);
244 return charge_range_for_DL_;
248 return iso_range_for_DL_;
252 return bin_width_DL_;
267 std::vector<FLASHDeconvHelperStructs::LogMzPeak>::const_iterator
begin() const noexcept;
294 void updateChargeFitScoreAndChargeIntensities_(
bool is_low_charge);
296 void updateAvgPPMError_();
298 void updateAvgDaError_();
308 void updatePerChargeInformation_(const std::vector<
LogMzPeak>& noisy_peaks);
310 void updateChargeRange_(std::vector<
LogMzPeak>& noisy_peaks);
321 float getNoisePeakPower_(const std::vector<
LogMzPeak>& noisy_peaks, const std::vector<
LogMzPeak>& signal_peaks, const
int z) const;
329 std::vector<
float> per_charge_sum_signal_squared_;
330 std::vector<
float> per_charge_noise_pwr_;
331 std::vector<
float> per_charge_cos_;
332 std::vector<
float> per_charge_int_;
333 std::vector<
float> per_charge_snr_;
335 std::vector<
float> per_isotope_int_;
337 int min_abs_charge_ = 0, max_abs_charge_ = -1;
343 int scan_number_ = 0;
345 bool is_positive_ = false;
347 bool is_targeted_ = false;
349 double monoisotopic_mass_ = -1.0;
350 float intensity_ = 0;
354 int min_negative_isotope_index_ = -1;
356 int charge_range_for_DL_ = 7;
357 float bin_width_DL_ = 0.25;
358 int iso_range_for_DL_ = 21;
363 int max_snr_abs_charge_ = -1;
364 float isotope_cosine_score_ = 0;
365 float charge_score_ = 0;
366 double qscore_ = .0f;
367 double qscore2D_ = -1.0f;
368 float avg_ppm_error_ = 0;
369 float avg_da_error_ = 0;
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition: FLASHDeconvHelperStructs.h:166
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition: FLASHDeconvHelperStructs.h:33
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
float getBinWidthDL()
Definition: PeakGroup.h:250
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
FLASHDeconvHelperStructs::LogMzPeak LogMzPeak
Definition: PeakGroup.h:27
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::vector< LogMzPeak > recruitAllPeaksInSpectrum(const MSSpectrum &spec, double tol, const FLASHDeconvHelperStructs::PrecalculatedAveragine &avg, double mono_mass)
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
void setQvalue(double q, PeakGroup::TargetDecoyType target_decoy_type)
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
int getChargeRangeForDL()
Definition: PeakGroup.h:242
float getQvalue(PeakGroup::TargetDecoyType target_decoy_type=PeakGroup::TargetDecoyType::target) const
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 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
uint getFeatureIndex() const
get feature index of this peak group
void setChargeIsotopeCosine(int abs_charge, float cos)
set per abs_charge isotope cosine
int updateQscore(std::vector< LogMzPeak > &noisy_peaks, const FLASHDeconvHelperStructs::PrecalculatedAveragine &avg, double min_cos, bool is_low_charge, bool is_profile=false, int allowed_iso_error=1)
Update setQscore. Cosine and SNRs are also updated.
double getQscore() const
get Q score
PeakGroup(const PeakGroup &)=default
copy constructor
std::vector< FLASHDeconvHelperStructs::LogMzPeak >::const_iterator begin() const noexcept
iterators for the signal LogMz peaks in this PeakGroup
float getIsotopeCosine() const
get isotopic cosine score
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
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
Matrix< float > getDLMatrix(int index) const
get the calcualted DL matrix
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....
void updateMonoMassAndIsotopeIntensities()
add monoisotopic indices of peaks by offset and discard negative isotope peaks. Total intensity is al...
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
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
FLASHDeconvHelperStructs::PrecalculatedAveragine PrecalculatedAveragine
Definition: PeakGroup.h:28
double getQscore2D() const
get feature Q score
void calculateDLMatrices(const MSSpectrum &spec, double tol, const PrecalculatedAveragine &avg)
calculate the matrices for DL training and scoring
int getIsotopeRangeForDL()
Definition: PeakGroup.h:246
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:101
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: FeatureDeconvolution.h:22
static FLASHDeconvHelperStructs::PrecalculatedAveragine avg
keeps the precalculated averagine to calculate average masses from monoisotopic masses
Definition: FLASHIdaBridgeFunctions.h:85
Wrapper struct for all the structs needed by the FLASHDeconv Three structures are defined: Precalcula...
Definition: FLASHDeconvHelperStructs.h:30