Loading...
Searching...
No Matches
pappso::masschroq::Peptide Class Reference

`#include <peptide.h>`

Inheritance diagram for pappso::masschroq::Peptide:

## Classes

struct | AlignedPeakPositionElement
| internal structure to compute consensus retention times More...
struct | MsRunXicCoordCharge
| internal structure to store msrun + charge + intensity + xic coordinate More...

## Public Member Functions

| Peptide (const QString &id, const pappso::PeptideSp &peptide_sp, const std::vector< ProteinSp > &protein_list)
| constructor
| Peptide (const Peptide &other)
virtual | ~Peptide ()
virtual void | computeIsotopologues (double ni_min_abundance) override
| compute possible isotopes for this molecule
const QString & | getId () const
| get peptide unique identifier
void | setMods (const QString &mods)
| set optional information as text to this peptide
const QString & | getMods () const
| get optional information as text
void | addObservedChargeState (std::uint8_t charge)
void | addObservedInMsRunSp (const MsRunSp &msrun_sp)
const std::vector< std::uint8_t > & | getAllObservedChargeStateList () const
const std::vector< ProteinSp > & | getProteinSpList () const
void | addAlignedPeakMeasurement (const PeptideMeasurements::Measurement &one_xic_measure, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
| accumulate retention time information for MS1 peak measurement
void | addAlignedPeptideObservation (const PeptideObservation &peptide_observation, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
| accumulate retention time information for MS2 observation convenient function used while collecting data from first pass quantification process
void | computeConsensusRetentionTime ()
| compute consensus retention time (on MS2 observations and MS1 peak measurements) the computation is based on data collected during the first pass of quantification
bool | isObservedInMsRunSp (const MsRun *msrun_p)
| tell if this peptide is observed (MS2 fragmentation and identification) in this msrun
pappso::XicCoordSPtr | getBestXicCoordSPtrForChargeInMsRunGroup (const MsRunGroup *msrun_group_p, std::uint8_t charge) const
| get the XIC coordinates of the higher observed intensity for this peptide and charge in other MS run in the group
pappso::XicCoordSPtr | getBestIonMobilityXicCoordToExtractOverallMsRunGroup (const MsRunGroup &msrun_group, const pappso::MsRunId &targeted_msrun, std::uint8_t charge) const
| get ion mobility coordinates corrected against other MSruns in the group
void | setReferenceMsRunRetentionTimePtr (const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p)
| sets the current msrun retention time reference
double | getConsensusPeakRetentionTime () const
| get consensus retention time based on XIC peak measurements
double | getConsensusMs2RetentionTime () const
| get consensus retention time based on MS2 fragmenation and identification events
void | addMsRunXicCoordCharge (const MsRunXicCoordCharge &msrun_xic_coord)
void | populateIonMobilityGrid (pappso::IonMobilityGrid *ion_mobility_grid_p) const
| Populate ion mobility grid with observed XIC coordinates for this peptide on all MSruns The ion mobility grid only works with Tims TOF mobility index.
void | setJsonLabelList (const QJsonObject &json_label_list)
| build peptide label map from JSON label_list object
PeptideLabel * | getPeptideLabelPtr (const QString &label) const
| get a peptide label pointer with the corresponding label identifier
const std::map< QString, PeptideLabelSp > & | getPeptideLabelMap () const
| get the peptide label label_list
Public Member Functions inherited from pappso::masschroq::PeptideBase
| PeptideBase (const pappso::PeptideSp &peptide_sp)
virtual | ~PeptideBase ()
virtual const pappso::PeptideSp & | getPappsoPeptideSp () const
| get the peptide sequence
virtual const pappso::PeptideNaturalIsotopeList * | getPeptideNaturalIsotopeList () const
| get list of isotopes for this peptide needs computeIsotopologues before
virtual const std::vector< pappso::PeptideNaturalIsotopeAverageSp > & | getPeptideNaturalIsotopeAverageSpList (pappso::PrecisionPtr precision, std::uint8_t charge, double ni_min_abundance)
| get possible and distinguishable masses of isotopes get list of distinguishable isotopes given the charge and mass precision

## Private Attributes

const QString | m_id
const std::vector< ProteinSp > | m_proteinSpList
QString | m_mods
std::vector< std::uint8_t > | m_allObservedChargeStateList
std::vector< MsRunSp > | m_observedInMsRunSpList
std::vector< AlignedPeakPositionElement > | m_alignedPeakPositionElementList
double | m_consensusAlignedPeakRetentionTime = 0
double | m_consensusAlignedMs2RetentionTime = 0
const pappso::MsRunRetentionTime< QString > * | mp_referenceMsRunRetentionTime = nullptr
std::vector< double > | m_referenceMs2ObservationList
std::vector< MsRunXicCoordCharge > | m_msRunXicCoordChargeList
std::map< QString, PeptideLabelSp > | m_peptideLabelMap

## Additional Inherited Members

Protected Attributes inherited from pappso::masschroq::PeptideBase
const pappso::PeptideSp | msp_peptide
pappso::PeptideNaturalIsotopeList * | mpa_peptideNaturalIsotopeList = nullptr
std::map< std::uint8_t, std::vector< pappso::PeptideNaturalIsotopeAverageSp > > | m_peptideNaturalIsotopeAverageSpListByCharge
double | m_niMinAbundance = 0
QMutex | m_mutex

## Detailed Description

unique studied entity representing the molecule we want to measure

Definition at line 57 of file peptide.h.

## Constructor & Destructor Documentation

## Peptide() [1/2]

pappso::masschroq::Peptide::Peptide | ( | const QString & | id,
|  | const pappso::PeptideSp & | peptide_sp,
|  | const std::vector< ProteinSp > & | protein_list )

constructor

Parameters

  id | unique identifier for this peptide
  msp_peptide | peptide sequence
  protein_list | vector of protein shared pointer linked to this peptide^

Definition at line 36 of file peptide.cpp.

: PeptideBase(peptide_sp), m_id(id), m_proteinSpList(protein_list)
{
}
pappso::masschroq::PeptideBase::PeptideBase
PeptideBase(const pappso::PeptideSp &peptide_sp)
Definition peptidebase.cpp:31
pappso::masschroq::Peptide::m_proteinSpList
const std::vector< ProteinSp > m_proteinSpList
Definition peptide.h:238
pappso::masschroq::Peptide::m_id
const QString m_id
Definition peptide.h:237

References pappso::masschroq::PeptideBase::PeptideBase(), m_id, and m_proteinSpList.

Referenced by Peptide().

## Peptide() [2/2]

pappso::masschroq::Peptide::Peptide | ( | const Peptide & | other | ) |

Copy constructor

Parameters

  other | TODO

Definition at line 43 of file peptide.cpp.

: PeptideBase(other.msp_peptide), m_id(other.m_id), m_proteinSpList(other.m_proteinSpList)
{
m_mods = other.m_mods;
}
pappso::masschroq::Peptide::m_mods
QString m_mods
Definition peptide.h:239

References Peptide(), pappso::masschroq::PeptideBase::PeptideBase(), m_id, m_mods, m_proteinSpList, and pappso::masschroq::PeptideBase::msp_peptide.

## ~Peptide()

pappso::masschroq::Peptide::~Peptide | ( |  | ) |

virtual

Destructor

Definition at line 49 of file peptide.cpp.

{
if(mpa_peptideNaturalIsotopeList != nullptr)
delete mpa_peptideNaturalIsotopeList;
}
pappso::masschroq::PeptideBase::mpa_peptideNaturalIsotopeList
pappso::PeptideNaturalIsotopeList * mpa_peptideNaturalIsotopeList
Definition peptidebase.h:89

References pappso::masschroq::PeptideBase::mpa_peptideNaturalIsotopeList.

## Member Function Documentation

## addAlignedPeakMeasurement()

void pappso::masschroq::Peptide::addAlignedPeakMeasurement | ( | const PeptideMeasurements::Measurement & | one_xic_measure,
|  | const pappso::MsRunRetentionTime< QString > & | msrun_retention_time )

accumulate retention time information for MS1 peak measurement

convenient function used while collecting data from first pass quantification process

Parameters

  one_xic_measure | a peak to process
  msrun_retention_time | the msrun retention time converter for this msrun

Definition at line 140 of file peptide.cpp.

{
if(one_xic_measure.m_tracePeakSp.get() != nullptr)
{
AlignedPeakPositionElement position;
position.intensity = one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().y;
if(msrun_retention_time.isAligned())
{
position.alignedRetentionTime =
msrun_retention_time.translateOriginal2AlignedRetentionTime(
one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x);
position.alignedRetentionTimeCenter =
msrun_retention_time.translateOriginal2AlignedRetentionTime(
(one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x +
one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x) /
2);
}
else
{
position.alignedRetentionTime = one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x;
position.alignedRetentionTimeCenter =
((one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x +
one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x) /
2);
}
/*
position.alignedRetentionTime =
position.alignedRetentionTime +
((position.alignedRetentionTimeCenter - position.alignedRetentionTime) /
4);*/
position.wide = one_xic_measure.m_tracePeakSp.get()->getArea();
// one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x -
// one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x;
m_alignedPeakPositionElementList.push_back(position);
}
}
pappso::MsRunRetentionTime::isAligned
bool isAligned() const
Definition msrunretentiontime.cpp:395
pappso::MsRunRetentionTime::translateOriginal2AlignedRetentionTime
double translateOriginal2AlignedRetentionTime(double original_retention_time) const
Definition msrunretentiontime.cpp:288
pappso::masschroq::Peptide::m_alignedPeakPositionElementList
std::vector< AlignedPeakPositionElement > m_alignedPeakPositionElementList
Definition peptide.h:243
pappso::PeptideIonCter::x
@ x
Definition peptide.h:92
pappso::masschroq::Peptide::AlignedPeakPositionElement
internal structure to compute consensus retention times
Definition peptide.h:145
pappso::masschroq::Peptide::AlignedPeakPositionElement::intensity
double intensity
Definition peptide.h:147

References pappso::masschroq::Peptide::AlignedPeakPositionElement::alignedRetentionTime, pappso::masschroq::Peptide::AlignedPeakPositionElement::alignedRetentionTimeCenter, pappso::masschroq::Peptide::AlignedPeakPositionElement::intensity, pappso::MsRunRetentionTime< T >::isAligned(), m_alignedPeakPositionElementList, pappso::masschroq::PeptideMeasurementsBase::Measurement::m_tracePeakSp, pappso::MsRunRetentionTime< T >::translateOriginal2AlignedRetentionTime(), pappso::masschroq::Peptide::AlignedPeakPositionElement::wide, and pappso::x.

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptidePeakRetentionTime().

## addAlignedPeptideObservation()

void pappso::masschroq::Peptide::addAlignedPeptideObservation | ( | const PeptideObservation & | peptide_observation,
|  | const pappso::MsRunRetentionTime< QString > & | msrun_retention_time )

accumulate retention time information for MS2 observation convenient function used while collecting data from first pass quantification process

Parameters

  peptide_observation | an MS2 observation
  msrun_retention_time | the msrun retention time converter for this msrun

Definition at line 180 of file peptide.cpp.

{
double best_rt = peptide_observation.getBestXicCoord().get()->rtTarget;
if(msrun_retention_time.isAligned())
{
best_rt = msrun_retention_time.translateOriginal2AlignedRetentionTime(best_rt);
}
m_referenceMs2ObservationList.push_back(best_rt);
}
pappso::masschroq::Peptide::m_referenceMs2ObservationList
std::vector< double > m_referenceMs2ObservationList
Definition peptide.h:249

References pappso::masschroq::PeptideObservation::getBestXicCoord(), pappso::MsRunRetentionTime< T >::isAligned(), m_referenceMs2ObservationList, and pappso::MsRunRetentionTime< T >::translateOriginal2AlignedRetentionTime().

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptideMs2RetentionTime().

## addMsRunXicCoordCharge()

void pappso::masschroq::Peptide::addMsRunXicCoordCharge | ( | const MsRunXicCoordCharge & | msrun_xic_coord | ) |

Definition at line 272 of file peptide.cpp.

{
m_msRunXicCoordChargeList.push_back(msrun_xic_coord);
}
pappso::masschroq::Peptide::m_msRunXicCoordChargeList
std::vector< MsRunXicCoordCharge > m_msRunXicCoordChargeList
Definition peptide.h:251

References m_msRunXicCoordChargeList.

Referenced by pappso::masschroq::MsRunPeptideList::addPeptideScanNumberObservation(), and pappso::masschroq::MsRunPeptideList::addPeptideSpectrumIndexObservation().

## addObservedChargeState()

void pappso::masschroq::Peptide::addObservedChargeState | ( | std::uint8_t | charge | ) |

Definition at line 106 of file peptide.cpp.

{
if(m_allObservedChargeStateList.end() ==
std::find(m_allObservedChargeStateList.begin(), m_allObservedChargeStateList.end(), charge))
{
m_allObservedChargeStateList.push_back(charge);
}
}
pappso::masschroq::Peptide::m_allObservedChargeStateList
std::vector< std::uint8_t > m_allObservedChargeStateList
Definition peptide.h:240

References m_allObservedChargeStateList.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

## addObservedInMsRunSp()

void pappso::masschroq::Peptide::addObservedInMsRunSp | ( | const MsRunSp & | msrun_sp | ) |

Definition at line 123 of file peptide.cpp.

{
auto it = std::find(m_observedInMsRunSpList.begin(), m_observedInMsRunSpList.end(), msrun_sp);
if(it == m_observedInMsRunSpList.end())
{
m_observedInMsRunSpList.push_back(msrun_sp);
}
}
pappso::masschroq::Peptide::m_observedInMsRunSpList
std::vector< MsRunSp > m_observedInMsRunSpList
Definition peptide.h:241

References m_observedInMsRunSpList.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

## computeConsensusRetentionTime()

void pappso::masschroq::Peptide::computeConsensusRetentionTime | ( |  | ) |

compute consensus retention time (on MS2 observations and MS1 peak measurements) the computation is based on data collected during the first pass of quantification

Definition at line 194 of file peptide.cpp.

{
m_consensusAlignedPeakRetentionTime = 0;
if(m_alignedPeakPositionElementList.size() > 0)
{
std::sort(m_alignedPeakPositionElementList.begin(),
m_alignedPeakPositionElementList.end(),
[](AlignedPeakPositionElement const &a, AlignedPeakPositionElement const &b) {
return a.wide > b.wide;
});
// take only the 90% best measures
std::size_t limit = m_alignedPeakPositionElementList.size() * 0.9;
if(limit < 5)
{
limit = m_alignedPeakPositionElementList.size();
// throw pappso::PappsoException("limit < 3");
}
double total_intensity = std::accumulate(m_alignedPeakPositionElementList.begin(),
m_alignedPeakPositionElementList.begin() + limit,
(double)0.0,
[](double sum, AlignedPeakPositionElement &element) {
sum += element.intensity;
return (sum);
});
double sum_rt = std::accumulate(m_alignedPeakPositionElementList.begin(),
m_alignedPeakPositionElementList.begin() + limit,
(double)0.0,
[](double sum, AlignedPeakPositionElement &element) {
sum += element.intensity * element.alignedRetentionTime;
return (sum);
});
m_consensusAlignedPeakRetentionTime = sum_rt / total_intensity;
}
m_alignedPeakPositionElementList.clear();
double sum_rt = std::accumulate(
m_referenceMs2ObservationList.begin(), m_referenceMs2ObservationList.end(), (double)0.0);
m_consensusAlignedMs2RetentionTime = sum_rt / (double)m_referenceMs2ObservationList.size();
m_referenceMs2ObservationList.clear();
}
pappso::masschroq::Peptide::m_consensusAlignedPeakRetentionTime
double m_consensusAlignedPeakRetentionTime
Definition peptide.h:245
pappso::masschroq::Peptide::m_consensusAlignedMs2RetentionTime
double m_consensusAlignedMs2RetentionTime
Definition peptide.h:246
pappso::masschroq::PeakQualityCategory::a
@ a
peak detected using a single direct MS2 observation
Definition types.h:46
pappso::masschroq::PeakQualityCategory::b
@ b
Definition types.h:52

References pappso::masschroq::a, pappso::masschroq::b, m_alignedPeakPositionElementList, m_consensusAlignedMs2RetentionTime, m_consensusAlignedPeakRetentionTime, and m_referenceMs2ObservationList.

## computeIsotopologues()

void pappso::masschroq::Peptide::computeIsotopologues | ( | double | ni_min_abundance | ) |

override virtual

compute possible isotopes for this molecule

Parameters

  ni_min_abundance | the minimal isotop abundance proportion to cover (0.9 will compute isotopes to reach at least 90% of its theoretical abundance

Reimplemented from pappso::masschroq::PeptideBase.

Definition at line 56 of file peptide.cpp.

{
qDebug();
if(ni_min_abundance > 0)
{
if(m_peptideLabelMap.size() > 0)
{
qDebug();
for(auto &pair_label : m_peptideLabelMap)
{
qDebug() << pair_label.second.get();
pair_label.second->computeIsotopologues(ni_min_abundance);
qDebug();
}
qDebug();
}
else
{
qDebug();
PeptideBase::computeIsotopologues(ni_min_abundance);
}
}
qDebug();
}
pappso::masschroq::PeptideBase::computeIsotopologues
virtual void computeIsotopologues(double ni_min_abundance)
compute possible isotopes for this molecule
Definition peptidebase.cpp:48
pappso::masschroq::Peptide::m_peptideLabelMap
std::map< QString, PeptideLabelSp > m_peptideLabelMap
Definition peptide.h:253

References pappso::masschroq::PeptideBase::computeIsotopologues(), and m_peptideLabelMap.

## getAllObservedChargeStateList()

const std::vector< std::uint8_t > & pappso::masschroq::Peptide::getAllObservedChargeStateList | ( |  | ) | const

Definition at line 116 of file peptide.cpp.

{
return m_allObservedChargeStateList;
}

References m_allObservedChargeStateList.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements(), and pappso::masschroq::PeptideMeasurements::prepareMeasurements().

## getBestIonMobilityXicCoordToExtractOverallMsRunGroup()

pappso::XicCoordSPtr pappso::masschroq::Peptide::getBestIonMobilityXicCoordToExtractOverallMsRunGroup | ( | const MsRunGroup & | msrun_group,
|  | const pappso::MsRunId & | targeted_msrun,
|  | std::uint8_t | charge ) const

get ion mobility coordinates corrected against other MSruns in the group

Parameters

  msrun_group_p | pointer on the msrun group
  targeted_msrun | the xic coordinate target (required to adjust ion mobility to this msrun)
  charge | the targeted charge

Returns
  pappso::XicCoordSPtr shared pointer on xic coordinate

Definition at line 351 of file peptide.cpp.

{
pappso::XicCoordSPtr xic_coord_mean;
std::size_t count = 0;
pappso::IonMobilityGrid *ion_mobility_grid_p = msrun_group.getIonMobilityGridSp().get();
for(auto &msrun_xic_coord_charge : m_msRunXicCoordChargeList)
{
if(msrun_group.contains(msrun_xic_coord_charge.msrun_p))
{
if(msrun_xic_coord_charge.charge == charge)
{
// compute the mean coordinate :
pappso::XicCoordSPtr xic_coord_to_add = msrun_xic_coord_charge.xic_coord_sp;
if(ion_mobility_grid_p != nullptr)
{
// ion mobility coordinate translation for the targeted msrun
xic_coord_to_add = ion_mobility_grid_p->translateXicCoordFromTo(
*xic_coord_to_add.get(),
*(msrun_xic_coord_charge.msrun_p->getMsRunReaderSPtr()
.get()
->getMsRunId()
.get()),
targeted_msrun);
}
if(xic_coord_mean.get() == nullptr)
{
xic_coord_mean = xic_coord_to_add.get()->initializeAndClone();
}
else
{
xic_coord_mean = xic_coord_mean.get()->addition(xic_coord_to_add);
}
count++;
qDebug() << " xic_coord_mean.get()->toString=" << xic_coord_mean.get()->toString();
}
}
}
if(xic_coord_mean.get() != nullptr)
{
xic_coord_mean = xic_coord_mean.get()->divideBy(count);
}
return xic_coord_mean;
}
pappso::IonMobilityGrid::translateXicCoordFromTo
pappso::XicCoordSPtr translateXicCoordFromTo(const pappso::XicCoord &source_xic_coord, const MsRunId &source_msrunid, const MsRunId &target_msrunid) const
Definition ionmobilitygrid.cpp:129
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44

References pappso::masschroq::MsRunGroup::contains(), pappso::masschroq::MsRunGroup::getIonMobilityGridSp(), m_msRunXicCoordChargeList, and pappso::IonMobilityGrid::translateXicCoordFromTo().

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements(), and pappso::masschroq::PeptideMeasurements::prepareMeasurements().

## getBestXicCoordSPtrForChargeInMsRunGroup()

pappso::XicCoordSPtr pappso::masschroq::Peptide::getBestXicCoordSPtrForChargeInMsRunGroup | ( | const MsRunGroup * | msrun_group_p,
|  | std::uint8_t | charge ) const

get the XIC coordinates of the higher observed intensity for this peptide and charge in other MS run in the group

Parameters

  msrun_group_p | pointer on the msrun group
  charge | the targeted charge

Returns
  pappso::XicCoordSPtr shared pointer on xic coordinate

Definition at line 280 of file peptide.cpp.

{
// get XIC coordinates of the most intense precursor
pappso::pappso_double intensity = -1;
pappso::XicCoordSPtr best_xic_coord;
for(auto &xic_coord_charge : m_msRunXicCoordChargeList)
{
if(msrun_group_p->contains(xic_coord_charge.msrun_p))
{
if(xic_coord_charge.charge == charge)
{
if(xic_coord_charge.intensity > intensity)
{
intensity = xic_coord_charge.intensity;
best_xic_coord = xic_coord_charge.xic_coord_sp;
qDebug();
}
}
}
}
return best_xic_coord;
}
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:60

References pappso::masschroq::MsRunGroup::contains(), and m_msRunXicCoordChargeList.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

## getConsensusMs2RetentionTime()

double pappso::masschroq::Peptide::getConsensusMs2RetentionTime | ( |  | ) | const

get consensus retention time based on MS2 fragmenation and identification events

Returns
  retention time in seconds

Definition at line 265 of file peptide.cpp.

{
return m_consensusAlignedMs2RetentionTime;
}

References m_consensusAlignedMs2RetentionTime.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

## getConsensusPeakRetentionTime()

double pappso::masschroq::Peptide::getConsensusPeakRetentionTime | ( |  | ) | const

get consensus retention time based on XIC peak measurements

Returns
  retention time in seconds

Definition at line 259 of file peptide.cpp.

{
return m_consensusAlignedPeakRetentionTime;
}

References m_consensusAlignedPeakRetentionTime.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

## getId()

const QString & pappso::masschroq::Peptide::getId | ( |  | ) | const

get peptide unique identifier

Definition at line 82 of file peptide.cpp.

{
return m_id;
}

References m_id.

Referenced by pappso::masschroq::JsonInput::read_peptide_list(), pappso::masschroq::CborOutputStream::writeMbrPeptideMeasurements(), and pappso::masschroq::CborOutputStream::writePeptideMeasurements().

## getMods()

const QString & pappso::masschroq::Peptide::getMods | ( |  | ) | const

get optional information as text

Definition at line 94 of file peptide.cpp.

{
return m_mods;
}

References m_mods.

Referenced by pappso::masschroq::CborOutputStream::writeMbrPeptideMeasurements(), and pappso::masschroq::CborOutputStream::writePeptideMeasurements().

## getPeptideLabelMap()

const std::map< QString, pappso::masschroq::PeptideLabelSp > & pappso::masschroq::Peptide::getPeptideLabelMap | ( |  | ) | const

get the peptide label label_list

Definition at line 100 of file peptide.cpp.

{
return m_peptideLabelMap;
}

References m_peptideLabelMap.

Referenced by pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide().

## getPeptideLabelPtr()

pappso::masschroq::PeptideLabel * pappso::masschroq::Peptide::getPeptideLabelPtr | ( | const QString & | label | ) | const

get a peptide label pointer with the corresponding label identifier

Definition at line 433 of file peptide.cpp.

{
auto it = m_peptideLabelMap.find(label);
if(it == m_peptideLabelMap.end())
{
throw pappso::ExceptionNotFound(
QObject::tr("ERROR: label %1 not found in peptide %2").arg(label).arg(m_id));
}
return it->second.get();
}

References m_id, and m_peptideLabelMap.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

## getProteinSpList()

const std::vector< pappso::masschroq::ProteinSp > & pappso::masschroq::Peptide::getProteinSpList | ( |  | ) | const

Definition at line 134 of file peptide.cpp.

{
return m_proteinSpList;
}

References m_proteinSpList.

## isObservedInMsRunSp()

bool pappso::masschroq::Peptide::isObservedInMsRunSp | ( | const MsRun * | msrun_p | ) |

tell if this peptide is observed (MS2 fragmentation and identification) in this msrun

Parameters

  msrun_p | msrun pointer

Returns
  true if observed, false otherwise

Definition at line 240 of file peptide.cpp.

{
auto it =
std::find_if(m_observedInMsRunSpList.begin(),
m_observedInMsRunSpList.end(),
[msrun_p](const pappso::masschroq::MsRunSp &a) { return (a.get() == msrun_p); });
if(it == m_observedInMsRunSpList.end())
return false;
return true;
}
pappso::masschroq::MsRunSp
std::shared_ptr< MsRun > MsRunSp
Definition msrun.h:44

References pappso::masschroq::a, and m_observedInMsRunSpList.

## populateIonMobilityGrid()

void pappso::masschroq::Peptide::populateIonMobilityGrid | ( | pappso::IonMobilityGrid * | ion_mobility_grid_p | ) | const

Populate ion mobility grid with observed XIC coordinates for this peptide on all MSruns The ion mobility grid only works with Tims TOF mobility index.

Definition at line 308 of file peptide.cpp.

{
for(auto &xic_coord_charge_a : m_msRunXicCoordChargeList)
{
// qInfo() << " observed_in_a";
const pappso::MsRunId &msrun_id_a =
*(xic_coord_charge_a.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
pappso::XicCoordSPtr xic_coord_a = xic_coord_charge_a.xic_coord_sp;
for(auto &xic_coord_charge_b : m_msRunXicCoordChargeList)
{
if(&xic_coord_charge_a == &xic_coord_charge_b)
{
break;
}
else
{
// qInfo() << " observed_in_b";
const pappso::MsRunId &msrun_id_b =
*(xic_coord_charge_b.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
if(msrun_id_b == msrun_id_a)
{
}
else
{
pappso::XicCoordSPtr xic_coord_b = xic_coord_charge_b.xic_coord_sp;
if(xic_coord_charge_a.charge == xic_coord_charge_b.charge)
{
ion_mobility_grid_p->storeObservedIdentityBetween(
msrun_id_a, xic_coord_a.get(), msrun_id_b, xic_coord_b.get());
}
}
}
}
}
}
pappso::IonMobilityGrid::storeObservedIdentityBetween
void storeObservedIdentityBetween(const MsRunId &msrun_ida, const XicCoord *xic_coorda, const MsRunId &msrun_idb, const XicCoord *xic_coordb)
Definition ionmobilitygrid.cpp:46

References m_msRunXicCoordChargeList, and pappso::IonMobilityGrid::storeObservedIdentityBetween().

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

## setJsonLabelList()

void pappso::masschroq::Peptide::setJsonLabelList | ( | const QJsonObject & | json_label_list | ) |

build peptide label map from JSON label_list object

Definition at line 405 of file peptide.cpp.

{
auto it = json_label_list.begin();
while(it != json_label_list.end())
{
QString label = it.key();
QString proforma = it.value().toObject().value("proforma").toString();
pappso::masschroq::PeptideLabelSp peptide_label_sp;
if(proforma.isEmpty())
{
throw pappso::ExceptionNotFound(
QObject::tr("ERROR: label %1 %2 must contain proforma sequence").arg(label).arg(m_id));
}
else
{
peptide_label_sp = std::make_shared<pappso::masschroq::PeptideLabel>(
pappso::PeptideProFormaParser::parseString(proforma), this, label);
}
m_peptideLabelMap.insert({label, peptide_label_sp});
it++;
}
}
pappso::PeptideProFormaParser::parseString
static PeptideSp parseString(const QString &pepstr)
Definition peptideproformaparser.cpp:228
pappso::masschroq::PeptideLabelSp
std::shared_ptr< PeptideLabel > PeptideLabelSp
Definition peptide.h:52

References m_id, m_peptideLabelMap, and pappso::PeptideProFormaParser::parseString().

Referenced by pappso::masschroq::JsonInput::read_peptide_list().

## setMods()

void pappso::masschroq::Peptide::setMods | ( | const QString & | mods | ) |

set optional information as text to this peptide

Definition at line 88 of file peptide.cpp.

{
m_mods = mods;
}

References m_mods.

Referenced by pappso::masschroq::JsonInput::read_peptide_list().

## setReferenceMsRunRetentionTimePtr()

void pappso::masschroq::Peptide::setReferenceMsRunRetentionTimePtr | ( | const pappso::MsRunRetentionTime< QString > * | msrun_retention_time_reference_p | ) |

sets the current msrun retention time reference

Parameters

  pappso::MsRunRetentionTime<QString> | msrun run retention time reference

Definition at line 252 of file peptide.cpp.

{
mp_referenceMsRunRetentionTime = msrun_retention_time_reference_p;
}
pappso::masschroq::Peptide::mp_referenceMsRunRetentionTime
const pappso::MsRunRetentionTime< QString > * mp_referenceMsRunRetentionTime
Definition peptide.h:248

References mp_referenceMsRunRetentionTime.

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptideMs2RetentionTime(), and pappso::masschroq::MsRunPeptideList::collectPeptidePeakRetentionTime().

## Member Data Documentation

## m_alignedPeakPositionElementList

std::vector<AlignedPeakPositionElement> pappso::masschroq::Peptide::m_alignedPeakPositionElementList

private

Definition at line 243 of file peptide.h.

Referenced by addAlignedPeakMeasurement(), and computeConsensusRetentionTime().

## m_allObservedChargeStateList

std::vector<std::uint8_t> pappso::masschroq::Peptide::m_allObservedChargeStateList

private

Definition at line 240 of file peptide.h.

Referenced by addObservedChargeState(), and getAllObservedChargeStateList().

## m_consensusAlignedMs2RetentionTime

double pappso::masschroq::Peptide::m_consensusAlignedMs2RetentionTime = 0

private

Definition at line 246 of file peptide.h.

Referenced by computeConsensusRetentionTime(), and getConsensusMs2RetentionTime().

## m_consensusAlignedPeakRetentionTime

double pappso::masschroq::Peptide::m_consensusAlignedPeakRetentionTime = 0

private

Definition at line 245 of file peptide.h.

Referenced by computeConsensusRetentionTime(), and getConsensusPeakRetentionTime().

## m_id

const QString pappso::masschroq::Peptide::m_id

private

Definition at line 237 of file peptide.h.

Referenced by Peptide(), Peptide(), getId(), getPeptideLabelPtr(), and setJsonLabelList().

## m_mods

QString pappso::masschroq::Peptide::m_mods

private

Definition at line 239 of file peptide.h.

Referenced by Peptide(), getMods(), and setMods().

## m_msRunXicCoordChargeList

std::vector<MsRunXicCoordCharge> pappso::masschroq::Peptide::m_msRunXicCoordChargeList

private

Definition at line 251 of file peptide.h.

Referenced by addMsRunXicCoordCharge(), getBestIonMobilityXicCoordToExtractOverallMsRunGroup(), getBestXicCoordSPtrForChargeInMsRunGroup(), and populateIonMobilityGrid().

## m_observedInMsRunSpList

std::vector<MsRunSp> pappso::masschroq::Peptide::m_observedInMsRunSpList

private

Definition at line 241 of file peptide.h.

Referenced by addObservedInMsRunSp(), and isObservedInMsRunSp().

## m_peptideLabelMap

std::map<QString, PeptideLabelSp> pappso::masschroq::Peptide::m_peptideLabelMap

private

Definition at line 253 of file peptide.h.

Referenced by computeIsotopologues(), getPeptideLabelMap(), getPeptideLabelPtr(), and setJsonLabelList().

## m_proteinSpList

const std::vector<ProteinSp> pappso::masschroq::Peptide::m_proteinSpList

private

Definition at line 238 of file peptide.h.

Referenced by Peptide(), Peptide(), and getProteinSpList().

## m_referenceMs2ObservationList

std::vector<double> pappso::masschroq::Peptide::m_referenceMs2ObservationList

private

Definition at line 249 of file peptide.h.

Referenced by addAlignedPeptideObservation(), and computeConsensusRetentionTime().

## mp_referenceMsRunRetentionTime

const pappso::MsRunRetentionTime<QString>* pappso::masschroq::Peptide::mp_referenceMsRunRetentionTime = nullptr

private

Definition at line 248 of file peptide.h.

Referenced by setReferenceMsRunRetentionTimePtr().

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

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