libpappsomspp
Library for mass spectrometry
peptidenaturalisotopelist.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/peptide/peptidenaturalisotopelist.h
3  * \date 8/3/2015
4  * \author Olivier Langella
5  * \brief peptide natural isotope model
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
10  *
11  * This file is part of the PAPPSOms++ library.
12  *
13  * PAPPSOms++ is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * PAPPSOms++ is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25  *
26  * Contributors:
27  * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
28  *implementation
29  ******************************************************************************/
30 
31 #pragma once
32 
33 
34 #include <list>
35 #include "peptidenaturalisotope.h"
36 
38 #include "../exportinmportconfig.h"
39 
40 namespace pappso
41 {
42 
43 class PeptideNaturalIsotopeList;
44 typedef std::shared_ptr<const PeptideNaturalIsotopeList>
46 
47 
49 {
50  private:
52  std::list<PeptideNaturalIsotopeSp> msp_peptide_natural_isotope_list;
53 
54  public:
55  /** @brief compute the list of possible isotopes for a peptide
56  * @param peptide the peptide
57  * @param minimu_ratio_to_compute the limit under which we stop to compute
58  * because the ratio is too thin and not informative (default is 0.001). This
59  * limit is the same for each atom to survey : CHNOS
60  */
62  pappso_double minimum_ratio_to_compute = 0.001);
65  PeptideNaturalIsotopeListSp makePeptideNaturalIsotopeListSp() const;
66 
67  typedef std::list<PeptideNaturalIsotopeSp>::const_iterator const_iterator;
68 
69  const_iterator begin() const;
70 
71  const_iterator end() const;
72 
73  const std::map<unsigned int, pappso_double>
74  getIntensityRatioPerIsotopeNumber() const;
75 
76  std::vector<PeptideNaturalIsotopeSp>
77  getByIsotopeNumber(unsigned int isotopeLevel, unsigned int charge) const;
78 
79  /** @brief get the list of natural isotopes representing at least a minimum
80  * ratio of the whole isotope pattern
81  * @param charge gives the number of H+, important to take into account for
82  * isotope ratio
83  * @param precision the mass accuracy to take into acount each isotope (C13 !=
84  * H2)
85  * @param minimum_isotope_pattern_ratio the minimum ratio of the isotope
86  * pattern to represent
87  */
88  std::vector<PeptideNaturalIsotopeAverageSp>
89  getByIntensityRatio(unsigned int charge,
90  PrecisionPtr precision,
91  pappso_double minimum_isotope_pattern_ratio) const;
92 
93 
94  unsigned int size() const;
95  const PeptideInterfaceSp &getPeptideInterfaceSp() const;
96 };
97 
98 
99 } // namespace pappso
std::list< PeptideNaturalIsotopeSp >::const_iterator const_iterator
std::list< PeptideNaturalIsotopeSp > msp_peptide_natural_isotope_list
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< const PeptideInterface > PeptideInterfaceSp
double pappso_double
A type definition for doubles.
Definition: types.h:49
std::shared_ptr< const PeptideNaturalIsotopeList > PeptideNaturalIsotopeListSp
peptide natural isotope model