Loading...
Searching...
No Matches
pappso::AaBase Class Reference

`#include <aabase.h>`

Inheritance diagram for pappso::AaBase:

## Public Member Functions

virtual pappso_double | getMass () const
virtual const char & | getLetter () const
const AminoAcidChar & | getAminoAcidChar () const
virtual void | replaceLeucineIsoleucine ()

## Static Public Member Functions

static const std::vector< AminoAcidChar > & | getAminoAcidCharList ()

## Protected Member Functions

| AaBase (char aa_letter)
| AaBase (AminoAcidChar aa_char)
| AaBase (const AaBase &aabase)
virtual | ~AaBase ()
virtual int | getNumberOfAtom (AtomIsotopeSurvey atom) const override
| get the number of atom C, O, N, H in the molecule
int | getNumberOfIsotope (Isotope isotope) const override
| get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule

## Static Protected Member Functions

static pappso_double | getAaMass (char aa_letter)

## Protected Attributes

char | m_aaLetter

## Private Types

using | AaMassMap = std::map< char, pappso_double >
using | AaIntMap = std::map< char, unsigned int >
using | AminoAcidCharList = std::vector< AminoAcidChar >

## Static Private Attributes

static AaMassMap | m_aaMassMap
static AaIntMap | m_aaNumberOfCarbonMap
static AaIntMap | m_aaNumberOfSulfurMap
static AaIntMap | m_aaNumberOfHydrogenMap
static AaIntMap | m_aaNumberOfNitrogenMap
static AaIntMap | m_aaNumberOfOxygenMap
static AminoAcidCharList | m_aminoAcidCharList

## Friends

class | AaModification

## Detailed Description

Definition at line 43 of file aabase.h.

## Member Typedef Documentation

## AaIntMap

using pappso::AaBase::AaIntMap = std::map<char, unsigned int>

private

Definition at line 72 of file aabase.h.

## AaMassMap

using pappso::AaBase::AaMassMap = std::map<char, pappso_double>

private

Definition at line 71 of file aabase.h.

## AminoAcidCharList

using pappso::AaBase::AminoAcidCharList = std::vector<AminoAcidChar>

private

Definition at line 73 of file aabase.h.

## Constructor & Destructor Documentation

## AaBase() [1/3]

pappso::AaBase::AaBase | ( | char | aa_letter | ) |

protected

Definition at line 42 of file aabase.cpp.

: m_aaLetter(aa_letter)
{
/*
if (AaBase::_aa_mass_map.empty()) {
AaBase::static_builder();
}
*/
if(m_aaMassMap.find(aa_letter) == m_aaMassMap.end())
{
throw ExceptionNotFound(
QObject::tr("amino acid %1 not found").arg(aa_letter));
}
}
pappso::AaBase::m_aaMassMap
static AaMassMap m_aaMassMap
Definition aabase.h:75
pappso::AaBase::m_aaLetter
char m_aaLetter
Definition aabase.h:68

References m_aaMassMap.

## AaBase() [2/3]

pappso::AaBase::AaBase | ( | AminoAcidChar | aa_char | ) |

protected

Definition at line 56 of file aabase.cpp.

: m_aaLetter((char)aa_char)
{
}

## AaBase() [3/3]

pappso::AaBase::AaBase | ( | const AaBase & | aabase | ) |

protected

Definition at line 61 of file aabase.cpp.

: m_aaLetter(aa.m_aaLetter)
{
}

## ~AaBase()

pappso::AaBase::~AaBase | ( |  | ) |

protected virtual

Definition at line 65 of file aabase.cpp.

{
// TODO Auto-generated destructor stub
}

## Member Function Documentation

## getAaMass()

pappso_double pappso::AaBase::getAaMass | ( | char | aa_letter | ) |

static protected

Definition at line 379 of file aabase.cpp.

{
return m_aaMassMap.at(aa_letter);
}

References m_aaMassMap.

## getAminoAcidChar()

const AminoAcidChar & pappso::AaBase::getAminoAcidChar | ( |  | ) | const

Definition at line 439 of file aabase.cpp.

{
return (AminoAcidChar &)m_aaLetter;
}
pappso::AminoAcidChar
AminoAcidChar
Definition types.h:159

