pappso::PeptideIsotopeSpectrumMatch Class Reference

`#include <peptideisotopespectrummatch.h>`

## Public Types

typedef std::list< PeakIonIsotopeMatch >::const_iterator | const_iterator

## Public Member Functions

| PeptideIsotopeSpectrumMatch (const MassSpectrum &spectrum, const PeptideSp &peptide_sp, unsigned int parent_charge, PrecisionPtr precision, std::list< PeptideIon > ion_list, unsigned int max_isotope_number, unsigned int max_isotope_rank)
| annotate spectrum with peptide ions and isotopes More...
| PeptideIsotopeSpectrumMatch (const MassSpectrum &spectrum, std::vector< PeptideNaturalIsotopeAverageSp > v_peptideIsotopeList, std::vector< PeptideFragmentIonSp > v_peptideIonList, PrecisionPtr precision)
| PeptideIsotopeSpectrumMatch (const PeptideIsotopeSpectrumMatch &other)
| ~PeptideIsotopeSpectrumMatch ()
const std::list< PeakIonIsotopeMatch > & | getPeakIonIsotopeMatchList () const
unsigned int | size () const
const_iterator | begin () const
const_iterator | end () const

## Private Member Functions

virtual std::list< DataPoint >::iterator | getBestPeakIterator (std::list< DataPoint > &peak_list, const PeptideNaturalIsotopeAverage &ion) const

## Private Attributes

PrecisionPtr | _precision
std::list< PeakIonIsotopeMatch > | _peak_ion_match_list

## Detailed Description

Definition at line 39 of file peptideisotopespectrummatch.h.

## Member Typedef Documentation

## const_iterator

typedef std::list<PeakIonIsotopeMatch>::const_iterator pappso::PeptideIsotopeSpectrumMatch::const_iterator

Definition at line 71 of file peptideisotopespectrummatch.h.

## Constructor & Destructor Documentation

## PeptideIsotopeSpectrumMatch() [1/3]

pappso::PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch | ( | const MassSpectrum & | spectrum,
|  | const PeptideSp & | peptide_sp,
|  | unsigned int | parent_charge,
|  | PrecisionPtr | precision,
|  | std::list< PeptideIon > | ion_list,
|  | unsigned int | max_isotope_number,
|  | unsigned int | max_isotope_rank
| ) |  |

annotate spectrum with peptide ions and isotopes

Parameters

  spectrum | the spectrum to annotate
  peptide_sp | peptide to fragment
  parent_charge | charge of the ion parent
  precision | MS2 mass measurement precision
  ion_list | ion types to compute fragments
  max_isotope_number | maximum isotope number to compute (0 means only monoisotope is computed)
  max_isotope_rank | maximum rank inside isotope level to compute

## PeptideIsotopeSpectrumMatch() [2/3]

pappso::PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch | ( | const MassSpectrum & | spectrum,
|  | std::vector< PeptideNaturalIsotopeAverageSp > | v_peptideIsotopeList,
|  | std::vector< PeptideFragmentIonSp > | v_peptideIonList,
|  | PrecisionPtr | precision
| ) |  |

Definition at line 116 of file peptideisotopespectrummatch.cpp.

: _precision(precision)
{
qDebug() << "PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch begin";
if(v_peptideIsotopeList.size() != v_peptideIonList.size())
{
throw PappsoException(
QObject::tr(
"v_peptideIsotopeList.size() %1 != v_peptideIonList.size() %2")
.arg(v_peptideIsotopeList.size())
.arg(v_peptideIonList.size()));
}
auto isotopeIt = v_peptideIsotopeList.begin();
auto ionIt = v_peptideIonList.begin();
std::list<DataPoint> peak_list(spectrum.begin(), spectrum.end());
while(isotopeIt != v_peptideIsotopeList.end())
{
std::list<DataPoint>::iterator it_peak =
getBestPeakIterator(peak_list, *(isotopeIt->get()));
if(it_peak != peak_list.end())
{
_peak_ion_match_list.push_back(
PeakIonIsotopeMatch(*it_peak, *isotopeIt, *ionIt));
peak_list.erase(it_peak);
}
isotopeIt++;
ionIt++;
}
qDebug() << "PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch end";
}
pappso::PeptideIsotopeSpectrumMatch::_precision
PrecisionPtr _precision
Definition: peptideisotopespectrummatch.h:94
pappso::PeptideIsotopeSpectrumMatch::_peak_ion_match_list
std::list< PeakIonIsotopeMatch > _peak_ion_match_list
Definition: peptideisotopespectrummatch.h:95
pappso::PeptideIsotopeSpectrumMatch::getBestPeakIterator
virtual std::list< DataPoint >::iterator getBestPeakIterator(std::list< DataPoint > &peak_list, const PeptideNaturalIsotopeAverage &ion) const
Definition: peptideisotopespectrummatch.cpp:167

