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

`#include <mbrpeptidemeasurements.h>`

Inheritance diagram for pappso::masschroq::MbrPeptideMeasurements:

## Public Member Functions

| MbrPeptideMeasurements (const PeptideSp &peptide_sp)
| MbrPeptideMeasurements (const MbrPeptideMeasurements &other)
virtual | ~MbrPeptideMeasurements ()
void | prepareMeasurements (const pappso::MsRunId &targeted_msrun, const MsRunGroup *msrun_group_p, const pappso::MsRunRetentionTime< QString > &msrun_retention_time, const QuantificationMethodSp &quantification_method)
virtual void | detectQuantifyPeaks (const QuantificationMethodSp &quantification_method) override
const PeptideSp & | getPeptideSp () const
Public Member Functions inherited from pappso::masschroq::PeptideMeasurementsBase
| PeptideMeasurementsBase ()
| PeptideMeasurementsBase (const PeptideMeasurementsBase &other)
virtual | ~PeptideMeasurementsBase ()
virtual const std::vector< Measurement > & | getMeasurementList () const
virtual void | pushBackXicCoordList (std::vector< pappso::XicCoordSPtr > &xic_coord_list) const final
virtual void | flushXics () final
virtual void | clear () final
| clear the measurement vector

## Private Attributes

PeptideSp | msp_peptide
double | m_consensusMs2RetentionTime = 0

## Additional Inherited Members

Protected Member Functions inherited from pappso::masschroq::PeptideMeasurementsBase
virtual void | prepareMeasurementsForPeptide (Peptide &the_peptide, const QuantificationMethodSp &quantification_method, const pappso::XicCoordSPtr &best_xic_coord, std::uint8_t charge, double best_rt) final
virtual void | generateMeasurementsForIsotopeList (PeptideBase &peptide_base, const PeptideLabel *label_p, const QuantificationMethodSp &quantification_method, std::uint8_t charge, double isotope_minimum_ratio, const pappso::XicCoordSPtr &best_xic_coord, double best_rt) final
Protected Attributes inherited from pappso::masschroq::PeptideMeasurementsBase
std::vector< Measurement > | m_measurementList

## Detailed Description

Todo
  write docs

Definition at line 48 of file mbrpeptidemeasurements.h.

## Constructor & Destructor Documentation

## MbrPeptideMeasurements() [1/2]

pappso::masschroq::MbrPeptideMeasurements::MbrPeptideMeasurements | ( | const PeptideSp & | peptide_sp | ) |

Default constructor

Definition at line 35 of file mbrpeptidemeasurements.cpp.

: msp_peptide(peptide_sp)
{
if(msp_peptide.get() == nullptr)
{
throw pappso::PappsoException("msp_peptide.get() == nullptr");
}
}
pappso::masschroq::MbrPeptideMeasurements::msp_peptide
PeptideSp msp_peptide
Definition mbrpeptidemeasurements.h:76

References msp_peptide.

## MbrPeptideMeasurements() [2/2]

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

Definition at line 46 of file mbrpeptidemeasurements.cpp.

: PeptideMeasurementsBase(other)
{
msp_peptide = other.msp_peptide;
m_consensusMs2RetentionTime = other.m_consensusMs2RetentionTime;
}
pappso::masschroq::MbrPeptideMeasurements::m_consensusMs2RetentionTime
double m_consensusMs2RetentionTime
Definition mbrpeptidemeasurements.h:78
pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase
PeptideMeasurementsBase()
Definition peptidemeasurementsbase.cpp:34

References pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase(), m_consensusMs2RetentionTime, and msp_peptide.

## ~MbrPeptideMeasurements()

pappso::masschroq::MbrPeptideMeasurements::~MbrPeptideMeasurements | ( |  | ) |

virtual

Destructor

Definition at line 55 of file mbrpeptidemeasurements.cpp.

{
}

## Member Function Documentation

## detectQuantifyPeaks()

void pappso::masschroq::MbrPeptideMeasurements::detectQuantifyPeaks | ( | const QuantificationMethodSp & | quantification_method | ) |

override virtual

