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

`#include <peptidefragment.h>`

Inheritance diagram for pappso::PeptideFragment:

## Public Member Functions

| PeptideFragment (const PeptideSp &sp_peptide, PeptideDirection direction, unsigned int size)
| PeptideFragment (const PeptideFragment &other)
| PeptideFragment (PeptideFragment &&toCopy)
virtual | ~PeptideFragment ()
virtual const PeptideSp & | getPeptideSp () const
virtual unsigned int | size () const override
virtual const QString | getSequence () const override
| amino acid sequence without modification
virtual pappso_double | getMass () const override
PeptideDirection | getPeptideIonDirection () const
virtual int | getNumberOfAtom (AtomIsotopeSurvey atom) const override
| get the number of atom C, O, N, H in the molecule
virtual int | getNumberOfIsotope (Isotope isotope) const override
| get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
virtual bool | isPalindrome () const override
| tells if the peptide sequence is a palindrome
Public Member Functions inherited from pappso::PeptideInterface
virtual const QString | getSequenceLi () const
| amino acid sequence without modification where L are replaced by I
virtual const QString | getName () const
virtual const QString | getFormula (unsigned int charge) const final
virtual bool | matchPeak (PrecisionPtr precision, pappso_double peak_mz, unsigned int charge) const final
Public Member Functions inherited from pappso::Ion
| Ion ()
| ~Ion ()
virtual pappso_double | getMz (unsigned int charge) const final

## Static Public Member Functions

static const QString | getPeptideIonDirectionName (PeptideDirection direction)

## Private Attributes

const PeptideSp | msp_peptide
const PeptideDirection | m_direction
const unsigned int | m_size = 0
AaModificationP | m_nterCterCleavage
pappso_double | m_mass = 0

## Detailed Description

Definition at line 47 of file peptidefragment.h.

## Constructor & Destructor Documentation

## PeptideFragment() [1/3]

pappso::PeptideFragment::PeptideFragment | ( | const PeptideSp & | sp_peptide,
|  | PeptideDirection | direction,
|  | unsigned int | size
| ) |  |

Definition at line 38 of file peptidefragment.cpp.

: msp_peptide(sp_peptide), m_direction(direction), m_size(size)
{
if(m_direction == PeptideDirection::Nter)
{
std::vector<Aa>::const_iterator it(msp_peptide.get()->begin());
std::vector<Aa>::const_iterator end(msp_peptide.get()->end());
unsigned int i = 0;
while(i < m_size)
{
m_mass += it->getMass();
it++;
i++;
}
m_nterCterCleavage =
AaModification::getInstance("internal:Cter_hydrolytic_cleavage_HO");
}
else
{
std::vector<Aa>::const_reverse_iterator it(msp_peptide.get()->rbegin());
std::vector<Aa>::const_reverse_iterator end(msp_peptide.get()->rend());
unsigned int i = 0;
while(i < m_size)
{
m_mass += it->getMass();
it++;
i++;
}
m_nterCterCleavage =
AaModification::getInstance("internal:Nter_hydrolytic_cleavage_H");
}
m_mass += m_nterCterCleavage->getMass();
}
pappso::AaModification::getMass
pappso_double getMass() const
Definition aamodification.cpp:854
pappso::AaModification::getInstance
static AaModificationP getInstance(const QString &accession)
Definition aamodification.cpp:456
pappso::PeptideFragment::m_size
const unsigned int m_size
Definition peptidefragment.h:76
pappso::PeptideFragment::msp_peptide
const PeptideSp msp_peptide
Definition peptidefragment.h:74
pappso::PeptideFragment::m_nterCterCleavage
AaModificationP m_nterCterCleavage
Definition peptidefragment.h:79
pappso::PeptideFragment::size
virtual unsigned int size() const override
Definition peptidefragment.cpp:204
pappso::PeptideFragment::m_mass
pappso_double m_mass
Definition peptidefragment.h:81
pappso::PeptideFragment::m_direction
const PeptideDirection m_direction
Definition peptidefragment.h:75
pappso::PeptideDirection::Nter
@ Nter

References pappso::AaModification::getInstance(), pappso::AaModification::getMass(), m_direction, m_mass, m_nterCterCleavage, m_size, msp_peptide, and pappso::Nter.

## PeptideFragment() [2/3]

pappso::PeptideFragment::PeptideFragment | ( | const PeptideFragment & | other | ) |

Definition at line 75 of file peptidefragment.cpp.

: msp_peptide(other.msp_peptide),
m_direction(other.m_direction),
m_size(other.m_size)
{
m_mass = other.m_mass;
}

References m_mass.

## PeptideFragment() [3/3]

pappso::PeptideFragment::PeptideFragment | ( | PeptideFragment && | toCopy | ) |

Definition at line 84 of file peptidefragment.cpp.

: msp_peptide(std::move(toCopy.msp_peptide)),
m_direction(toCopy.m_direction),
m_size(toCopy.m_size),
m_mass(toCopy.m_mass)
{
}

## ~PeptideFragment()

pappso::PeptideFragment::~PeptideFragment | ( |  | ) |

virtual

Definition at line 93 of file peptidefragment.cpp.

{
}

## Member Function Documentation

## getMass()

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

override virtual

Implements pappso::Ion.

Definition at line 210 of file peptidefragment.cpp.

{
return m_mass;
}

References m_mass.

## getNumberOfAtom()

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

override virtual

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

Implements pappso::AtomNumberInterface.

Definition at line 132 of file peptidefragment.cpp.

