libpappsomspp
Library for mass spectrometry
peptidefragmentionlistbase.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/peptide/peptidefragmentionlistbase.h
3  * \date 10/3/2015
4  * \author Olivier Langella
5  * \brief fragmentation base object
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 #include <list>
34 
35 #include "peptidefragmention.h"
36 #include "../exportinmportconfig.h"
37 
38 namespace pappso
39 {
40 
41 class PeptideFragmentIonListBase;
42 typedef std::shared_ptr<const PeptideFragmentIonListBase>
44 
46 {
47  using IonList = std::list<PeptideIon>;
48 
49  protected:
51  std::list<PeptideFragmentIonSp> msp_peptide_fragment_ion_list;
54 
55  static const std::list<PeptideFragmentSp>
56  getPeptideFragmentList(const PeptideSp &peptide);
57 
58  public:
59  PeptideFragmentIonListBase(const PeptideSp &peptide, const IonList &ions);
61  virtual ~PeptideFragmentIonListBase();
62  PeptideFragmentIonListBaseSp makePeptideFragmentIonListBaseSp() const;
63 
64  const std::list<PeptideIon> &getIonList() const;
65  unsigned int
67  {
68  return m_phosphorylationNumber;
69  };
70 
71  virtual const PeptideSp &
72  getPeptideSp() const
73  {
74  return msp_peptide;
75  };
76 
77  const std::list<PeptideFragmentIonSp>
78  getPeptideFragmentIonSp(PeptideIon ion_type) const;
79  const PeptideFragmentIonSp &getPeptideFragmentIonSp(PeptideIon ion_type,
80  unsigned int size) const;
81  const PeptideFragmentIonSp &
82  getPeptideFragmentIonSp(PeptideIon ion_type,
83  unsigned int size,
84  unsigned int number_of_neutral_phospho_loss) const;
85 
86 
87  std::list<PeptideFragmentIonSp>::const_iterator
88  begin() const
89  {
90  return msp_peptide_fragment_ion_list.begin();
91  }
92 
93  std::list<PeptideFragmentIonSp>::const_iterator
94  end() const
95  {
96  return msp_peptide_fragment_ion_list.end();
97  }
98 
99 
100  const std::list<PeptideFragmentIonSp> &
102  {
103  return msp_peptide_fragment_ion_list;
104  }
105 
106  static std::list<PeptideIon> getCIDionList();
107  static std::list<PeptideIon> getETDionList();
108 
109 
110  unsigned int
111  size() const
112  {
113  return msp_peptide_fragment_ion_list.size();
114  };
115 };
116 
117 
118 } // namespace pappso
std::list< PeptideFragmentIonSp > msp_peptide_fragment_ion_list
std::list< PeptideFragmentIonSp >::const_iterator begin() const
virtual const PeptideSp & getPeptideSp() const
std::list< PeptideFragmentIonSp >::const_iterator end() const
const std::list< PeptideFragmentIonSp > & getPeptideFragmentIonList() const
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
Definition: types.h:386
std::shared_ptr< const PeptideFragmentIon > PeptideFragmentIonSp
std::shared_ptr< const Peptide > PeptideSp
std::shared_ptr< const PeptideFragmentIonListBase > PeptideFragmentIonListBaseSp
peptide ion model