OpenMS
Qscore.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, 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 
31  class OPENMS_DLLAPI Qscore
32  {
33  public:
35 
37  static double getQscore(const PeakGroup* pg, bool is_profile = false, double cv = -1);
38 
39  static void writeAttCsvFromDummy(const DeconvolvedSpectrum& deconvolved_spectrum, std::fstream& f);
40 
41  static void writeAttCsvFromDummyHeader(std::fstream& f);
42 
43  private:
45 
46 
47  static std::vector<double> toFeatureVector_(const PeakGroup* pg);
48 
49  static std::vector<double> weight_centroid_;
50  static std::vector<double> weight_profile_;
51  static std::vector<double> weight_CV_;
52  // the weights for per cosine, SNR, PPM error, charge score, and intercept.
53  // ======================================
54  // IsotopeCosine 40.7425
55  // ChargeCosine 0.205
56  // MassSNR1 -0.1984
57  // ChargeSNR1 0.213
58  // Intercept -40.3701
59  //
60  // IsotopeCosine -55.8387
61  // ChargeCosine 0.0253
62  // MassSNR1 0.2473
63  // ChargeSNR2 -0.6765
64  // Intercept 55.8594
65 
66  };
67 } // namespace OpenMS
A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroups representing ...
Definition: DeconvolvedSpectrum.h:30
log transformed peak. After deconvolution, all necessary information from deconvolution such as charg...
Definition: FLASHDeconvHelperStructs.h:166
Class describing a deconvolved mass. A mass contains multiple (LogMz) peaks of different charges and ...
Definition: PeakGroup.h:26
setQscore : quality score for PeakGroup. This class is being updated. For now, simply it calculate th...
Definition: Qscore.h:32
static std::vector< double > weight_CV_
Definition: Qscore.h:51
FLASHDeconvHelperStructs::LogMzPeak LogMzPeak
Definition: Qscore.h:34
static std::vector< double > toFeatureVector_(const PeakGroup *pg)
convert a peak group to a feature vector for setQscore calculation
static std::vector< double > weight_centroid_
Definition: Qscore.h:49
static double getQscore(const PeakGroup *pg, bool is_profile=false, double cv=-1)
get QScore for a peak group of specific abs_charge
static std::vector< double > weight_profile_
Definition: Qscore.h:50
static void writeAttCsvFromDummy(const DeconvolvedSpectrum &deconvolved_spectrum, std::fstream &f)
static void writeAttCsvFromDummyHeader(std::fstream &f)
FLASHIda C++ to C# (or vice versa) bridge functions The functions here are called in C# to invoke fun...
Definition: FeatureDeconvolution.h:22