libpappsomspp
Library for mass spectrometry
peptidenaturalisotopeaverage.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3  *
4  * This file is part of the PAPPSOms++ library.
5  *
6  * PAPPSOms++ is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * PAPPSOms++ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Contributors:
20  * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21  *implementation
22  ******************************************************************************/
23 
24 #pragma once
25 
26 
27 #include <vector>
28 
29 #include "../exportinmportconfig.h"
30 #include "peptidenaturalisotope.h"
31 
32 namespace pappso
33 {
34 
35 class PeptideNaturalIsotopeList;
36 
37 class PeptideNaturalIsotopeAverage;
38 
39 typedef std::shared_ptr<const PeptideNaturalIsotopeAverage>
41 
43 {
44  public:
46  unsigned int askedIsotopeRank,
47  unsigned int isotopeLevel,
48  unsigned int charge,
49  PrecisionPtr precision);
51  unsigned int askedIsotopeRank,
52  unsigned int isotopeLevel,
53  unsigned int charge,
54  PrecisionPtr precision);
55 
58 
59  PeptideNaturalIsotopeAverageSp makePeptideNaturalIsotopeAverageSp() const;
60  pappso_double getMz() const;
61  pappso_double getIntensityRatio() const;
62  unsigned int getCharge() const;
63  unsigned int getIsotopeNumber() const;
64  unsigned int getIsotopeRank() const;
65  const std::vector<PeptideNaturalIsotopeSp> &getComponents() const;
66  const PeptideInterfaceSp &getPeptideInterfaceSp() const;
67  PrecisionPtr getPrecision() const;
68  virtual bool matchPeak(pappso_double peak_mz) const final;
69  bool isEmpty() const;
70 
71  private:
72  void recursiveDepletion(std::vector<PeptideNaturalIsotopeSp> &v_isotope_list,
73  unsigned int rank);
74 
75 
76  private:
78  std::vector<PeptideNaturalIsotopeSp> m_peptideNaturalIsotopeSpList;
79 
82  unsigned int m_isotopeLevel;
83  unsigned int m_isotopeRank = 1;
84  unsigned int m_z;
85  PrecisionPtr mp_precision = nullptr;
86 };
87 } // namespace pappso
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition: types.h:48
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
pappso::PeptideNaturalIsotopeAverage::m_peptideNaturalIsotopeSpList
std::vector< PeptideNaturalIsotopeSp > m_peptideNaturalIsotopeSpList
Definition: peptidenaturalisotopeaverage.h:78
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
pappso::PeptideNaturalIsotopeAverage
Definition: peptidenaturalisotopeaverage.h:43
pappso::PeptideInterfaceSp
std::shared_ptr< const PeptideInterface > PeptideInterfaceSp
Definition: peptideinterface.h:38
peptidenaturalisotope.h
peptide natural isotope model
pappso::PeptideNaturalIsotopeAverage::m_averageMz
pappso_double m_averageMz
Definition: peptidenaturalisotopeaverage.h:80
pappso::PrecisionBase
Definition: precision.h:44
pappso::PeptideNaturalIsotopeAverage::m_z
unsigned int m_z
Definition: peptidenaturalisotopeaverage.h:84
pappso::PeptideNaturalIsotopeAverage::mcsp_peptideSp
const PeptideInterfaceSp mcsp_peptideSp
Definition: peptidenaturalisotopeaverage.h:77
pappso::PeptideNaturalIsotopeAverage::m_abundanceRatio
pappso_double m_abundanceRatio
Definition: peptidenaturalisotopeaverage.h:81
pappso::PeptideNaturalIsotopeAverageSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp
Definition: peptidenaturalisotopeaverage.h:37
pappso::PeptideNaturalIsotopeList
Definition: peptidenaturalisotopelist.h:49
pappso::PeptideNaturalIsotopeAverage::m_isotopeLevel
unsigned int m_isotopeLevel
Definition: peptidenaturalisotopeaverage.h:82