References m_aaLetter.

## getAminoAcidCharList()

const std::vector< AminoAcidChar > & pappso::AaBase::getAminoAcidCharList | ( |  | ) |

static

Definition at line 445 of file aabase.cpp.

{
return m_aminoAcidCharList;
}
pappso::AaBase::m_aminoAcidCharList
static AminoAcidCharList m_aminoAcidCharList
Definition aabase.h:81

References m_aminoAcidCharList.

## getLetter()

const char & pappso::AaBase::getLetter | ( |  | ) | const

virtual

Definition at line 433 of file aabase.cpp.

{
return m_aaLetter;
}

References m_aaLetter.

Referenced by pappso::specglob::PeptideModel::checkForAaModification(), pappso::specglob::PeptideModel::checkForMutation(), pappso::AaModification::createInstanceMutation(), pappso::Aa::toAbsoluteString(), pappso::Aa::toProForma(), and pappso::Aa::toString().

## getMass()

pappso_double pappso::AaBase::getMass | ( |  | ) | const

virtual

Reimplemented in pappso::Aa.

Definition at line 386 of file aabase.cpp.

{
return m_aaMassMap.at(m_aaLetter);
}

References m_aaLetter, and m_aaMassMap.

Referenced by pappso::Aa::getMass().

## getNumberOfAtom()

int pappso::AaBase::getNumberOfAtom | ( | AtomIsotopeSurvey | atom | ) | const

override protected virtual

get the number of atom C, O, N, H in the molecule

Implements pappso::AtomNumberInterface.

Reimplemented in pappso::Aa.

Definition at line 393 of file aabase.cpp.

{
switch(atom)
{
case AtomIsotopeSurvey::C:
return this->m_aaNumberOfCarbonMap.at(m_aaLetter);
case AtomIsotopeSurvey::H:
return this->m_aaNumberOfHydrogenMap.at(m_aaLetter);
case AtomIsotopeSurvey::N:
return this->m_aaNumberOfNitrogenMap.at(m_aaLetter);
case AtomIsotopeSurvey::O:
return this->m_aaNumberOfOxygenMap.at(m_aaLetter);
case AtomIsotopeSurvey::S:
return this->m_aaNumberOfSulfurMap.at(m_aaLetter);
default:
return 0;
}
// selenium (U) is not taken into account to compute isotopes
// it has 5 stable isotopes and the most abundant is 80Se (49,61%)
qDebug() << "AaBase::getNumberOfAtom(AtomIsotopeSurvey atom) NOT IMPLEMENTED";
return 0;
}
pappso::AaBase::m_aaNumberOfSulfurMap
static AaIntMap m_aaNumberOfSulfurMap
Definition aabase.h:77
pappso::AaBase::m_aaNumberOfCarbonMap
static AaIntMap m_aaNumberOfCarbonMap
Definition aabase.h:76
pappso::AaBase::m_aaNumberOfOxygenMap
static AaIntMap m_aaNumberOfOxygenMap
Definition aabase.h:80
pappso::AaBase::m_aaNumberOfNitrogenMap
static AaIntMap m_aaNumberOfNitrogenMap
Definition aabase.h:79
pappso::AaBase::m_aaNumberOfHydrogenMap
static AaIntMap m_aaNumberOfHydrogenMap
Definition aabase.h:78
pappso::AtomIsotopeSurvey::C
@ C
pappso::AtomIsotopeSurvey::S
@ S
pappso::AtomIsotopeSurvey::N
@ N
pappso::AtomIsotopeSurvey::H
@ H
pappso::AtomIsotopeSurvey::O
@ O

References pappso::C, pappso::H, m_aaLetter, m_aaNumberOfCarbonMap, m_aaNumberOfHydrogenMap, m_aaNumberOfNitrogenMap, m_aaNumberOfOxygenMap, m_aaNumberOfSulfurMap, pappso::N, pappso::O, and pappso::S.

Referenced by pappso::Aa::getNumberOfAtom().

## getNumberOfIsotope()

int pappso::AaBase::getNumberOfIsotope | ( | Isotope | isotope | ) | const

override protected virtual

get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule

Implements pappso::AtomNumberInterface.

Definition at line 426 of file aabase.cpp.

