pappsomspp
Library for mass spectrometry
peptidefixedmodificationbuilder.h
Go to the documentation of this file.
1 
2 /*******************************************************************************
3  * Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4  *
5  * This file is part of the PAPPSOms++ library.
6  *
7  * PAPPSOms++ is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * PAPPSOms++ is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Contributors:
21  * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
22  *implementation
23  ******************************************************************************/
24 
25 #pragma once
26 
27 
28 #include "peptidemodificatorbase.h"
29 
30 namespace pappso
31 {
32 
33 class PMSPP_LIB_DECL PeptideFixedModificationBuilder
34  : public PeptideModificatorBase
35 {
36  private:
37  PeptideModificatorInterface *m_sink = nullptr;
38 
39  const AaModificationP mp_mod;
40 
41  // protein Nter modification
42  bool m_isProtNterMod = true;
43  // protein Cter modification
44  bool m_isProtCterMod = true;
45  // all peptide between Nter and Cter
46  bool m_isProtElseMod = true;
47 
48  QString m_aaModificationList;
49 
50  public:
51  PeptideFixedModificationBuilder(AaModificationP p_mod);
53  void setPeptideSp(std::int8_t sequence_database_id,
54  const ProteinSp &protein_sp,
55  bool is_decoy,
56  const PeptideSp &peptide_sp_original,
57  unsigned int start,
58  bool is_nter,
59  unsigned int missed_cleavage_number,
60  bool semi_enzyme) override;
61 
62  void addAa(char aa);
63 
64  void
65  setSink(PeptideModificatorInterface *sink) override
66  {
67  m_sink = sink;
68  };
69  /** \brief this modification concerns the Nter peptide
70  * */
71  void
72  setProtNter(bool arg1)
73  {
74  m_isProtNterMod = arg1;
75  };
76  /** \brief this modification concerns the Cter peptide
77  * */
78  void
79  setProtCter(bool arg1)
80  {
81  m_isProtCterMod = arg1;
82  };
83  /** \brief this modification concerns all peptides between Nter and Cter
84  * */
85  void
86  setProtElse(bool arg1)
87  {
88  m_isProtElseMod = arg1;
89  };
90 };
91 
92 } // namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:12
pappso
Definition: aa.cpp:38
pappso::PeptideFixedModificationBuilder
Definition: peptidefixedmodificationbuilder.h:52
peptidemodificatorbase.h
base class for all peptide modification builders
pappso::PeptideModificatorInterface
Definition: enzymeproductinterface.h:83
pappso::ProteinSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition: protein.h:62
pappso::AaModificationP
const typedef AaModification * AaModificationP
Definition: aamodification.h:71
pappso::PeptideSp
std::shared_ptr< const Peptide > PeptideSp
Definition: aamodification.h:66