libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
aa.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/amino_acid/aaBase.h
3 * \date 7/3/2015
4 * \author Olivier Langella
5 * \brief amino acid model
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
32#pragma once
33
34#include <vector>
35#include "../types.h"
36#include "aabase.h"
37#include "aamodification.h"
38
39
40namespace pappso
41{
42
43
44class PMSPP_LIB_DECL Aa : public AaBase
45{
46 public:
47 Aa(char aa_letter);
48 Aa(AminoAcidChar aa_char);
49 Aa(const Aa &aa);
50 Aa(Aa &&toCopy); // move constructor
51 Aa &operator=(const Aa &toCopy);
52
53 virtual ~Aa();
54
55 pappso_double getMass() const override;
56 int getNumberOfAtom(AtomIsotopeSurvey atom) const override final;
57 int getNumberOfIsotope(Isotope isotope) const override final;
58 unsigned int getNumberOfModification(AaModificationP mod) const;
59
60 /* \brief print modification except internal modifications */
61 const QString toString() const;
62 /* \brief print all modifications */
63 const QString toAbsoluteString() const;
64
65 /** @brief get the amino acid in ProForma notation
66 * https://github.com/HUPO-PSI/ProForma/blob/master/README.md
67 * @return QString as described in ProForma
68 */
69 const QString toProForma() const;
70
71
72 void addAaModification(AaModificationP aaModification);
73 void removeAaModification(AaModificationP aaModification);
74
75
76 /** @brief replaces all occurences of a modification by a new one
77 * @param oldmod modification to change
78 * @param newmod new modification
79 */
80 void replaceAaModification(AaModificationP oldmod, AaModificationP newmod);
81
82
83 AaModificationP getInternalNterModification() const;
84 AaModificationP getInternalCterModification() const;
85 void removeInternalNterModification();
86 void removeInternalCterModification();
87
88 /** @brief remove all non internat modifications
89 */
90 void removeAllButInternalModification();
91
92 const std::vector<AaModificationP> &getModificationList() const;
93
94 /** @brief get the sum of mass modifications
95 */
96 double getTotalModificationMass() const;
97
98 bool isLesser(Aa const &r) const;
99 bool isAaEqual(Aa const &r) const;
100
101 private:
102 // const pappso_double _aa_mass;
103 std::vector<AaModificationP> m_listMod;
104};
105
106bool operator<(const Aa &l, const Aa &r);
107
108bool operator==(const Aa &l, const Aa &r);
109
110} /* namespace pappso */
private amino acid model
amino acid modification model
std::vector< AaModificationP > m_listMod
Definition aa.h:103
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
AminoAcidChar
Definition types.h:161
bool operator<(Aa const &l, Aa const &r)
Definition aa.cpp:347
AtomIsotopeSurvey
Definition types.h:89
double pappso_double
A type definition for doubles.
Definition types.h:50
Isotope
Definition types.h:104
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:341