{
return 0;
}

## replaceLeucineIsoleucine()

void pappso::AaBase::replaceLeucineIsoleucine | ( |  | ) |

virtual

Definition at line 418 of file aabase.cpp.

{
if(m_aaLetter == 'L')
m_aaLetter = 'I';
}

References m_aaLetter.

## Friends And Related Symbol Documentation

## AaModification

friend class AaModification

friend

Definition at line 45 of file aabase.h.

## Member Data Documentation

## m_aaLetter

char pappso::AaBase::m_aaLetter

protected

Definition at line 68 of file aabase.h.

Referenced by getAminoAcidChar(), getLetter(), getMass(), getNumberOfAtom(), pappso::Aa::isAaEqual(), pappso::Aa::isLesser(), pappso::Aa::operator=(), and replaceLeucineIsoleucine().

## m_aaMassMap

AaBase::AaMassMap pappso::AaBase::m_aaMassMap

static private

Definition at line 75 of file aabase.h.

Referenced by AaBase(), getAaMass(), and getMass().

## m_aaNumberOfCarbonMap

AaBase::AaIntMap pappso::AaBase::m_aaNumberOfCarbonMap

static private

Initial value:
= [] {
AaIntMap ret;
ret.insert(std::pair<char, unsigned int>('W', 11));
ret.insert(std::pair<char, unsigned int>('G', 2));
ret.insert(std::pair<char, unsigned int>('A', 3));
ret.insert(std::pair<char, unsigned int>('S', 3));
ret.insert(std::pair<char, unsigned int>('P', 5));
ret.insert(std::pair<char, unsigned int>('V', 5));
ret.insert(std::pair<char, unsigned int>('T', 4));
ret.insert(std::pair<char, unsigned int>('L', 6));
ret.insert(std::pair<char, unsigned int>('I', 6));
ret.insert(std::pair<char, unsigned int>('N', 4));
ret.insert(std::pair<char, unsigned int>('D', 4));
ret.insert(std::pair<char, unsigned int>('K', 6));
ret.insert(std::pair<char, unsigned int>('Q', 5));
ret.insert(std::pair<char, unsigned int>('E', 5));
ret.insert(std::pair<char, unsigned int>('M', 5));
ret.insert(std::pair<char, unsigned int>('H', 6));
ret.insert(std::pair<char, unsigned int>('F', 9));
ret.insert(std::pair<char, unsigned int>('R', 6));
ret.insert(std::pair<char, unsigned int>('C', 3));
ret.insert(std::pair<char, unsigned int>('Y', 9));
ret.insert(std::pair<char, unsigned int>('U', 3));
ret.insert(std::pair<char, unsigned int>('O', 12));
return ret;
}()
pappso::AaBase::AaIntMap
std::map< char, unsigned int > AaIntMap
Definition aabase.h:72

Definition at line 76 of file aabase.h.

Referenced by getNumberOfAtom().

## m_aaNumberOfHydrogenMap

AaBase::AaIntMap pappso::AaBase::m_aaNumberOfHydrogenMap

static private

Initial value:
= [] {
AaIntMap ret;
ret.insert(std::pair<char, unsigned int>('A', 5));
ret.insert(std::pair<char, unsigned int>('C', 5));
ret.insert(std::pair<char, unsigned int>('D', 5));
ret.insert(std::pair<char, unsigned int>('E', 7));
ret.insert(std::pair<char, unsigned int>('F', 9));
ret.insert(std::pair<char, unsigned int>('G', 3));
ret.insert(std::pair<char, unsigned int>('H', 7));
ret.insert(std::pair<char, unsigned int>('I', 11));
ret.insert(std::pair<char, unsigned int>('K', 12));
ret.insert(std::pair<char, unsigned int>('L', 11));
ret.insert(std::pair<char, unsigned int>('M', 9));
ret.insert(std::pair<char, unsigned int>('N', 6));
ret.insert(std::pair<char, unsigned int>('P', 7));
ret.insert(std::pair<char, unsigned int>('Q', 8));
ret.insert(std::pair<char, unsigned int>('R', 12));
ret.insert(std::pair<char, unsigned int>('S', 5));
ret.insert(std::pair<char, unsigned int>('T', 7));
ret.insert(std::pair<char, unsigned int>('V', 9));
ret.insert(std::pair<char, unsigned int>('W', 10));
ret.insert(std::pair<char, unsigned int>('Y', 9));
ret.insert(std::pair<char, unsigned int>('U', 7));
ret.insert(std::pair<char, unsigned int>('O', 21));
return ret;
}()

