Loading...
Searching...
No Matches
pappso::specpeptidoms::PeptideModel Class Reference

modelize peptide sequence to facilitate rendering in bracket or proforma More...

`#include <peptidemodel.h>`

Inheritance diagram for pappso::specpeptidoms::PeptideModel:

## Public Member Functions

| PeptideModel ()
virtual | ~PeptideModel ()
void | reset ()
void | setCterShift (double mass_shift)
void | setNterShift (double mass_shift)
QString | toProForma () const
QString | toInterpretation () const
void | setPrecursorMass (double mass)
double | getPrecursorMass () const
double | getMass () const
double | getNonAlignedMass () const
| Return the difference between the precursor's mass and the mass modelized by the PeptideModel.

## Static Public Member Functions

static QString | toProFormaMass (double mass)

## Private Attributes

double | m_cterShift = 0
double | m_nterShift = 0
double | m_precursorMass = 0

## Detailed Description

modelize peptide sequence to facilitate rendering in bracket or proforma

Definition at line 55 of file peptidemodel.h.

## Constructor & Destructor Documentation

## PeptideModel()

pappso::specpeptidoms::PeptideModel::PeptideModel | ( |  | ) |

Default constructor

Definition at line 80 of file peptidemodel.cpp.

{
}

## ~PeptideModel()

pappso::specpeptidoms::PeptideModel::~PeptideModel | ( |  | ) |

virtual

Destructor

Definition at line 84 of file peptidemodel.cpp.

{
}

## Member Function Documentation

## getMass()

double pappso::specpeptidoms::PeptideModel::getMass | ( |  | ) | const

Definition at line 133 of file peptidemodel.cpp.

{
double mass = m_cterShift + m_nterShift + MASSH2O;
// qWarning() << mass;
for(auto &aa : *this)
{
// qWarning() << aa.m_aminoAcid.toProForma();
mass += aa.m_aminoAcid.getMass() + aa.m_massDifference;
}
return mass;
}
pappso::specpeptidoms::PeptideModel::m_cterShift
double m_cterShift
Definition peptidemodel.h:92
pappso::specpeptidoms::PeptideModel::m_nterShift
double m_nterShift
Definition peptidemodel.h:93
pappso::masschroq::PeakQualityCategory::aa
@ aa
best possible : more than one direct MS2 fragmentation in same MSRUN
Definition types.h:45
pappso::MASSH2O
const pappso_double MASSH2O((MPROTIUM *2)+MASSOXYGEN)

References m_cterShift, m_nterShift, and pappso::MASSH2O().

Referenced by getNonAlignedMass(), and toProForma().

## getNonAlignedMass()

double pappso::specpeptidoms::PeptideModel::getNonAlignedMass | ( |  | ) | const

Return the difference between the precursor's mass and the mass modelized by the PeptideModel.

Definition at line 204 of file peptidemodel.cpp.

{
return getPrecursorMass() - getMass();
}
pappso::specpeptidoms::PeptideModel::getPrecursorMass
double getPrecursorMass() const
Definition peptidemodel.cpp:115
pappso::specpeptidoms::PeptideModel::getMass
double getMass() const
Definition peptidemodel.cpp:133

References getMass(), and getPrecursorMass().

## getPrecursorMass()

double pappso::specpeptidoms::PeptideModel::getPrecursorMass | ( |  | ) | const

Definition at line 115 of file peptidemodel.cpp.

{
return m_precursorMass;
}
pappso::specpeptidoms::PeptideModel::m_precursorMass
double m_precursorMass
Definition peptidemodel.h:94

References m_precursorMass.

Referenced by getNonAlignedMass().

## reset()

void pappso::specpeptidoms::PeptideModel::reset | ( |  | ) |

Definition at line 89 of file peptidemodel.cpp.

{
this->clear();
m_cterShift = 0;
m_nterShift = 0;
m_precursorMass = 0;
}

References m_cterShift, m_nterShift, and m_precursorMass.

## setCterShift()

void pappso::specpeptidoms::PeptideModel::setCterShift | ( | double | mass_shift | ) |

