libpappsomspp
Library for mass spectrometry
peptidemodificatorbase.h
Go to the documentation of this file.
1 /**
2  * \file protein/peptidemodificatorbase.h
3  * \date 6/12/2016
4  * \author Olivier Langella
5  * \brief base class for all peptide modification builders
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2016 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 "enzymeproductinterface.h"
35 
36 namespace pappso
37 {
38 
39 
43 {
44 
45  public:
47  virtual ~PeptideModificatorBase();
48 
49 
50  /** \brief set the pattern on which the modification will be applied (usually
51  * the list of concerned AA) \details the pattern is a standard regular
52  * expression : it describes the target site to modify. This standard regular
53  * expression is used to make a replacement of all motifs describes by an
54  * underscore ("_") The underscore is taken as a landmark to apply the
55  * modification. \param pattern the regular expression pattern ( [YST] to
56  * replace Y, S and T with _ and modify it ). The pattern can also contain the
57  * / separator to eventually specify the replacement motif. This can be used
58  * to described very complex modification patterns
59  *
60  */
61  // :
62  virtual void setModificationPattern(QString &pattern) final;
63 
64 
65  protected:
66  QRegularExpression m_pattern;
67 
68  virtual void
69  getModificationPositionList(std::vector<unsigned int> &position_list,
70  const QString &peptide_str) final;
71  virtual void
72  getModificationPositionList(std::vector<unsigned int> &position_list,
73  const Peptide *p_peptide,
74  AaModificationP mod,
75  unsigned int modification_counter);
76 };
77 
78 
79 } // namespace pappso
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39