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

`#include <peptidemeasurements.h>`

Inheritance diagram for pappso::masschroq::PeptideMeasurements:

## Public Member Functions

| PeptideMeasurements (const PeptideObservationSp &peptide_observations)
| PeptideMeasurements (const PeptideMeasurements &other)
virtual | ~PeptideMeasurements ()
void | prepareMeasurements (const pappso::MsRunId &targeted_msrun, const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
virtual void | detectQuantifyPeaks (const QuantificationMethodSp &quantification_method) override
const PeptideObservationSp & | getPeptideObservationSp () 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

PeptideObservationSp | msp_peptideObservation

## 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

group together a peptide and measurements made on this peptide

Definition at line 57 of file peptidemeasurements.h.

## Constructor & Destructor Documentation

## PeptideMeasurements() [1/2]

pappso::masschroq::PeptideMeasurements::PeptideMeasurements | ( | const PeptideObservationSp & | peptide_observations | ) |

Default constructor

Definition at line 35 of file peptidemeasurements.cpp.

{
msp_peptideObservation = peptide;
}
pappso::masschroq::PeptideMeasurements::msp_peptideObservation
PeptideObservationSp msp_peptideObservation
Definition peptidemeasurements.h:88

References msp_peptideObservation.

Referenced by PeptideMeasurements().

## PeptideMeasurements() [2/2]

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

Copy constructor

Parameters

  other | TODO

Definition at line 41 of file peptidemeasurements.cpp.

: PeptideMeasurementsBase(other)
{
msp_peptideObservation = other.msp_peptideObservation;
}
pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase
PeptideMeasurementsBase()
Definition peptidemeasurementsbase.cpp:34

References PeptideMeasurements(), pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase(), and msp_peptideObservation.

## ~PeptideMeasurements()

pappso::masschroq::PeptideMeasurements::~PeptideMeasurements | ( |  | ) |

virtual

Destructor

Definition at line 47 of file peptidemeasurements.cpp.

{
}

## Member Function Documentation

## detectQuantifyPeaks()

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

override virtual

Implements pappso::masschroq::PeptideMeasurementsBase.

Definition at line 101 of file peptidemeasurements.cpp.

{
qDebug();
pappso::TracePeakList peak_list;
std::vector<double> observed_rt_list =
msp_peptideObservation.get()->getObservedRetentionTimesOverallChargeStates();
std::vector<std::uint8_t> observed_charge_states =
msp_peptideObservation->getObservedChargeStates();
for(auto &measure_one : m_measurementList)
{
qDebug();
pappso::Xic *xic_p = measure_one.msp_xicCoord.get()->xicSptr.get();
if(xic_p == nullptr)
{
throw pappso::PappsoException(QObject::tr("xic_p == nullptr"));
}
peak_list.clear();
std::size_t nb_peaks = 0;
quantification_method.get()->getTraceDetectionInterfaceCstSPtr().get()->detect(
*xic_p, peak_list, false);
qDebug();
auto it_best_matched_peak = findBestTracePeakGivenRtList(
peak_list.begin(), peak_list.end(), observed_rt_list, nb_peaks);
qDebug();
measure_one.m_peakQualityCategory = PeakQualityCategory::missed;
bool direct_charge_observation_in_msrun = true;
if(observed_charge_states.end() ==
find(observed_charge_states.begin(), observed_charge_states.end(), measure_one.m_charge))
{
direct_charge_observation_in_msrun = false;
}
if(it_best_matched_peak != peak_list.end())
{
measure_one.m_tracePeakSp = it_best_matched_peak->makeTracePeakCstSPtr();
if(nb_peaks == 1)
{
measure_one.m_peakQualityCategory = PeakQualityCategory::za;
if(direct_charge_observation_in_msrun)
measure_one.m_peakQualityCategory = PeakQualityCategory::a;
if(observed_rt_list.size() > 1)
{
measure_one.m_peakQualityCategory = PeakQualityCategory::zaa;
if(direct_charge_observation_in_msrun)
measure_one.m_peakQualityCategory = PeakQualityCategory::aa;
}
}
else if(nb_peaks > 1)
{
measure_one.m_peakQualityCategory = PeakQualityCategory::zab;
if(direct_charge_observation_in_msrun)
measure_one.m_peakQualityCategory = PeakQualityCategory::ab;
}
}
}
}
pappso::masschroq::PeptideMeasurementsBase::m_measurementList
std::vector< Measurement > m_measurementList
Definition peptidemeasurementsbase.h:117
pappso::masschroq::PeakQualityCategory::a
@ a
peak detected using a single direct MS2 observation
Definition types.h:46
pappso::masschroq::PeakQualityCategory::ab
@ ab
Definition types.h:47
pappso::masschroq::PeakQualityCategory::missed
@ missed
no peak found at all
Definition types.h:60
pappso::masschroq::PeakQualityCategory::aa
@ aa
best possible : more than one direct MS2 fragmentation in same MSRUN
Definition types.h:45
pappso::masschroq::PeakQualityCategory::zab
@ zab
Definition types.h:51
pappso::masschroq::PeakQualityCategory::za
@ za
Definition types.h:50
pappso::masschroq::PeakQualityCategory::zaa
@ zaa
Definition types.h:49
pappso::findBestTracePeakGivenRtList
PMSPP_LIB_DECL std::vector< TracePeak >::iterator findBestTracePeakGivenRtList(std::vector< TracePeak >::iterator begin, std::vector< TracePeak >::iterator end, const std::vector< double > &rt_list, std::size_t &nb_peaks)
find the best peak matching a list of retention times
Definition tracepeaklist.cpp:54

References pappso::masschroq::a, pappso::masschroq::aa, pappso::masschroq::ab, pappso::findBestTracePeakGivenRtList(), pappso::masschroq::QuantificationMethod::getTraceDetectionInterfaceCstSPtr(), pappso::masschroq::PeptideMeasurementsBase::m_measurementList, pappso::masschroq::missed, msp_peptideObservation, pappso::masschroq::za, pappso::masschroq::zaa, and pappso::masschroq::zab.

## getPeptideObservationSp()

const pappso::masschroq::PeptideObservationSp & pappso::masschroq::PeptideMeasurements::getPeptideObservationSp | ( |  | ) | const

Definition at line 166 of file peptidemeasurements.cpp.

{
return msp_peptideObservation;
}

References msp_peptideObservation.

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

## prepareMeasurements()

void pappso::masschroq::PeptideMeasurements::prepareMeasurements | ( | const pappso::MsRunId & | targeted_msrun,
|  | const MsRunGroup * | msrun_group_p,
|  | const QuantificationMethodSp & | quantification_method )

Definition at line 52 of file peptidemeasurements.cpp.

{
// for one peptide
pappso::masschroq::Peptide *the_peptide_p = msp_peptideObservation.get()->getPeptideSp().get();
// 1) charge states
// 2) isotope list
std::vector<std::uint8_t> charge_states = the_peptide_p->getAllObservedChargeStateList();
double best_rt = msp_peptideObservation.get()->getBestRtOverallChargeStates();
pappso::XicCoordSPtr best_xic_coord = msp_peptideObservation.get()->getBestXicCoord();
if(best_xic_coord.get() == nullptr)
{
throw pappso::PappsoException("best_xic_coord.get() == nullptr");
}
for(std::uint8_t charge : charge_states)
{
if(msrun_group_p->getIonMobilityGridSp().get() != nullptr)
{
// Ion mobility TimsTOF coordinates
best_xic_coord = msp_peptideObservation.get()->getBestXicCoordSPtrForCharge(charge);
if(best_xic_coord.get() == nullptr)
{
// now in this ms run, we do not have ion mobility index for
// this charge we must chek out in other msrun for this charge
best_xic_coord = the_peptide_p->getBestIonMobilityXicCoordToExtractOverallMsRunGroup(
*msrun_group_p, targeted_msrun, charge);
}
if(best_xic_coord.get() == nullptr)
continue;
best_xic_coord.get()->rtTarget = best_rt;
}
prepareMeasurementsForPeptide(
*the_peptide_p, quantification_method, best_xic_coord, charge, best_rt);
}
}
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::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::MsRunGroup::getIonMobilityGridSp(), msp_peptideObservation, and pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide().

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

## Member Data Documentation

## msp_peptideObservation

PeptideObservationSp pappso::masschroq::PeptideMeasurements::msp_peptideObservation

private

Definition at line 88 of file peptidemeasurements.h.

Referenced by PeptideMeasurements(), PeptideMeasurements(), detectQuantifyPeaks(), getPeptideObservationSp(), and prepareMeasurements().

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

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