OpenMS
PeakGroupScoring.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Kyowon Jeong $
6 // $Authors: Kyowon Jeong $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
13 #include <OpenMS/KERNEL/Peak1D.h>
15 
16 
17 namespace OpenMS
18 {
19  class PeakGroup;
20 
29  class OPENMS_DLLAPI PeakGroupScoring
30  {
31  public:
33 
35  static double getQscore(const PeakGroup* pg);
36 
38  static void writeAttCsvForQscoreTraining(const DeconvolvedSpectrum& deconvolved_spectrum, std::fstream& f);
39 
41  static void writeAttCsvForQscoreTrainingHeader(std::fstream& f);
42 
44  static double getDLscore(PeakGroup* pg, const MSSpectrum& spec, const FLASHHelperClasses::PrecalculatedAveragine& avg, double tol);
45 
46  private:
48  static std::vector<double> toFeatureVector_(const PeakGroup* pg);
50  static std::vector<double> weight_;
51 
53  static const int charge_count_for_DL_scoring_ = 11;
54  static const int iso_count_for_DL_scoring_ = 13;
55  };
56 } // namespace OpenMS
A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroup instances repr...
Definition: DeconvolvedSpectrum.h:30
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition: FLASHHelperClasses.h:187
Averagine patterns pre-calculated for speed up. Other variables are also calculated for fast cosine c...
Definition: FLASHHelperClasses.h:39
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
scoring functions for PeakGroup. For now, only Qscore has been implemented. For Qscore,...
Definition: PeakGroupScoring.h:30
static std::vector< double > toFeatureVector_(const PeakGroup *pg)
convert a peak group to a feature vector for setQscore calculation
static void writeAttCsvForQscoreTrainingHeader(std::fstream &f)
Write Csv file for Qscore training header.
static std::vector< double > weight_
the weights for Qscore calculation
Definition: PeakGroupScoring.h:50
static void writeAttCsvForQscoreTraining(const DeconvolvedSpectrum &deconvolved_spectrum, std::fstream &f)
Write Csv file for Qscore training.
static double getDLscore(PeakGroup *pg, const MSSpectrum &spec, const FLASHHelperClasses::PrecalculatedAveragine &avg, double tol)
get Deep learning based peak group score. Not implemented yet.
FLASHHelperClasses::LogMzPeak LogMzPeak
Definition: PeakGroupScoring.h:32
static double getQscore(const PeakGroup *pg)
get QScore for a peak group of specific abs_charge
Class describing a deconvolved mass. A mass contains multiple (LogMz) peaks of different charges and ...
Definition: PeakGroup.h:26
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19