Loading...
Searching...
No Matches
pappso::masschroq::PeptideMeasurementsBase Class Referenceabstract

`#include <peptidemeasurementsbase.h>`

Inheritance diagram for pappso::masschroq::PeptideMeasurementsBase:

## Classes

struct | Measurement

## Public Member Functions

| 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 | detectQuantifyPeaks (const QuantificationMethodSp &quantification_method)=0
virtual void | flushXics () final
virtual void | clear () final
| clear the measurement vector

## Protected Member Functions

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

std::vector< Measurement > | m_measurementList

## Detailed Description

Todo
  write docs

Definition at line 48 of file peptidemeasurementsbase.h.

## Constructor & Destructor Documentation

## PeptideMeasurementsBase() [1/2]

pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase | ( |  | ) |

Default constructor

Definition at line 34 of file peptidemeasurementsbase.cpp.

{
}

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

## PeptideMeasurementsBase() [2/2]

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

Definition at line 42 of file peptidemeasurementsbase.cpp.

{
m_measurementList = other.m_measurementList;
}
pappso::masschroq::PeptideMeasurementsBase::m_measurementList
std::vector< Measurement > m_measurementList
Definition peptidemeasurementsbase.h:117

References m_measurementList.

## ~PeptideMeasurementsBase()

pappso::masschroq::PeptideMeasurementsBase::~PeptideMeasurementsBase | ( |  | ) |

virtual

Destructor

Definition at line 38 of file peptidemeasurementsbase.cpp.

{
}

## Member Function Documentation

## clear()

void pappso::masschroq::PeptideMeasurementsBase::clear | ( |  | ) |

final virtual

clear the measurement vector

Definition at line 199 of file peptidemeasurementsbase.cpp.

{
m_measurementList.clear();
}

References m_measurementList.

Referenced by detectQuantifyPeaks().

## detectQuantifyPeaks()

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

pure virtual

Implemented in pappso::masschroq::MbrPeptideMeasurements, and pappso::masschroq::PeptideMeasurements.

References clear(), generateMeasurementsForIsotopeList(), and prepareMeasurementsForPeptide().

## flushXics()

void pappso::masschroq::PeptideMeasurementsBase::flushXics | ( |  | ) |

final virtual

Definition at line 189 of file peptidemeasurementsbase.cpp.

{
for(auto &measure_one : m_measurementList)
{
measure_one.msp_xicCoord.get()->xicSptr = nullptr;
}
}

References m_measurementList.

## generateMeasurementsForIsotopeList()

void pappso::masschroq::PeptideMeasurementsBase::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 virtual

Definition at line 56 of file peptidemeasurementsbase.cpp.

{
qDebug();
const std::vector<pappso::PeptideNaturalIsotopeAverageSp> &natural_isotope_average_list =
peptide_base.getPeptideNaturalIsotopeAverageSpList(
quantification_method.get()->getXicExtractionMeanPrecisionPtr(),
charge,
isotope_minimum_ratio);
for(pappso::PeptideNaturalIsotopeAverageSp isotope_average_sp : natural_isotope_average_list)
{
pappso::XicCoordSPtr xic_coord = best_xic_coord->initializeAndClone();
xic_coord.get()->rtTarget = best_rt;
xic_coord.get()->mzRange =
quantification_method.get()->getXicExtractionMzRange(isotope_average_sp.get()->getMz());
m_measurementList.push_back(
{charge, xic_coord, PeakQualityCategory::nomatch, label_p, nullptr, isotope_average_sp});
}
qDebug() << m_measurementList.size();
}
pappso::masschroq::PeakQualityCategory::nomatch
@ nomatch
Definition types.h:43
pappso::PeptideNaturalIsotopeAverageSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp
Definition peptidenaturalisotopeaverage.h:40
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44

References pappso::masschroq::PeptideBase::getPeptideNaturalIsotopeAverageSpList(), pappso::masschroq::QuantificationMethod::getXicExtractionMeanPrecisionPtr(), pappso::masschroq::QuantificationMethod::getXicExtractionMzRange(), m_measurementList, and pappso::masschroq::nomatch.

Referenced by detectQuantifyPeaks(), and prepareMeasurementsForPeptide().

## getMeasurementList()

const std::vector< pappso::masschroq::PeptideMeasurementsBase::Measurement > & pappso::masschroq::PeptideMeasurementsBase::getMeasurementList | ( |  | ) | const

virtual

