pappso::PeptideFragmentIonListBase Class Reference

`#include <peptidefragmentionlistbase.h>`

## Public Member Functions

| PeptideFragmentIonListBase (const PeptideSp &peptide, const IonList &ions)
| PeptideFragmentIonListBase (const PeptideFragmentIonListBase &other)
virtual | ~PeptideFragmentIonListBase ()
PeptideFragmentIonListBaseSp | makePeptideFragmentIonListBaseSp () const
const std::list< PeptideIon > & | getIonList () const
unsigned int | getPhosphorylationNumber () const
virtual const PeptideSp & | getPeptideSp () const
const std::list< PeptideFragmentIonSp > | getPeptideFragmentIonSp (PeptideIon ion_type) const
const PeptideFragmentIonSp & | getPeptideFragmentIonSp (PeptideIon ion_type, unsigned int size) const
const PeptideFragmentIonSp & | getPeptideFragmentIonSp (PeptideIon ion_type, unsigned int size, unsigned int number_of_neutral_phospho_loss) const
std::list< PeptideFragmentIonSp >::const_iterator | begin () const
std::list< PeptideFragmentIonSp >::const_iterator | end () const
const std::list< PeptideFragmentIonSp > & | getPeptideFragmentIonList () const
unsigned int | size () const

## Static Public Member Functions

static std::list< PeptideIon > | getCIDionList ()
static std::list< PeptideIon > | getETDionList ()

## Static Protected Member Functions

static const std::list< PeptideFragmentSp > | getPeptideFragmentList (const PeptideSp &peptide)

## Protected Attributes

const PeptideSp | msp_peptide
std::list< PeptideFragmentIonSp > | msp_peptide_fragment_ion_list
IonList | m_ionList
unsigned int | m_phosphorylationNumber

## Private Types

using | IonList = std::list< PeptideIon >

## Detailed Description

Definition at line 45 of file peptidefragmentionlistbase.h.

## Member Typedef Documentation

## IonList

using pappso::PeptideFragmentIonListBase::IonList = std::list<PeptideIon>

private

Definition at line 47 of file peptidefragmentionlistbase.h.

## Constructor & Destructor Documentation

## PeptideFragmentIonListBase() [1/2]

pappso::PeptideFragmentIonListBase::PeptideFragmentIonListBase | ( | const PeptideSp & | peptide,
|  | const IonList & | ions
| ) |  |

Definition at line 78 of file peptidefragmentionlistbase.cpp.