{
int number = 0;
if(m_direction == PeptideDirection::Nter)
{
std::vector<Aa>::const_iterator it(msp_peptide.get()->begin());
std::vector<Aa>::const_iterator end(msp_peptide.get()->end());
unsigned int i = 0;
while(i < m_size)
{
number += it->getNumberOfAtom(atom);
it++;
i++;
}
}
else
{
std::vector<Aa>::const_reverse_iterator it(msp_peptide.get()->rbegin());
std::vector<Aa>::const_reverse_iterator end(msp_peptide.get()->rend());
unsigned int i = 0;
while(i < m_size)
{
number += it->getNumberOfAtom(atom);
it++;
i++;
}
}
number += m_nterCterCleavage->getNumberOfAtom(atom);
// qDebug() << "Aa::getMass() end " << mass;
return number;
}
pappso::AaModification::getNumberOfAtom
int getNumberOfAtom(AtomIsotopeSurvey atom) const override final
get the number of atom C, O, N, H in the molecule
Definition aamodification.cpp:861

References pappso::AaModification::getNumberOfAtom(), m_direction, m_nterCterCleavage, m_size, msp_peptide, and pappso::Nter.

## getNumberOfIsotope()

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

override virtual

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

Implements pappso::AtomNumberInterface.

Definition at line 165 of file peptidefragment.cpp.

{
int number = 0;
if(m_direction == PeptideDirection::Nter)
{
std::vector<Aa>::const_iterator it(msp_peptide.get()->begin());
std::vector<Aa>::const_iterator end(msp_peptide.get()->end());
unsigned int i = 0;
while(i < m_size)
{
number += it->getNumberOfIsotope(isotope);
it++;
i++;
}
}
else
{
std::vector<Aa>::const_reverse_iterator it(msp_peptide.get()->rbegin());
std::vector<Aa>::const_reverse_iterator end(msp_peptide.get()->rend());
unsigned int i = 0;
while(i < m_size)
{
number += it->getNumberOfIsotope(isotope);
it++;
i++;
}
}
// number += m_nterCterCleavage->getNumberOfIsotope(atom);
// qDebug() << "Aa::getMass() end " << mass;
return number;
}

References m_direction, m_size, msp_peptide, and pappso::Nter.

## getPeptideIonDirection()

PeptideDirection pappso::PeptideFragment::getPeptideIonDirection | ( |  | ) | const

Definition at line 216 of file peptidefragment.cpp.

{
return m_direction;
}

References m_direction.

## getPeptideIonDirectionName()

const QString pappso::PeptideFragment::getPeptideIonDirectionName | ( | PeptideDirection | direction | ) |

static

Definition at line 98 of file peptidefragment.cpp.

{
switch(direction)
{
case PeptideDirection::Cter:
return "Cter";
break;
case PeptideDirection::Nter:
return "Nter";
break;
default:
throw PappsoException(QString("direction name not implemented"));
break;
}
}
pappso::PeptideDirection::Cter
@ Cter

References pappso::Cter, and pappso::Nter.

Referenced by pappso::PeptideFragmentIon::PeptideFragmentIon(), and pappso::XtandemHyperscore::getXtandemPredictedIonIntensityFactor().

## getPeptideSp()

const PeptideSp & pappso::PeptideFragment::getPeptideSp | ( |  | ) | const

virtual

Definition at line 199 of file peptidefragment.cpp.

{
return msp_peptide;
};

References msp_peptide.

## getSequence()

const QString pappso::PeptideFragment::getSequence | ( |  | ) | const

override virtual

amino acid sequence without modification

Implements pappso::PeptideInterface.

Definition at line 115 of file peptidefragment.cpp.

{
QString sequence = msp_peptide.get()->getSequence();
int diffSize = msp_peptide.get()->size() - m_size;
if(m_direction == PeptideDirection::Nter)
{
sequence = sequence.mid(0, m_size);
}
else
{
sequence = sequence.mid(diffSize, m_size);
}
return sequence;
}

References m_direction, m_size, msp_peptide, and pappso::Nter.

## isPalindrome()

bool pappso::PeptideFragment::isPalindrome | ( |  | ) | const

override virtual

tells if the peptide sequence is a palindrome

Implements pappso::PeptideInterface.

Definition at line 222 of file peptidefragment.cpp.

{
return msp_peptide.get()->isPalindrome();
}

References msp_peptide.

## size()

unsigned int pappso::PeptideFragment::size | ( |  | ) | const

override virtual

Implements pappso::PeptideInterface.

Definition at line 204 of file peptidefragment.cpp.

{
return m_size;
}

References m_size.

## Member Data Documentation

## m_direction

const PeptideDirection pappso::PeptideFragment::m_direction

private

Definition at line 75 of file peptidefragment.h.

Referenced by PeptideFragment(), getNumberOfAtom(), getNumberOfIsotope(), getPeptideIonDirection(), and getSequence().

## m_mass

pappso_double pappso::PeptideFragment::m_mass = 0

private

Definition at line 81 of file peptidefragment.h.

Referenced by PeptideFragment(), PeptideFragment(), and getMass().

## m_nterCterCleavage

AaModificationP pappso::PeptideFragment::m_nterCterCleavage

private

Definition at line 79 of file peptidefragment.h.

Referenced by PeptideFragment(), and getNumberOfAtom().

## m_size

const unsigned int pappso::PeptideFragment::m_size = 0

private

Definition at line 76 of file peptidefragment.h.

Referenced by PeptideFragment(), getNumberOfAtom(), getNumberOfIsotope(), getSequence(), and size().

## msp_peptide

const PeptideSp pappso::PeptideFragment::msp_peptide

private

Definition at line 74 of file peptidefragment.h.

Referenced by PeptideFragment(), getNumberOfAtom(), getNumberOfIsotope(), getPeptideSp(), getSequence(), and isPalindrome().

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

- pappsomspp/peptide/peptidefragment.h
- pappsomspp/peptide/peptidefragment.cpp