Implements pappso::masschroq::PeptideMeasurementsBase.

Definition at line 121 of file mbrpeptidemeasurements.cpp.

{
qDebug();
pappso::TracePeakList peak_list;
std::vector<std::uint8_t> all_charge_states = msp_peptide.get()->getAllObservedChargeStateList();
for(auto &measure_one : m_measurementList)
{
qDebug();
double rt_target = measure_one.msp_xicCoord.get()->rtTarget;
peak_list.clear();
quantification_method.get()->getTraceDetectionInterfaceCstSPtr().get()->detect(
*(measure_one.msp_xicCoord.get()->xicSptr.get()), peak_list, false);
qDebug();
measure_one.m_peakQualityCategory = PeakQualityCategory::missed;
if(m_consensusMs2RetentionTime > 0)
{
qDebug();
auto it_best_matched_peak = pappso::findTracePeakGivenRt(
peak_list.begin(), peak_list.end(), m_consensusMs2RetentionTime);
if(it_best_matched_peak != peak_list.end())
{
measure_one.m_tracePeakSp = it_best_matched_peak->makeTracePeakCstSPtr();
measure_one.m_peakQualityCategory = PeakQualityCategory::c;
if(it_best_matched_peak->containsRt(rt_target))
{
measure_one.m_peakQualityCategory = PeakQualityCategory::b;
}
}
else
{
it_best_matched_peak =
pappso::findTracePeakGivenRt(peak_list.begin(), peak_list.end(), rt_target);
if(it_best_matched_peak != peak_list.end())
{
measure_one.m_tracePeakSp = it_best_matched_peak->makeTracePeakCstSPtr();
measure_one.m_peakQualityCategory = PeakQualityCategory::d;
}
}
}
}
}
pappso::masschroq::PeptideMeasurementsBase::m_measurementList
std::vector< Measurement > m_measurementList
Definition peptidemeasurementsbase.h:117
pappso::masschroq::PeakQualityCategory::missed
@ missed
no peak found at all
Definition types.h:60
pappso::masschroq::PeakQualityCategory::c
@ c
Definition types.h:54
pappso::masschroq::PeakQualityCategory::d
@ d
Definition types.h:56
pappso::masschroq::PeakQualityCategory::b
@ b
Definition types.h:52
pappso::findTracePeakGivenRt
PMSPP_LIB_DECL std::vector< TracePeak >::iterator findTracePeakGivenRt(std::vector< TracePeak >::iterator begin, std::vector< TracePeak >::iterator end, double rt)
find the peak matching a retention time
Definition tracepeaklist.cpp:78

References pappso::masschroq::b, pappso::masschroq::c, pappso::masschroq::d, pappso::findTracePeakGivenRt(), pappso::masschroq::QuantificationMethod::getTraceDetectionInterfaceCstSPtr(), m_consensusMs2RetentionTime, pappso::masschroq::PeptideMeasurementsBase::m_measurementList, pappso::masschroq::missed, and msp_peptide.

## getPeptideSp()

const pappso::masschroq::PeptideSp & pappso::masschroq::MbrPeptideMeasurements::getPeptideSp | ( |  | ) | const

Definition at line 172 of file mbrpeptidemeasurements.cpp.

{
return msp_peptide;
}

References msp_peptide.

Referenced by pappso::masschroq::CborOutputStream::writeMbrPeptideMeasurements().

## prepareMeasurements()

void pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements | ( | const pappso::MsRunId & | targeted_msrun,
|  | const MsRunGroup * | msrun_group_p,
|  | const pappso::MsRunRetentionTime< QString > & | msrun_retention_time,
|  | const QuantificationMethodSp & | quantification_method )

Definition at line 61 of file mbrpeptidemeasurements.cpp.