Definition at line 78 of file aabase.h.

Referenced by getNumberOfAtom().

## m_aaNumberOfNitrogenMap

AaBase::AaIntMap pappso::AaBase::m_aaNumberOfNitrogenMap

static private

Initial value:
= [] {
AaIntMap ret;
ret.insert(std::pair<char, unsigned int>('A', 1));
ret.insert(std::pair<char, unsigned int>('C', 1));
ret.insert(std::pair<char, unsigned int>('D', 1));
ret.insert(std::pair<char, unsigned int>('E', 1));
ret.insert(std::pair<char, unsigned int>('F', 1));
ret.insert(std::pair<char, unsigned int>('G', 1));
ret.insert(std::pair<char, unsigned int>('H', 3));
ret.insert(std::pair<char, unsigned int>('I', 1));
ret.insert(std::pair<char, unsigned int>('K', 2));
ret.insert(std::pair<char, unsigned int>('L', 1));
ret.insert(std::pair<char, unsigned int>('M', 1));
ret.insert(std::pair<char, unsigned int>('N', 2));
ret.insert(std::pair<char, unsigned int>('P', 1));
ret.insert(std::pair<char, unsigned int>('Q', 2));
ret.insert(std::pair<char, unsigned int>('R', 4));
ret.insert(std::pair<char, unsigned int>('S', 1));
ret.insert(std::pair<char, unsigned int>('T', 1));
ret.insert(std::pair<char, unsigned int>('V', 1));
ret.insert(std::pair<char, unsigned int>('W', 2));
ret.insert(std::pair<char, unsigned int>('Y', 1));
ret.insert(std::pair<char, unsigned int>('U', 1));
ret.insert(std::pair<char, unsigned int>('O', 3));
return ret;
}()

Definition at line 79 of file aabase.h.

Referenced by getNumberOfAtom().

## m_aaNumberOfOxygenMap

AaBase::AaIntMap pappso::AaBase::m_aaNumberOfOxygenMap

static private

Initial value:
= [] {
AaIntMap ret;
ret.insert(std::pair<char, unsigned int>('A', 1));
ret.insert(std::pair<char, unsigned int>('C', 1));
ret.insert(std::pair<char, unsigned int>('D', 3));
ret.insert(std::pair<char, unsigned int>('E', 3));
ret.insert(std::pair<char, unsigned int>('F', 1));
ret.insert(std::pair<char, unsigned int>('G', 1));
ret.insert(std::pair<char, unsigned int>('H', 1));
ret.insert(std::pair<char, unsigned int>('I', 1));
ret.insert(std::pair<char, unsigned int>('K', 1));
ret.insert(std::pair<char, unsigned int>('L', 1));
ret.insert(std::pair<char, unsigned int>('M', 1));
ret.insert(std::pair<char, unsigned int>('N', 2));
ret.insert(std::pair<char, unsigned int>('P', 1));
ret.insert(std::pair<char, unsigned int>('Q', 2));
ret.insert(std::pair<char, unsigned int>('R', 1));
ret.insert(std::pair<char, unsigned int>('S', 2));
ret.insert(std::pair<char, unsigned int>('T', 2));
ret.insert(std::pair<char, unsigned int>('V', 1));
ret.insert(std::pair<char, unsigned int>('W', 1));
ret.insert(std::pair<char, unsigned int>('Y', 2));
ret.insert(std::pair<char, unsigned int>('U', 2));
ret.insert(std::pair<char, unsigned int>('O', 3));
return ret;
}()

Definition at line 80 of file aabase.h.

Referenced by getNumberOfAtom().

## m_aaNumberOfSulfurMap

AaBase::AaIntMap pappso::AaBase::m_aaNumberOfSulfurMap

static private

