libpappsomspp
Library for mass spectrometry
peptidemethioninremove.cpp
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 #include "peptidemethioninremove.h"
25 namespace pappso
26 {
28 {
29  m_isPotential = ism_isPotential;
30 }
31 
33 {
34 }
35 
36 void
37 PeptideMethioninRemove::setPeptide(std::int8_t sequence_database_id,
38  const ProteinSp &protein_sp,
39  bool is_decoy,
40  const QString &peptide,
41  unsigned int start,
42  bool is_nter,
43  unsigned int missed_cleavage_number,
44  bool semi_enzyme)
45 {
46  if(is_nter)
47  {
48  // Nter is often acetylated : MOD:00394
49  if(peptide[0] == 'M')
50  {
51  if(m_isPotential)
52  {
53  m_sink->setPeptide(sequence_database_id,
54  protein_sp,
55  is_decoy,
56  peptide,
57  start,
58  is_nter,
59  missed_cleavage_number,
60  semi_enzyme);
61  }
62  // peptide = peptide.right(peptide.size()-1);
63  m_sink->setPeptide(sequence_database_id,
64  protein_sp,
65  is_decoy,
66  peptide.right(peptide.size() - 1),
67  start + 1,
68  is_nter,
69  missed_cleavage_number,
70  semi_enzyme);
71  }
72  else
73  {
74  m_sink->setPeptide(sequence_database_id,
75  protein_sp,
76  is_decoy,
77  peptide,
78  start,
79  is_nter,
80  missed_cleavage_number,
81  semi_enzyme);
82  }
83  }
84  else
85  {
86 
87  m_sink->setPeptide(sequence_database_id,
88  protein_sp,
89  is_decoy,
90  peptide,
91  start,
92  is_nter,
93  missed_cleavage_number,
94  semi_enzyme);
95  }
96 }
97 } // namespace pappso
virtual void setPeptide(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideStr &peptide, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme)=0
function to give the products of a protein digestion by an enzyme
void setPeptide(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const QString &peptide, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) override
function to give the products of a protein digestion by an enzyme
PeptideMethioninRemove(bool ism_isPotential)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition: protein.h:43