{
// for one peptide
pappso::masschroq::Peptide *the_peptide_p = msp_peptide.get();
// 1) charge states
// 2) isotope list
std::vector<std::uint8_t> charge_states = the_peptide_p->getAllObservedChargeStateList();
m_consensusMs2RetentionTime = the_peptide_p->getConsensusMs2RetentionTime();
if(msrun_retention_time.isAligned())
{
m_consensusMs2RetentionTime =
msrun_retention_time.translateAligned2OriginalRetentionTime(m_consensusMs2RetentionTime);
}
double consensus_rt = the_peptide_p->getConsensusPeakRetentionTime();
if(consensus_rt > 0)
{
if(msrun_retention_time.isAligned())
{
consensus_rt = msrun_retention_time.translateAligned2OriginalRetentionTime(consensus_rt);
}
}
for(std::uint8_t charge : charge_states)
{
pappso::XicCoordSPtr best_xic_coord;
if(msrun_group_p->getIonMobilityGridSp().get() != nullptr)
{
best_xic_coord = the_peptide_p->getBestIonMobilityXicCoordToExtractOverallMsRunGroup(
*msrun_group_p, targeted_msrun, charge);
}
else
{
best_xic_coord =
the_peptide_p->getBestXicCoordSPtrForChargeInMsRunGroup(msrun_group_p, charge);
}
if(best_xic_coord.get() == nullptr)
{
// We can not quantify it in this msrun group
}
else
{
prepareMeasurementsForPeptide(
*the_peptide_p, quantification_method, best_xic_coord, charge, consensus_rt);
}
}
}
pappso::MsRunRetentionTime::isAligned
bool isAligned() const
Definition msrunretentiontime.cpp:395
pappso::MsRunRetentionTime::translateAligned2OriginalRetentionTime
double translateAligned2OriginalRetentionTime(double aligned_retention_time) const
Definition msrunretentiontime.cpp:336
pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide
virtual void prepareMeasurementsForPeptide(Peptide &the_peptide, const QuantificationMethodSp &quantification_method, const pappso::XicCoordSPtr &best_xic_coord, std::uint8_t charge, double best_rt) final
Definition peptidemeasurementsbase.cpp:89
pappso::masschroq::Peptide::getAllObservedChargeStateList
const std::vector< std::uint8_t > & getAllObservedChargeStateList() const
Definition peptide.cpp:116
pappso::masschroq::Peptide::getConsensusMs2RetentionTime
double getConsensusMs2RetentionTime() const
get consensus retention time based on MS2 fragmenation and identification events
Definition peptide.cpp:265
pappso::masschroq::Peptide::getBestXicCoordSPtrForChargeInMsRunGroup
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 ...
Definition peptide.cpp:280
pappso::masschroq::Peptide::getConsensusPeakRetentionTime
double getConsensusPeakRetentionTime() const
get consensus retention time based on XIC peak measurements
Definition peptide.cpp:259
pappso::masschroq::Peptide::getBestIonMobilityXicCoordToExtractOverallMsRunGroup
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
Definition peptide.cpp:351
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44

References pappso::masschroq::Peptide::getAllObservedChargeStateList(), pappso::masschroq::Peptide::getBestIonMobilityXicCoordToExtractOverallMsRunGroup(), pappso::masschroq::Peptide::getBestXicCoordSPtrForChargeInMsRunGroup(), pappso::masschroq::Peptide::getConsensusMs2RetentionTime(), pappso::masschroq::Peptide::getConsensusPeakRetentionTime(), pappso::masschroq::MsRunGroup::getIonMobilityGridSp(), pappso::MsRunRetentionTime< T >::isAligned(), m_consensusMs2RetentionTime, msp_peptide, pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide(), and pappso::MsRunRetentionTime< T >::translateAligned2OriginalRetentionTime().

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

## Member Data Documentation

## m_consensusMs2RetentionTime

double pappso::masschroq::MbrPeptideMeasurements::m_consensusMs2RetentionTime = 0

private

Definition at line 78 of file mbrpeptidemeasurements.h.

Referenced by MbrPeptideMeasurements(), detectQuantifyPeaks(), and prepareMeasurements().

## msp_peptide

PeptideSp pappso::masschroq::MbrPeptideMeasurements::msp_peptide

private

Definition at line 76 of file mbrpeptidemeasurements.h.

Referenced by MbrPeptideMeasurements(), MbrPeptideMeasurements(), detectQuantifyPeaks(), getPeptideSp(), and prepareMeasurements().

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

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