Initial value:
= [] {
AaIntMap ret;
ret.insert(std::pair<char, unsigned int>('A', 0));
ret.insert(std::pair<char, unsigned int>('C', 1));
ret.insert(std::pair<char, unsigned int>('D', 0));
ret.insert(std::pair<char, unsigned int>('E', 0));
ret.insert(std::pair<char, unsigned int>('F', 0));
ret.insert(std::pair<char, unsigned int>('G', 0));
ret.insert(std::pair<char, unsigned int>('H', 0));
ret.insert(std::pair<char, unsigned int>('I', 0));
ret.insert(std::pair<char, unsigned int>('K', 0));
ret.insert(std::pair<char, unsigned int>('L', 0));
ret.insert(std::pair<char, unsigned int>('M', 1));
ret.insert(std::pair<char, unsigned int>('N', 0));
ret.insert(std::pair<char, unsigned int>('P', 0));
ret.insert(std::pair<char, unsigned int>('Q', 0));
ret.insert(std::pair<char, unsigned int>('R', 0));
ret.insert(std::pair<char, unsigned int>('S', 0));
ret.insert(std::pair<char, unsigned int>('T', 0));
ret.insert(std::pair<char, unsigned int>('V', 0));
ret.insert(std::pair<char, unsigned int>('W', 0));
ret.insert(std::pair<char, unsigned int>('Y', 0));
ret.insert(std::pair<char, unsigned int>('U', 0));
ret.insert(std::pair<char, unsigned int>('O', 0));
return ret;
}()

Definition at line 77 of file aabase.h.

Referenced by getNumberOfAtom().

## m_aminoAcidCharList

AaBase::AminoAcidCharList pappso::AaBase::m_aminoAcidCharList

static private

Initial value:
= [] {
AminoAcidCharList ret = {
AminoAcidChar::alanine, AminoAcidChar::arginine,
AminoAcidChar::cysteine, AminoAcidChar::aspartic_acid,
AminoAcidChar::glutamic_acid, AminoAcidChar::phenylalanine,
AminoAcidChar::glycine, AminoAcidChar::histidine,
AminoAcidChar::isoleucine, AminoAcidChar::lysine,
AminoAcidChar::leucine, AminoAcidChar::methionine,
AminoAcidChar::asparagine, AminoAcidChar::proline,
AminoAcidChar::glutamine, AminoAcidChar::serine,
AminoAcidChar::threonine, AminoAcidChar::valine,
AminoAcidChar::tryptophan, AminoAcidChar::tyrosine,
AminoAcidChar::selenocysteine, AminoAcidChar::pyrrolysine,
};
return ret;
}()
pappso::AaBase::AminoAcidCharList
std::vector< AminoAcidChar > AminoAcidCharList
Definition aabase.h:73
pappso::AminoAcidChar::lysine
@ lysine
pappso::AminoAcidChar::tyrosine
@ tyrosine
pappso::AminoAcidChar::glycine
@ glycine
pappso::AminoAcidChar::methionine
@ methionine
pappso::AminoAcidChar::cysteine
@ cysteine
pappso::AminoAcidChar::proline
@ proline
pappso::AminoAcidChar::asparagine
@ asparagine
pappso::AminoAcidChar::histidine
@ histidine
pappso::AminoAcidChar::alanine
@ alanine
pappso::AminoAcidChar::glutamic_acid
@ glutamic_acid
pappso::AminoAcidChar::pyrrolysine
@ pyrrolysine
pappso::AminoAcidChar::leucine
@ leucine
pappso::AminoAcidChar::arginine
@ arginine
pappso::AminoAcidChar::threonine
@ threonine
pappso::AminoAcidChar::serine
@ serine
pappso::AminoAcidChar::phenylalanine
@ phenylalanine
pappso::AminoAcidChar::selenocysteine
@ selenocysteine
pappso::AminoAcidChar::valine
@ valine
pappso::AminoAcidChar::aspartic_acid
@ aspartic_acid
pappso::AminoAcidChar::tryptophan
@ tryptophan
pappso::AminoAcidChar::isoleucine
@ isoleucine
pappso::AminoAcidChar::glutamine
@ glutamine

Definition at line 81 of file aabase.h.

Referenced by getAminoAcidCharList().

The documentation for this class was generated from the following files:

- pappsomspp/amino_acid/aabase.h
- pappsomspp/amino_acid/aabase.cpp