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

`#include <peptideobservation.h>`

## Classes

struct | Observation

## Public Member Functions

| PeptideObservation (PeptideSp peptide)
| PeptideObservation (const PeptideObservation &other)
virtual | ~PeptideObservation ()
const PeptideSp & | getPeptideSp () const
void | addObservation (const PeptideObservation::Observation &observation)
std::vector< std::uint8_t > | getObservedChargeStates () const
double | getBestRtOverallChargeStates () const
std::vector< double > | getObservedRetentionTimesOverallChargeStates () const
pappso::XicCoordSPtr | getBestXicCoordSPtrForCharge (std::uint8_t charge) const
pappso::XicCoordSPtr | getBestXicCoord () const
const std::vector< Observation > & | getObservationList () const

## Private Attributes

PeptideSp | msp_peptide
std::vector< Observation > | m_observationList

## Detailed Description

Todo
  group together one Peptide and observations on this peptide

Definition at line 47 of file peptideobservation.h.

## Constructor & Destructor Documentation

## PeptideObservation() [1/2]

pappso::masschroq::PeptideObservation::PeptideObservation | ( | PeptideSp | peptide | ) |

Default constructor

Definition at line 34 of file peptideobservation.cpp.

: msp_peptide(peptide)
{
}
pappso::masschroq::PeptideObservation::msp_peptide
PeptideSp msp_peptide
Definition peptideobservation.h:98

References msp_peptide.

Referenced by PeptideObservation().

## PeptideObservation() [2/2]

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

Copy constructor

Parameters

  other | TODO

Definition at line 40 of file peptideobservation.cpp.

: msp_peptide(other.msp_peptide)
{
m_observationList = other.m_observationList;
}
pappso::masschroq::PeptideObservation::m_observationList
std::vector< Observation > m_observationList
Definition peptideobservation.h:99

References PeptideObservation(), m_observationList, and msp_peptide.

## ~PeptideObservation()

pappso::masschroq::PeptideObservation::~PeptideObservation | ( |  | ) |

virtual

Destructor

Definition at line 46 of file peptideobservation.cpp.

{
}

## Member Function Documentation

## addObservation()

void pappso::masschroq::PeptideObservation::addObservation | ( | const PeptideObservation::Observation & | observation | ) |

Definition at line 51 of file peptideobservation.cpp.

{
m_observationList.push_back(observation);
}

References m_observationList.

## getBestRtOverallChargeStates()

double pappso::masschroq::PeptideObservation::getBestRtOverallChargeStates | ( |  | ) | const

Definition at line 77 of file peptideobservation.cpp.

{
double best_rt = 0;
double intensity = -1;
for(auto &observation : m_observationList)
{
if(observation.msp_precursor.get()->getIntensity() > intensity)
{
best_rt = observation.msp_precursor.get()->getXicCoordSPtr().get()->rtTarget;
intensity = observation.msp_precursor.get()->getIntensity();
}
}
return best_rt;
}

References m_observationList.

## getBestXicCoord()

pappso::XicCoordSPtr pappso::masschroq::PeptideObservation::getBestXicCoord | ( |  | ) | const

Definition at line 117 of file peptideobservation.cpp.

{
// get XIC coordinates of the most intense precursor
pappso::pappso_double intensity = -1;
pappso::XicCoordSPtr best_xic_coord;
for(auto &observation : m_observationList)
{
if(observation.msp_precursor.get()->getIntensity() > intensity)
{
intensity = observation.msp_precursor.get()->getIntensity();
best_xic_coord = observation.msp_precursor.get()->getXicCoordSPtr();
qDebug();
}
}
return best_xic_coord;
}
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:60
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44

References m_observationList.

Referenced by pappso::masschroq::Peptide::addAlignedPeptideObservation().

## getBestXicCoordSPtrForCharge()

pappso::XicCoordSPtr pappso::masschroq::PeptideObservation::getBestXicCoordSPtrForCharge | ( | std::uint8_t | charge | ) | const

Definition at line 94 of file peptideobservation.cpp.

{
// get XIC coordinates of the most intense precursor
pappso::pappso_double intensity = -1;
pappso::XicCoordSPtr best_xic_coord;
for(auto &observation : m_observationList)
{
if(observation.m_charge == charge)
{
if(observation.msp_precursor.get()->getIntensity() > intensity)
{
intensity = observation.msp_precursor.get()->getIntensity();
best_xic_coord = observation.msp_precursor.get()->getXicCoordSPtr();
qDebug();
}
}
}
return best_xic_coord;
}

References m_observationList.

## getObservationList()

const std::vector< pappso::masschroq::PeptideObservation::Observation > & pappso::masschroq::PeptideObservation::getObservationList | ( |  | ) | const

Definition at line 150 of file peptideobservation.cpp.

{
return m_observationList;
}

References m_observationList.

## getObservedChargeStates()

std::vector< std::uint8_t > pappso::masschroq::PeptideObservation::getObservedChargeStates | ( |  | ) | const

Definition at line 57 of file peptideobservation.cpp.

{
std::vector<std::uint8_t> charge_list;
for(auto &observation : m_observationList)
{
charge_list.push_back(observation.m_charge);
}
std::sort(charge_list.begin(), charge_list.end());
charge_list.erase(std::unique(charge_list.begin(), charge_list.end()), charge_list.end());
return charge_list;
}

References m_observationList.

## getObservedRetentionTimesOverallChargeStates()

std::vector< double > pappso::masschroq::PeptideObservation::getObservedRetentionTimesOverallChargeStates | ( |  | ) | const

Definition at line 138 of file peptideobservation.cpp.

{
std::vector<double> rt_list;
for(auto &observation : m_observationList)
{
rt_list.push_back(observation.msp_precursor.get()->getXicCoordSPtr().get()->rtTarget);
}
return rt_list;
}

References m_observationList.

## getPeptideSp()

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

Definition at line 71 of file peptideobservation.cpp.

{
return msp_peptide;
}

References msp_peptide.

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

## Member Data Documentation

## m_observationList

std::vector<Observation> pappso::masschroq::PeptideObservation::m_observationList

private

Definition at line 99 of file peptideobservation.h.

Referenced by PeptideObservation(), addObservation(), getBestRtOverallChargeStates(), getBestXicCoord(), getBestXicCoordSPtrForCharge(), getObservationList(), getObservedChargeStates(), and getObservedRetentionTimesOverallChargeStates().

## msp_peptide

PeptideSp pappso::masschroq::PeptideObservation::msp_peptide

private

Definition at line 98 of file peptideobservation.h.

Referenced by PeptideObservation(), PeptideObservation(), and getPeptideSp().

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

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