Loading...
Searching...
No Matches
pappso::IonIsotopeRatioScore Class Reference

`#include <ionisotoperatioscore.h>`

## Public Member Functions

| IonIsotopeRatioScore (const MassSpectrum &spectrum, const PeptideSp &peptide_sp, unsigned int parent_charge, PrecisionPtr precision, std::vector< PeptideIon > ion_list)
virtual | ~IonIsotopeRatioScore ()
pappso::pappso_double | getIonIsotopeRatioScore () const

## Private Attributes

pappso::pappso_double | m_ionIsotopeRatioScore

## Detailed Description

Definition at line 36 of file ionisotoperatioscore.h.

## Constructor & Destructor Documentation

## IonIsotopeRatioScore()

IonIsotopeRatioScore::IonIsotopeRatioScore | ( | const MassSpectrum & | spectrum,
|  | const PeptideSp & | peptide_sp,
|  | unsigned int | parent_charge,
|  | PrecisionPtr | precision,
|  | std::vector< PeptideIon > | ion_list
| ) |  |

Definition at line 34 of file ionisotoperatioscore.cpp.

{
std::list<PeptideIon> ion_list(ion_vector.begin(), ion_vector.end());
PeptideIsotopeSpectrumMatch psm_match(
spectrum, peptide_sp, parent_charge, precision, ion_list, 1, 1);
Trace scaterplot;
for(PeptideIon ion_type : ion_vector)
{
std::vector<double> mono_th_intensities(peptide_sp.get()->size(), 0);
std::vector<double> isotope_th_intensities(peptide_sp.get()->size(), 0);
std::vector<double> mono_exp_intensities(peptide_sp.get()->size(), 0);
std::vector<double> isotope_exp_intensities(peptide_sp.get()->size(), 0);
for(const PeakIonIsotopeMatch &peak_ion_match :
psm_match.getPeakIonIsotopeMatchList())
{
if(peak_ion_match.getPeptideIonType() == ion_type)
{
std::size_t vector_position =
peak_ion_match.getPeptideFragmentIonSp().get()->size() - 1;
PeptideNaturalIsotopeAverageSp iso_average_sp =
peak_ion_match.getPeptideNaturalIsotopeAverageSp();
if(iso_average_sp.get()->getIsotopeNumber() == 0)
{
mono_th_intensities[vector_position] =
iso_average_sp.get()->getIntensityRatio();
mono_exp_intensities[vector_position] =
peak_ion_match.getPeak().y;
}
else if(iso_average_sp.get()->getIsotopeNumber() == 1)
{
isotope_th_intensities[vector_position] =
iso_average_sp.get()->getIntensityRatio();
isotope_exp_intensities[vector_position] =
peak_ion_match.getPeak().y;
}
}
}
for(std::size_t i = 0; i < mono_th_intensities.size(); i++)
{
if((mono_th_intensities[i] != 0) && (isotope_th_intensities[i] != 0))
{
DataPoint xy(mono_th_intensities[i] / isotope_th_intensities[i],
mono_exp_intensities[i] /
isotope_exp_intensities[i]);
scaterplot.push_back(xy);
}
}
}
scaterplot.sortX();
LinearRegression linear_regression(scaterplot);
m_ionIsotopeRatioScore = linear_regression.getCoefficientOfDetermination();
}
pappso::IonIsotopeRatioScore::m_ionIsotopeRatioScore
pappso::pappso_double m_ionIsotopeRatioScore
Definition ionisotoperatioscore.h:49
pappso::LinearRegression
Definition linearregression.h:33
pappso::PeakIonIsotopeMatch
Definition peakionisotopematch.h:47
pappso::PeptideIsotopeSpectrumMatch
Definition peptideisotopespectrummatch.h:40
pappso::Trace
A simple container of DataPoint instances.
Definition trace.h:148
pappso::Trace::sortX
void sortX(SortOrder sort_order=SortOrder::ascending)
Definition trace.cpp:1086
pappso::PeptideIon
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
Definition types.h:425
pappso::MzFormat::xy
@ xy
(x,y) format
pappso::PeptideNaturalIsotopeAverageSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp
Definition peptidenaturalisotopeaverage.h:40
pappso::DataPoint
Definition datapoint.h:22

References pappso::LinearRegression::getCoefficientOfDetermination(), pappso::PeptideIsotopeSpectrumMatch::getPeakIonIsotopeMatchList(), m_ionIsotopeRatioScore, pappso::Trace::sortX(), and pappso::xy.

## ~IonIsotopeRatioScore()

IonIsotopeRatioScore::~IonIsotopeRatioScore | ( |  | ) |

virtual

Definition at line 99 of file ionisotoperatioscore.cpp.

{
}

## Member Function Documentation

## getIonIsotopeRatioScore()

pappso::pappso_double IonIsotopeRatioScore::getIonIsotopeRatioScore | ( |  | ) | const

Definition at line 104 of file ionisotoperatioscore.cpp.

{
return m_ionIsotopeRatioScore;
}

References m_ionIsotopeRatioScore.

## Member Data Documentation

## m_ionIsotopeRatioScore

pappso::pappso_double pappso::IonIsotopeRatioScore::m_ionIsotopeRatioScore

private

Definition at line 49 of file ionisotoperatioscore.h.

Referenced by IonIsotopeRatioScore(), and getIonIsotopeRatioScore().

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

- pappsomspp/psm/experimental/ionisotoperatioscore.h
- pappsomspp/psm/experimental/ionisotoperatioscore.cpp