Definition at line 97 of file peptidemodel.cpp.

{
m_cterShift = mass_shift;
}

References m_cterShift.

## setNterShift()

void pappso::specpeptidoms::PeptideModel::setNterShift | ( | double | mass_shift | ) |

Definition at line 103 of file peptidemodel.cpp.

{
m_nterShift = mass_shift;
}

References m_nterShift.

## setPrecursorMass()

void pappso::specpeptidoms::PeptideModel::setPrecursorMass | ( | double | mass | ) |

Definition at line 109 of file peptidemodel.cpp.

{
m_precursorMass = mass;
}

References m_precursorMass.

## toInterpretation()

QString pappso::specpeptidoms::PeptideModel::toInterpretation | ( |  | ) | const

Definition at line 181 of file peptidemodel.cpp.

{
QString proforma;
if(size() > 0)
{
if(m_nterShift > 0)
{
proforma = '[' + QString::number(m_nterShift) + "]";
}
for(auto &aa : *this)
{
proforma.append(aa.toInterpretation());
}
if(m_cterShift > 0)
{
proforma = "[" + QString::number(m_cterShift) + ']';
}
}
return proforma;
}

References m_cterShift, and m_nterShift.

Referenced by pappso::cbor::psm::PsmSpecPeptidOmsScan::sequenceAlignment(), and pappso::cbor::psm::PsmSpecPeptidOmsScan::storeAlignment().

## toProForma()

QString pappso::specpeptidoms::PeptideModel::toProForma | ( |  | ) | const

Definition at line 146 of file peptidemodel.cpp.

{
double mass_delta = m_precursorMass - getMass();
QString proforma("[");
if(mass_delta > 0)
{
proforma.append("+");
}
proforma.append(QString("%1]?").arg(QString::number(mass_delta, 'f', 4)));
proforma.replace("[+0.0000]?", "");
proforma.replace("[-0.0000]?", "");
// QString proforma;
if(size() > 0)
{
if(m_nterShift != 0)
{
proforma = '[' + toProFormaMass(m_nterShift) + "]-";
}
for(auto &aa : *this)
{
proforma.append(aa.toProForma());
}
if(m_cterShift != 0)
{
proforma = "-[" + toProFormaMass(m_cterShift) + ']';
}
}
return proforma;
}
pappso::specpeptidoms::PeptideModel::toProFormaMass
static QString toProFormaMass(double mass)
Definition peptidemodel.cpp:120

References getMass(), m_cterShift, m_nterShift, m_precursorMass, and toProFormaMass().

Referenced by pappso::cbor::psm::PsmSpecPeptidOmsScan::storeAlignment().

## toProFormaMass()

QString pappso::specpeptidoms::PeptideModel::toProFormaMass | ( | double | mass | ) |

static

Definition at line 120 of file peptidemodel.cpp.

{
if(mass > 0)
{
return QString("+%1").arg(QString::number(mass, 'f', 4));
}
else
{
return QString("%1").arg(QString::number(mass, 'f', 4));
}
}

Referenced by pappso::specpeptidoms::AminoAcidModel::toProForma(), and toProForma().

## Member Data Documentation

## m_cterShift

double pappso::specpeptidoms::PeptideModel::m_cterShift = 0

private

Definition at line 92 of file peptidemodel.h.

Referenced by getMass(), reset(), setCterShift(), toInterpretation(), and toProForma().

## m_nterShift

double pappso::specpeptidoms::PeptideModel::m_nterShift = 0

private

Definition at line 93 of file peptidemodel.h.

Referenced by getMass(), reset(), setNterShift(), toInterpretation(), and toProForma().

## m_precursorMass

double pappso::specpeptidoms::PeptideModel::m_precursorMass = 0

private

Definition at line 94 of file peptidemodel.h.

Referenced by getPrecursorMass(), reset(), setPrecursorMass(), and toProForma().

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

- pappsomspp/core/processing/specpeptidoms/peptidemodel.h
- pappsomspp/core/processing/specpeptidoms/peptidemodel.cpp