Loading...
Searching...
No Matches
aa.h
Go to the documentation of this file.
/**
* \file pappsomspp/amino_acid/aaBase.h
* \date 7/3/2015
* \author Olivier Langella
* \brief amino acid model
*/
/*******************************************************************************
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include <vector>
#include "pappsomspp/core/types.h"
#include "pappsomspp/core/amino_acid/aabase.h"
#include "pappsomspp/core/amino_acid/aamodification.h"
namespace pappso
{
class PMSPP_LIB_DECL Aa : public AaBase
{
public:
Aa(char aa_letter);
Aa(Enums::AminoAcidChar aa_char);
Aa(const Aa &aa);
Aa(Aa &&toCopy); // move constructor
Aa &operator=(const Aa &toCopy);
virtual ~Aa();
pappso_double getMass() const override;
int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const override final;
int getNumberOfIsotope(Enums::Isotope isotope) const override final;
unsigned int getNumberOfModification(AaModificationP mod) const;
/* \brief print modification except internal modifications */
const QString toString() const;
/* \brief print all modifications */
const QString toAbsoluteString() const;
/** @brief get the amino acid in ProForma notation
* https://github.com/HUPO-PSI/ProForma/blob/master/README.md
* @return QString as described in ProForma
*/
const QString toProForma() const;
void addAaModification(AaModificationP aaModification);
void removeAaModification(AaModificationP aaModification);
/** @brief replaces all occurences of a modification by a new one
* @param oldmod modification to change
* @param newmod new modification
*/
void replaceAaModification(AaModificationP oldmod, AaModificationP newmod);
/** @brief remove all non internal modifications
*/
void removeAllButInternalModification();
const std::vector<AaModificationP> &getModificationList() const;
/** @brief get the sum of mass modifications
*/
double getTotalModificationMass() const;
bool isLesser(Aa const &r) const;
bool isAaEqual(Aa const &r) const;
private:
// const pappso_double _aa_mass;
std::vector<AaModificationP> m_listMod;
};
bool operator<(const Aa &l, const Aa &r);
bool operator==(const Aa &l, const Aa &r);
} /* namespace pappso */
aabase.h
aamodification.h
pappso::AaBase::AaBase
AaBase(char aa_letter)
Definition aabase.cpp:43
pappso::Aa
Definition aa.h:45
pappso::Aa::toProForma
const QString toProForma() const
get the amino acid in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README....
Definition aa.cpp:147
pappso::Aa::toAbsoluteString
const QString toAbsoluteString() const
Definition aa.cpp:104
pappso::Aa::getNumberOfIsotope
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
pappso::Aa::getTotalModificationMass
double getTotalModificationMass() const
get the sum of mass modifications
Definition aa.cpp:79
pappso::Aa::Aa
Aa(char aa_letter)
Definition aa.cpp:41
pappso::Aa::getModificationList
const std::vector< AaModificationP > & getModificationList() const
Definition aa.cpp:73
pappso::Aa::toString
const QString toString() const
Definition aa.cpp:124
pappso::Aa::isAaEqual
bool isAaEqual(Aa const &r) const
Definition aa.cpp:279
pappso::Aa::replaceAaModification
void replaceAaModification(AaModificationP oldmod, AaModificationP newmod)
replaces all occurences of a modification by a new one
Definition aa.cpp:199
pappso::Aa::addAaModification
void addAaModification(AaModificationP aaModification)
Definition aa.cpp:189
pappso::Aa::getNumberOfModification
unsigned int getNumberOfModification(AaModificationP mod) const
Definition aa.cpp:233
pappso::Aa::removeAllButInternalModification
void removeAllButInternalModification()
remove all non internal modifications
Definition aa.cpp:247
pappso::Aa::m_listMod
std::vector< AaModificationP > m_listMod
Definition aa.h:98
pappso::Aa::getNumberOfAtom
int getNumberOfAtom(Enums::AtomIsotopeSurvey atom) const override final
get the number of atom C, O, N, H in the molecule
Definition aa.cpp:206
pappso::Aa::isLesser
bool isLesser(Aa const &r) const
Definition aa.cpp:254
pappso::Aa::operator=
Aa & operator=(const Aa &toCopy)
Definition aa.cpp:65
pappso::Aa::removeAaModification
void removeAaModification(AaModificationP aaModification)
Definition aa.cpp:177
pappso::Aa::getMass
pappso_double getMass() const override
Definition aa.cpp:90
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso::Enums::AtomIsotopeSurvey
AtomIsotopeSurvey
Definition types.h:110
pappso::Enums::Isotope
Isotope
Definition types.h:126
pappso::Enums::AminoAcidChar
AminoAcidChar
Definition types.h:196
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::operator<
bool operator<(Aa const &l, Aa const &r)
Definition aa.cpp:292
pappso::AaModificationP
const AaModification * AaModificationP
Definition aamodification.h:52
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:60
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:286
types.h