: msp_peptide(peptide), m_ionList(ions)
{
try
{
qDebug()
<< "PeptideFragmentIonListBase::PeptideFragmentIonListBase begin "
<< ions.size();
std::list<PeptideFragmentSp> fragment_list =
PeptideFragmentIonListBase::getPeptideFragmentList(msp_peptide);
m_phosphorylationNumber = 0;
AaModificationP phosphorylation_mod = nullptr;
for(auto &&fragment_sp : fragment_list)
{
// qDebug()<< "PeptideFragmentIonListBase::PeptideFragmentIonListBase
// ition";
if(fragment_sp.get()->getPeptideIonDirection() ==
PeptideDirection::Cter)
{
for(auto &&ion_type : m_ionList)
{
// qDebug()<<
// "PeptideFragmentIonListBase::PeptideFragmentIonListBase
// ition";
if((ion_type == PeptideIon::y) ||
(ion_type == PeptideIon::ystar) ||
(ion_type == PeptideIon::yo) ||
(ion_type == PeptideIon::z))
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(fragment_sp,
ion_type));
}
else if(ion_type == PeptideIon::yp)
{
if(phosphorylation_mod == nullptr)
{
phosphorylation_mod =
AaModification::getInstance("MOD:00696");
m_phosphorylationNumber =
peptide.get()->getNumberOfModification(
phosphorylation_mod);
}
for(unsigned int i = 0; i < m_phosphorylationNumber; i++)
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(
fragment_sp, ion_type, i + 1));
}
}
}
}
else
{
for(auto &&ion_type : m_ionList)
{
// b, bstar, bo, a
if((ion_type == PeptideIon::b) ||
(ion_type == PeptideIon::bstar) ||
(ion_type == PeptideIon::bo) ||
(ion_type == PeptideIon::a) || (ion_type == PeptideIon::c))
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(fragment_sp,
ion_type));
}
else if(ion_type == PeptideIon::bp)
{
if(phosphorylation_mod == nullptr)
{
phosphorylation_mod =
AaModification::getInstance("MOD:00696");
m_phosphorylationNumber =
peptide.get()->getNumberOfModification(
phosphorylation_mod);
}
for(unsigned int i = 0; i < m_phosphorylationNumber; i++)
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(
fragment_sp, ion_type, i + 1));
}
}
}
}
}
qDebug() << "PeptideFragmentIonListBase::PeptideFragmentIonListBase end "
<< ions.size();
}
catch(PappsoException &exception_pappso)
{
QString errorStr =
QObject::tr(
"ERROR building PeptideFragmentIonListBase, PAPPSO exception:\n%1")
.arg(exception_pappso.qwhat());
qDebug() << "PeptideFragmentIonListBase::PeptideFragmentIonListBase "
"PappsoException :\n"
<< errorStr;
throw PappsoException(errorStr);
}
catch(std::exception &exception_std)
{
QString errorStr =
QObject::tr(
"ERROR building PeptideFragmentIonListBase, std exception:\n%1")
.arg(exception_std.what());
qDebug() << "PeptideFragmentIonListBase::PeptideFragmentIonListBase "
"std::exception :\n"
<< errorStr;
throw PappsoException(errorStr);
}
}
pappso::AaModification::getInstance
static AaModificationP getInstance(const QString &accession)
Definition: aamodification.cpp:366
pappso::PeptideFragmentIonListBase::msp_peptide_fragment_ion_list
std::list< PeptideFragmentIonSp > msp_peptide_fragment_ion_list
Definition: peptidefragmentionlistbase.h:51
pappso::PeptideFragmentIonListBase::m_ionList
IonList m_ionList
Definition: peptidefragmentionlistbase.h:52
pappso::PeptideFragmentIonListBase::getPeptideFragmentList
static const std::list< PeptideFragmentSp > getPeptideFragmentList(const PeptideSp &peptide)
Definition: peptidefragmentionlistbase.cpp:217
pappso::PeptideFragmentIonListBase::m_phosphorylationNumber
unsigned int m_phosphorylationNumber
Definition: peptidefragmentionlistbase.h:53
pappso::PeptideFragmentIonListBase::msp_peptide
const PeptideSp msp_peptide
Definition: peptidefragmentionlistbase.h:50
pappso::PeptideIon::a
@ a
Nter aldimine ions.
pappso::PeptideIon::y
@ y
Cter amino ions.
pappso::PeptideIon::c
@ c
Nter amino ions.
pappso::PeptideIon::bp
@ bp
pappso::PeptideIon::yp
@ yp
pappso::PeptideIon::ystar
@ ystar
Cter amino ions + NH3 loss.
pappso::PeptideIon::yo
@ yo
Cter amino ions + H2O loss.
pappso::PeptideIon::bstar
@ bstar
Nter acylium ions + NH3 loss.
pappso::PeptideIon::b
@ b
Nter acylium ions.
pappso::PeptideIon::bo
@ bo
Nter acylium ions + H2O loss.
pappso::PeptideIon::z
@ z
Cter carbocations.
pappso::PeptideDirection::Cter
@ Cter
pappso::AaModificationP
const AaModification * AaModificationP
Definition: aamodification.h:52

References pappso::a, pappso::b, pappso::bo, pappso::bp, pappso::bstar, pappso::c, pappso::Cter, pappso::AaModification::getInstance(), getPeptideFragmentList(), m_ionList, m_phosphorylationNumber, msp_peptide, msp_peptide_fragment_ion_list, pappso::PappsoException::qwhat(), pappso::y, pappso::yo, pappso::yp, pappso::ystar, and pappso::z.

## PeptideFragmentIonListBase() [2/2]

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

Definition at line 195 of file peptidefragmentionlistbase.cpp.

: msp_peptide(other.msp_peptide),
msp_peptide_fragment_ion_list(other.msp_peptide_fragment_ion_list),
m_ionList(other.m_ionList),
m_phosphorylationNumber(other.m_phosphorylationNumber)
{
}

## ~PeptideFragmentIonListBase()

