libpappsomspp
Library for mass spectrometry
peptidemodificatorpipeline.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2016 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 "enzymeproductinterface.h"
28 #include "peptidemodificatortee.h"
29 
30 namespace pappso
31 {
32 
37 {
38  public:
41  virtual ~PeptideModificatorPipeline();
42 
43  void addFixedModificationString(const QString &mod_str);
44  // protein Nter modification
45  void addFixedNterModificationString(const QString &mod_str);
46  // protein Cter modification
47  void addFixedCterModificationString(const QString &mod_str);
48 
49  void addPotentialModificationString(const QString &mod_str);
50  // protein Nter modification
51  void addPotentialNterModificationString(const QString &mod_str);
52  // protein Cter modification
53  void addPotentialCterModificationString(const QString &mod_str);
54 
55  void setSink(PeptideModificatorInterface *sink) override;
56 
57  void setPeptideSp(std::int8_t sequence_database_id,
58  const ProteinSp &protein_sp,
59  bool is_decoy,
60  const PeptideSp &peptide_sp_original,
61  unsigned int start,
62  bool is_nter,
63  unsigned int missed_cleavage_number,
64  bool semi_enzyme) override;
65  void setPeptide(std::int8_t sequence_database_id,
66  const ProteinSp &protein_sp,
67  bool is_decoy,
68  const QString &peptide_str,
69  unsigned int start,
70  bool is_nter,
71  unsigned int missed_cleavage_number,
72  bool semi_enzyme) override;
73 
74  void addLabeledModificationString(const QString &mod_str);
75 
76 
77  private:
78  PeptideModificatorTee *mp_peptideModificatorTee = nullptr;
79 
80  PeptideModificatorInterface *m_sink = nullptr;
81 
83 
84  PeptideModificatorInterface *mp_firstModificator = nullptr;
85 
86  std::vector<PeptideModificatorInterface *> m_pepModificatorPtrList;
87 
88  void parseFixedModification(const QString &mod_str,
89  bool Nter,
90  bool Cter,
91  bool else_prot);
92  void privAddFixedModificationString(const QString &mod_str,
93  bool Nter,
94  bool Cter,
95  bool else_prot);
96  void parsePotentialModification(const QString &mod_str,
97  bool Nter,
98  bool Cter,
99  bool else_prot);
100  void privAddPotentialModificationString(const QString &mod_str,
101  bool Nter,
102  bool Cter,
103  bool else_prot);
104  void parseLabeledModification(const QString &mod_str,
105  bool Nter,
106  bool Cter,
107  bool else_prot);
108 };
109 
110 
111 } // namespace pappso
std::vector< PeptideModificatorInterface * > m_pepModificatorPtrList
PeptideSpSinkInterface * mp_lastPeptideSinkInterface
#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 Peptide > PeptideSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition: protein.h:43