References _peak_ion_match_list, and getBestPeakIterator().

## PeptideIsotopeSpectrumMatch() [3/3]

pappso::PeptideIsotopeSpectrumMatch::PeptideIsotopeSpectrumMatch | ( | const PeptideIsotopeSpectrumMatch & | other | ) |

Definition at line 154 of file peptideisotopespectrummatch.cpp.

: _precision(other._precision),
_peak_ion_match_list(other._peak_ion_match_list)
{
}

## ~PeptideIsotopeSpectrumMatch()

pappso::PeptideIsotopeSpectrumMatch::~PeptideIsotopeSpectrumMatch | ( |  | ) |

Definition at line 161 of file peptideisotopespectrummatch.cpp.

{
}

## Member Function Documentation

## begin()

const_iterator pappso::PeptideIsotopeSpectrumMatch::begin | ( |  | ) | const

inline

Definition at line 79 of file peptideisotopespectrummatch.h.

{
return _peak_ion_match_list.begin();
}

## end()

const_iterator pappso::PeptideIsotopeSpectrumMatch::end | ( |  | ) | const

inline

Definition at line 84 of file peptideisotopespectrummatch.h.

{
return _peak_ion_match_list.end();
}

## getBestPeakIterator()

std::list< DataPoint >::iterator pappso::PeptideIsotopeSpectrumMatch::getBestPeakIterator | ( | std::list< DataPoint > & | peak_list,
|  | const PeptideNaturalIsotopeAverage & | ion
| ) |  | const

private virtual

Definition at line 167 of file peptideisotopespectrummatch.cpp.

{
// qDebug();
std::list<DataPoint>::iterator itpeak = peak_list.begin();
std::list<DataPoint>::iterator itend = peak_list.end();
std::list<DataPoint>::iterator itselect = peak_list.end();
pappso_double best_intensity = 0;
while(itpeak != itend)
{
if(ion.matchPeak(itpeak->x))
{
if(itpeak->y > best_intensity)
{
best_intensity = itpeak->y;
itselect = itpeak;
}
}
itpeak++;
}
// qDebug();
return (itselect);
}
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition: types.h:48

References pappso::PeptideNaturalIsotopeAverage::matchPeak().

Referenced by PeptideIsotopeSpectrumMatch().

## getPeakIonIsotopeMatchList()

const std::list< PeakIonIsotopeMatch > & pappso::PeptideIsotopeSpectrumMatch::getPeakIonIsotopeMatchList | ( |  | ) | const

Definition at line 195 of file peptideisotopespectrummatch.cpp.

{
return _peak_ion_match_list;
}

References _peak_ion_match_list.

Referenced by pappso::IonIsotopeRatioScore::IonIsotopeRatioScore(), and pappso::MassSpectrumWidget::peptideAnnotate().

## size()

unsigned int pappso::PeptideIsotopeSpectrumMatch::size | ( |  | ) | const

inline

Definition at line 74 of file peptideisotopespectrummatch.h.

{
return _peak_ion_match_list.size();
}

## Member Data Documentation

## _peak_ion_match_list

std::list<PeakIonIsotopeMatch> pappso::PeptideIsotopeSpectrumMatch::_peak_ion_match_list

private

Definition at line 95 of file peptideisotopespectrummatch.h.

Referenced by PeptideIsotopeSpectrumMatch(), and getPeakIonIsotopeMatchList().

## _precision

PrecisionPtr pappso::PeptideIsotopeSpectrumMatch::_precision

private

Definition at line 94 of file peptideisotopespectrummatch.h.

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

- pappsomspp/psm/peptideisotopespectrummatch.h
- pappsomspp/psm/peptideisotopespectrummatch.cpp