pappso::PeptideFragmentIonListBase::~PeptideFragmentIonListBase | ( |  | ) |

virtual

Definition at line 212 of file peptidefragmentionlistbase.cpp.

{
}

## Member Function Documentation

## begin()

std::list<PeptideFragmentIonSp>::const_iterator pappso::PeptideFragmentIonListBase::begin | ( |  | ) | const

inline

Definition at line 88 of file peptidefragmentionlistbase.h.

{
return msp_peptide_fragment_ion_list.begin();
}

## end()

std::list<PeptideFragmentIonSp>::const_iterator pappso::PeptideFragmentIonListBase::end | ( |  | ) | const

inline

Definition at line 94 of file peptidefragmentionlistbase.h.

{
return msp_peptide_fragment_ion_list.end();
}

## getCIDionList()

std::list< PeptideIon > pappso::PeptideFragmentIonListBase::getCIDionList | ( |  | ) |

static

Definition at line 41 of file peptidefragmentionlistbase.cpp.

{
IonList ret;
// populate ret
ret.push_back(PeptideIon::y);
ret.push_back(PeptideIon::yp);
ret.push_back(PeptideIon::ystar);
ret.push_back(PeptideIon::yo);
ret.push_back(PeptideIon::b);
ret.push_back(PeptideIon::bp);
ret.push_back(PeptideIon::a);
ret.push_back(PeptideIon::bstar);
ret.push_back(PeptideIon::bo);
return ret;
}
pappso::PeptideFragmentIonListBase::IonList
std::list< PeptideIon > IonList
Definition: peptidefragmentionlistbase.h:47

References pappso::a, pappso::b, pappso::bo, pappso::bp, pappso::bstar, pappso::y, pappso::yo, pappso::yp, and pappso::ystar.

Referenced by pappso::MassSpectrumWidget::MassSpectrumWidget().

## getETDionList()

std::list< PeptideIon > pappso::PeptideFragmentIonListBase::getETDionList | ( |  | ) |

static

Definition at line 59 of file peptidefragmentionlistbase.cpp.

{
IonList ret;
// populate ret
ret.push_back(PeptideIon::y);
ret.push_back(PeptideIon::c);
ret.push_back(PeptideIon::z);
ret.push_back(PeptideIon::ystar);
ret.push_back(PeptideIon::yo);
return ret;
}

References pappso::c, pappso::y, pappso::yo, pappso::ystar, and pappso::z.

## getIonList()

const std::list< PeptideIon > & pappso::PeptideFragmentIonListBase::getIonList | ( |  | ) | const

Definition at line 73 of file peptidefragmentionlistbase.cpp.

{
return m_ionList;
}

References m_ionList.

## getPeptideFragmentIonList()

const std::list<PeptideFragmentIonSp>& pappso::PeptideFragmentIonListBase::getPeptideFragmentIonList | ( |  | ) | const

inline

Definition at line 101 of file peptidefragmentionlistbase.h.

{
return msp_peptide_fragment_ion_list;
}

## getPeptideFragmentIonSp() [1/3]

const std::list< PeptideFragmentIonSp > pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp | ( | PeptideIon | ion_type | ) | const

Definition at line 234 of file peptidefragmentionlistbase.cpp.

{
std::list<PeptideFragmentIonSp> ion_list;
for(auto &&peptide_fragment_ion_sp : msp_peptide_fragment_ion_list)
{
if(peptide_fragment_ion_sp.get()->getPeptideIonType() == ion_type)
{
ion_list.push_back(peptide_fragment_ion_sp);
}
}
return (ion_list);
}

References msp_peptide_fragment_ion_list.

Referenced by getPeptideFragmentIonSp(), and pappso::PeptideSpectrumMatch::privMatchIonList().

## getPeptideFragmentIonSp() [2/3]

const PeptideFragmentIonSp & pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp | ( | PeptideIon | ion_type,
|  | unsigned int | size
| ) |  | const

Definition at line 248 of file peptidefragmentionlistbase.cpp.

{
return getPeptideFragmentIonSp(ion_type, size, 0);
}
pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp
const std::list< PeptideFragmentIonSp > getPeptideFragmentIonSp(PeptideIon ion_type) const
Definition: peptidefragmentionlistbase.cpp:234
pappso::PeptideFragmentIonListBase::size
unsigned int size() const
Definition: peptidefragmentionlistbase.h:111