Definition at line 50 of file peptidemeasurementsbase.cpp.

{
return m_measurementList;
}

References m_measurementList.

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

## prepareMeasurementsForPeptide()

void pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide | ( | Peptide & | the_peptide,
|  | const QuantificationMethodSp & | quantification_method,
|  | const pappso::XicCoordSPtr & | best_xic_coord,
|  | std::uint8_t | charge,
|  | double | best_rt )

final protected virtual

Definition at line 89 of file peptidemeasurementsbase.cpp.

{
double isotope_minimum_ratio = quantification_method.get()->getIsotopeMinimumRatio();
auto label_map = the_peptide.getPeptideLabelMap();
if(isotope_minimum_ratio > 0)
{
// isotope
if(label_map.size() > 0)
{
// isotope, label
for(auto &peptide_label_pair : label_map)
{
// for each label
qDebug();
generateMeasurementsForIsotopeList(*(peptide_label_pair.second.get()),
peptide_label_pair.second.get(),
quantification_method,
charge,
isotope_minimum_ratio,
best_xic_coord,
best_rt);
}
}
else
{
// isotope, no label
generateMeasurementsForIsotopeList(the_peptide,
nullptr,
quantification_method,
charge,
isotope_minimum_ratio,
best_xic_coord,
best_rt);
}
}
else
{
// no isotope
if(label_map.size() > 0)
{
// no isotope, label
for(auto &peptide_label_pair : label_map)
{
// for each label
qDebug();
double mz = peptide_label_pair.second->getPappsoPeptideSp().get()->getMz(charge);
pappso::XicCoordSPtr xic_coord = best_xic_coord->initializeAndClone();
xic_coord.get()->rtTarget = best_rt;
xic_coord.get()->mzRange = quantification_method.get()->getXicExtractionMzRange(mz);
m_measurementList.push_back({charge,
xic_coord,
PeakQualityCategory::nomatch,
peptide_label_pair.second.get(),
nullptr,
nullptr});
}
}
else
{
// no isotope, no label
double mz = the_peptide.getPappsoPeptideSp().get()->getMz(charge);
pappso::XicCoordSPtr xic_coord = best_xic_coord->initializeAndClone();
xic_coord.get()->rtTarget = best_rt;
xic_coord.get()->mzRange = quantification_method.get()->getXicExtractionMzRange(mz);
m_measurementList.push_back(
{charge, xic_coord, PeakQualityCategory::nomatch, nullptr, nullptr, nullptr});
}
}
}
pappso::masschroq::PeptideMeasurementsBase::generateMeasurementsForIsotopeList
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
Definition peptidemeasurementsbase.cpp:56
pappso::Enums::PrecisionUnit::mz
@ mz
Definition types.h:101

References generateMeasurementsForIsotopeList(), pappso::masschroq::QuantificationMethod::getIsotopeMinimumRatio(), pappso::masschroq::PeptideBase::getPappsoPeptideSp(), pappso::masschroq::Peptide::getPeptideLabelMap(), pappso::masschroq::QuantificationMethod::getXicExtractionMzRange(), m_measurementList, and pappso::masschroq::nomatch.

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

## pushBackXicCoordList()

void pappso::masschroq::PeptideMeasurementsBase::pushBackXicCoordList | ( | std::vector< pappso::XicCoordSPtr > & | xic_coord_list | ) | const

final virtual

Definition at line 175 of file peptidemeasurementsbase.cpp.

{
for(auto &measure : m_measurementList)
{
if(measure.msp_xicCoord.get()->rtTarget > 0)
{
xic_coord_list.push_back(measure.msp_xicCoord);
}
}
}

References m_measurementList.

Referenced by pappso::masschroq::MsRunPeptideList::addMbrPeptideMeasurementsSp2XicCoordList(), and pappso::masschroq::MsRunPeptideList::addPeptideObservation2XicCoordList().

## Member Data Documentation

## m_measurementList

std::vector<Measurement> pappso::masschroq::PeptideMeasurementsBase::m_measurementList

protected

Definition at line 117 of file peptidemeasurementsbase.h.

Referenced by PeptideMeasurementsBase(), clear(), pappso::masschroq::MbrPeptideMeasurements::detectQuantifyPeaks(), pappso::masschroq::PeptideMeasurements::detectQuantifyPeaks(), flushXics(), generateMeasurementsForIsotopeList(), getMeasurementList(), prepareMeasurementsForPeptide(), and pushBackXicCoordList().

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

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