Loading...
Searching...
No Matches
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< Enums::PeptideIon > & | getIonList () const
unsigned int | getPhosphorylationNumber () const
virtual const PeptideSp & | getPeptideSp () const
const std::list< PeptideFragmentIonSp > | getPeptideFragmentIonSp (Enums::PeptideIon ion_type) const
const PeptideFragmentIonSp & | getPeptideFragmentIonSp (Enums::PeptideIon ion_type, unsigned int size) const
const PeptideFragmentIonSp & | getPeptideFragmentIonSp (Enums::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
std::size_t | size () const

## Static Public Member Functions

static std::list< Enums::PeptideIon > | getCIDionList ()
static std::list< Enums::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<Enums::PeptideIon>

## Detailed Description

Definition at line 44 of file peptidefragmentionlistbase.h.

## Member Typedef Documentation

## IonList

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

private

Definition at line 46 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;
qDebug();
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 == Enums::PeptideIon::y) || (ion_type == Enums::PeptideIon::ystar) ||
(ion_type == Enums::PeptideIon::yo) || (ion_type == Enums::PeptideIon::z))
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(fragment_sp, ion_type));
}
else if(ion_type == Enums::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 == Enums::PeptideIon::b) || (ion_type == Enums::PeptideIon::bstar) ||
(ion_type == Enums::PeptideIon::bo) || (ion_type == Enums::PeptideIon::a) ||
(ion_type == Enums::PeptideIon::c))
{
msp_peptide_fragment_ion_list.push_back(
std::make_shared<PeptideFragmentIon>(fragment_sp, ion_type));
}
else if(ion_type == Enums::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:368
pappso::PeptideFragmentIonListBase::msp_peptide_fragment_ion_list
std::list< PeptideFragmentIonSp > msp_peptide_fragment_ion_list
Definition peptidefragmentionlistbase.h:82
pappso::PeptideFragmentIonListBase::m_ionList
IonList m_ionList
Definition peptidefragmentionlistbase.h:83
pappso::PeptideFragmentIonListBase::getPeptideFragmentList
static const std::list< PeptideFragmentSp > getPeptideFragmentList(const PeptideSp &peptide)
Definition peptidefragmentionlistbase.cpp:200
pappso::PeptideFragmentIonListBase::m_phosphorylationNumber
unsigned int m_phosphorylationNumber
Definition peptidefragmentionlistbase.h:84
pappso::PeptideFragmentIonListBase::msp_peptide
const PeptideSp msp_peptide
Definition peptidefragmentionlistbase.h:81
pappso::Enums::PeptideIon::a
@ a
Nter aldimine ions.
Definition types.h:290
pappso::Enums::PeptideIon::y
@ y
Cter amino ions.
Definition types.h:295
pappso::Enums::PeptideIon::c
@ c
Nter amino ions.
Definition types.h:294
pappso::Enums::PeptideIon::bp
@ bp
Definition types.h:293
pappso::Enums::PeptideIon::yp
@ yp
Definition types.h:299
pappso::Enums::PeptideIon::ystar
@ ystar
Cter amino ions + NH3 loss.
Definition types.h:296
pappso::Enums::PeptideIon::yo
@ yo
Cter amino ions + H2O loss.
Definition types.h:297
pappso::Enums::PeptideIon::bstar
@ bstar
Nter acylium ions + NH3 loss.
Definition types.h:288
pappso::Enums::PeptideIon::b
@ b
Nter acylium ions.
Definition types.h:287
pappso::Enums::PeptideIon::bo
@ bo
Nter acylium ions + H2O loss.
Definition types.h:289
pappso::Enums::PeptideIon::z
@ z
Cter carbocations.
Definition types.h:298
pappso::PeptideDirection::Cter
@ Cter
Definition peptide.h:49
pappso::AaModificationP
const AaModification * AaModificationP
Definition aamodification.h:52

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

Referenced by PeptideFragmentIonListBase().

## PeptideFragmentIonListBase() [2/2]

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

Definition at line 179 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)
{
}

References PeptideFragmentIonListBase(), m_ionList, m_phosphorylationNumber, msp_peptide, and msp_peptide_fragment_ion_list.

## ~PeptideFragmentIonListBase()

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

virtual

Definition at line 195 of file peptidefragmentionlistbase.cpp.

{
}

## Member Function Documentation

## begin()

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

Definition at line 298 of file peptidefragmentionlistbase.cpp.