References getPeptideFragmentIonSp(), and size().

## getPeptideFragmentIonSp() [3/3]

const PeptideFragmentIonSp & pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp | ( | PeptideIon | ion_type,
|  | unsigned int | size,
|  | unsigned int | number_of_neutral_phospho_loss
| ) |  | const

Definition at line 256 of file peptidefragmentionlistbase.cpp.

{
for(auto &&peptide_fragment_ion_sp : msp_peptide_fragment_ion_list)
{
if(peptide_fragment_ion_sp.get()->getPeptideIonType() == ion_type)
{
if(peptide_fragment_ion_sp.get()->size() == size)
{
if(peptide_fragment_ion_sp.get()
->getNumberOfNeutralPhosphoLoss() ==
number_of_neutral_phospho_loss)
{
return (peptide_fragment_ion_sp);
}
}
}
}
throw PappsoException(QString("PeptideFragmentIon %1 of size %2 not found")
.arg(PeptideFragmentIon::getPeptideIonName(ion_type))
.arg(size));
}
pappso::PeptideFragmentIon::getPeptideIonName
const QString getPeptideIonName() const
Definition: peptidefragmention.cpp:138

References pappso::PeptideFragmentIon::getPeptideIonName(), msp_peptide_fragment_ion_list, and size().

## getPeptideFragmentList()

const std::list< PeptideFragmentSp > pappso::PeptideFragmentIonListBase::getPeptideFragmentList | ( | const PeptideSp & | peptide | ) |

static protected

Definition at line 217 of file peptidefragmentionlistbase.cpp.

{
std::list<PeptideFragmentSp> peptide_fragment_list;
unsigned int max = peptide.get()->size() - 1;
for(unsigned int i = 0; i < max; i++)
{
peptide_fragment_list.push_back(std::make_shared<PeptideFragment>(
peptide, PeptideDirection::Nter, i + 1));
peptide_fragment_list.push_back(std::make_shared<PeptideFragment>(
peptide, PeptideDirection::Cter, i + 1));
}
return peptide_fragment_list;
}
pappso::PeptideDirection::Nter
@ Nter
pappso::XicExtractMethod::max
@ max
maximum of intensities

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

Referenced by PeptideFragmentIonListBase().

## getPeptideSp()

virtual const PeptideSp& pappso::PeptideFragmentIonListBase::getPeptideSp | ( |  | ) | const

inline virtual

Definition at line 72 of file peptidefragmentionlistbase.h.

{
return msp_peptide;
};

## getPhosphorylationNumber()

unsigned int pappso::PeptideFragmentIonListBase::getPhosphorylationNumber | ( |  | ) | const

inline

Definition at line 66 of file peptidefragmentionlistbase.h.

{
return m_phosphorylationNumber;
};

## makePeptideFragmentIonListBaseSp()

PeptideFragmentIonListBaseSp pappso::PeptideFragmentIonListBase::makePeptideFragmentIonListBaseSp | ( |  | ) | const

Definition at line 206 of file peptidefragmentionlistbase.cpp.

{
return std::make_shared<const PeptideFragmentIonListBase>(*this);
}

## size()

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

inline

Definition at line 111 of file peptidefragmentionlistbase.h.

{
return msp_peptide_fragment_ion_list.size();
};

Referenced by getPeptideFragmentIonSp().

## Member Data Documentation

## m_ionList

IonList pappso::PeptideFragmentIonListBase::m_ionList

protected

Definition at line 52 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), and getIonList().

## m_phosphorylationNumber

unsigned int pappso::PeptideFragmentIonListBase::m_phosphorylationNumber

protected

Definition at line 53 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase().

## msp_peptide

const PeptideSp pappso::PeptideFragmentIonListBase::msp_peptide

protected

Definition at line 50 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase().

## msp_peptide_fragment_ion_list

std::list<PeptideFragmentIonSp> pappso::PeptideFragmentIonListBase::msp_peptide_fragment_ion_list

protected

Definition at line 51 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), and getPeptideFragmentIonSp().

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

- pappsomspp/peptide/peptidefragmentionlistbase.h
- pappsomspp/peptide/peptidefragmentionlistbase.cpp