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>
38
39
40namespace pappso
41{
42
43
44class PMSPP_LIB_DECL Aa : public AaBase
45{
46 public:
47 Aa(char aa_letter);
48 Aa(Enums::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(Enums::AtomIsotopeSurvey atom) const override final;
57 int getNumberOfIsotope(Enums::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 */
81
82
83 /** @brief remove all non internal modifications
84 */
86
87 const std::vector<AaModificationP> &getModificationList() const;
88
89 /** @brief get the sum of mass modifications
90 */
91 double getTotalModificationMass() const;
92
93 bool isLesser(Aa const &r) const;
94 bool isAaEqual(Aa const &r) const;
95
96 private:
97 // const pappso_double _aa_mass;
98 std::vector<AaModificationP> m_listMod;
99};
100
101bool operator<(const Aa &l, const Aa &r);
102
103bool operator==(const Aa &l, const Aa &r);
104
105} /* namespace pappso */
AaBase(char aa_letter)
Definition aabase.cpp:43
const QString toProForma() const
get the amino acid in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README....
Definition aa.cpp:147
const QString toAbsoluteString() const
Definition aa.cpp:104
int getNumberOfIsotope(Enums::Isotope isotope) const override final
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Definition aa.cpp:220
double getTotalModificationMass() const
get the sum of mass modifications
Definition aa.cpp:79
Aa(char aa_letter)
Definition aa.cpp:41
const std::vector< AaModificationP > & getModificationList() const
Definition aa.cpp:73
const QString toString() const
Definition aa.cpp:124
bool isAaEqual(Aa const &r) const
Definition aa.cpp:279
void replaceAaModification(AaModificationP oldmod, AaModificationP newmod)
replaces all occurences of a modification by a new one
Definition aa.cpp:199
void addAaModification(AaModificationP aaModification)
Definition aa.cpp:189
unsigned int getNumberOfModification(AaModificationP mod) const
Definition aa.cpp:233
void removeAllButInternalModification()
remove all non internal modifications
Definition aa.cpp:247
std::vector< AaModificationP > m_listMod
Definition aa.h:98
int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const override final
get the number of atom C, O, N, H in the molecule
Definition aa.cpp:206
bool isLesser(Aa const &r) const
Definition aa.cpp:254
Aa & operator=(const Aa &toCopy)
Definition aa.cpp:65
void removeAaModification(AaModificationP aaModification)
Definition aa.cpp:177
pappso_double getMass() const override
Definition aa.cpp:90
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
bool operator<(Aa const &l, Aa const &r)
Definition aa.cpp:292
const AaModification * AaModificationP
double pappso_double
A type definition for doubles.
Definition types.h:61
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:286