{
return msp_peptide_fragment_ion_list.begin();
}

References msp_peptide_fragment_ion_list.

## end()

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

Definition at line 304 of file peptidefragmentionlistbase.cpp.

{
return msp_peptide_fragment_ion_list.end();
}

References msp_peptide_fragment_ion_list.

## getCIDionList()

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

static

Definition at line 41 of file peptidefragmentionlistbase.cpp.

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

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

Referenced by pappso::MassSpectrumWidget::MassSpectrumWidget(), and pappso::cbor::psm::PsmIonSeriesScan::process().

## getETDionList()

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

static

Definition at line 59 of file peptidefragmentionlistbase.cpp.

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

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

## getIonList()

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

Definition at line 73 of file peptidefragmentionlistbase.cpp.

{
return m_ionList;
}

References m_ionList.

## getPeptideFragmentIonList()

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

Definition at line 280 of file peptidefragmentionlistbase.cpp.

{
return msp_peptide_fragment_ion_list;
}

References msp_peptide_fragment_ion_list.

## getPeptideFragmentIonSp() [1/3]

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

Definition at line 226 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 pappso::PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch(), pappso::specglob::PeptideSpectrum::PeptideSpectrum(), getPeptideFragmentIonSp(), and pappso::PeptideSpectrumMatch::privMatchIonList().

## getPeptideFragmentIonSp() [2/3]

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

Definition at line 240 of file peptidefragmentionlistbase.cpp.

{
return getPeptideFragmentIonSp(ion_type, size, 0);
}
pappso::PeptideFragmentIonListBase::getPeptideFragmentIonSp
const std::list< PeptideFragmentIonSp > getPeptideFragmentIonSp(Enums::PeptideIon ion_type) const
Definition peptidefragmentionlistbase.cpp:226
pappso::PeptideFragmentIonListBase::size
std::size_t size() const
Definition peptidefragmentionlistbase.cpp:274

References getPeptideFragmentIonSp(), and size().

## getPeptideFragmentIonSp() [3/3]

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

Definition at line 248 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:122

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 200 of file peptidefragmentionlistbase.cpp.

{
qDebug();
std::list<PeptideFragmentSp> peptide_fragment_list;
if(peptide.get()->size() < 1)
{
return 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));
}
qDebug();
return peptide_fragment_list;
}
pappso::Enums::XicExtractMethod::max
@ max
maximum of intensities
Definition types.h:280
pappso::PeptideDirection::Nter
@ Nter
Definition peptide.h:48

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

Referenced by PeptideFragmentIonListBase().

## getPeptideSp()

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

virtual

Definition at line 286 of file peptidefragmentionlistbase.cpp.

{
return msp_peptide;
}

References msp_peptide.

## getPhosphorylationNumber()

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

Definition at line 292 of file peptidefragmentionlistbase.cpp.

{
return m_phosphorylationNumber;
}

References m_phosphorylationNumber.

## makePeptideFragmentIonListBaseSp()

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

Definition at line 189 of file peptidefragmentionlistbase.cpp.

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

## size()

std::size_t pappso::PeptideFragmentIonListBase::size | ( |  | ) | const

Definition at line 274 of file peptidefragmentionlistbase.cpp.

{
return msp_peptide_fragment_ion_list.size();
}

References msp_peptide_fragment_ion_list.

Referenced by pappso::PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch(), getPeptideFragmentIonSp(), and getPeptideFragmentIonSp().

## Member Data Documentation

## m_ionList

IonList pappso::PeptideFragmentIonListBase::m_ionList

protected

Definition at line 83 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), PeptideFragmentIonListBase(), and getIonList().

## m_phosphorylationNumber

unsigned int pappso::PeptideFragmentIonListBase::m_phosphorylationNumber

protected

Definition at line 84 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), PeptideFragmentIonListBase(), and getPhosphorylationNumber().

## msp_peptide

const PeptideSp pappso::PeptideFragmentIonListBase::msp_peptide

protected

Definition at line 81 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), PeptideFragmentIonListBase(), and getPeptideSp().

## msp_peptide_fragment_ion_list

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

protected

Definition at line 82 of file peptidefragmentionlistbase.h.

Referenced by PeptideFragmentIonListBase(), PeptideFragmentIonListBase(), begin(), end(), getPeptideFragmentIonList(), getPeptideFragmentIonSp(), getPeptideFragmentIonSp(), and size().

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

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