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

`#include <morpheusscore.h>`

## Public Member Functions

| MorpheusScore (const MassSpectrum &spectrum, pappso::PeptideSp peptideSp, unsigned int parent_charge, PrecisionPtr precision, std::vector< PeptideIon > ion_list, RawFragmentationMode fragmentation_mode)
| ~MorpheusScore ()
pappso::pappso_double | getMorpheusScore () const

## Private Attributes

pappso::pappso_double | _morpheus_score

## Detailed Description

Definition at line 40 of file morpheusscore.h.

## Constructor & Destructor Documentation

## MorpheusScore()

pappso::MorpheusScore::MorpheusScore | ( | const MassSpectrum & | spectrum,
|  | pappso::PeptideSp | peptideSp,
|  | unsigned int | parent_charge,
|  | PrecisionPtr | precision,
|  | std::vector< PeptideIon > | ion_list,
|  | RawFragmentationMode | fragmentation_mode
| ) |  |

Definition at line 39 of file morpheusscore.cpp.

{
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
PeptideRawFragmentMasses calc_mass_list_proline(*peptide_sp.get(),
fragmentation_mode);
std::vector<pappso_double> ion_products;
unsigned int charge = parent_charge;
while(charge > 0)
{
for(PeptideIon &ion : ion_list)
{
calc_mass_list_proline.pushBackIonMz(ion_products, ion, charge);
}
charge--;
}
// compute the number of matched peaks
unsigned int number_of_matched_peaks = 0;
std::sort(ion_products.begin(), ion_products.end());
// compute ratio of matched peaks on total peaks
std::vector<pappso_double>::const_iterator it_theoretical =
ion_products.begin();
std::vector<pappso_double>::const_iterator it_theoretical_end =
ion_products.end();
std::vector<DataPoint>::const_iterator it_spectrum = spectrum.begin();
std::vector<DataPoint>::const_iterator it_spectrum_end = spectrum.end();
pappso::pappso_double sum_intensities = 0;
pappso::pappso_double sum_matched_intensities = 0;
// unsigned int peak_number = spectrum.size();
while((it_spectrum != it_spectrum_end) &&
(it_theoretical != it_theoretical_end))
{
sum_intensities += it_spectrum->y;
MzRange peak_range(it_spectrum->x, precision);
while((it_theoretical != it_theoretical_end) &&
(*it_theoretical < peak_range.lower()))
{
it_theoretical++;
}
while((it_theoretical != it_theoretical_end) &&
peak_range.contains(*it_theoretical))
{
sum_matched_intensities += it_spectrum->y;
number_of_matched_peaks++;
it_theoretical++;
}
it_spectrum++;
}
while(it_spectrum != it_spectrum_end)
{
sum_intensities += it_spectrum->y;
it_spectrum++;
}
// compute the sum of matching peak intensities
// morpheus score = number of matched peaks + matching intensities ratio
_morpheus_score = (pappso_double)number_of_matched_peaks +
(sum_matched_intensities / sum_intensities);
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
}
pappso::MorpheusScore::_morpheus_score
pappso::pappso_double _morpheus_score
Definition morpheusscore.h:54
pappso::PeptideIon
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
Definition types.h:432
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:50

References _morpheus_score, pappso::MzRange::contains(), pappso::MzRange::lower(), and pappso::PeptideRawFragmentMasses::pushBackIonMz().

## ~MorpheusScore()

pappso::MorpheusScore::~MorpheusScore | ( |  | ) |

Definition at line 115 of file morpheusscore.cpp.

{
}

## Member Function Documentation

## getMorpheusScore()

pappso::pappso_double pappso::MorpheusScore::getMorpheusScore | ( |  | ) | const

Definition at line 120 of file morpheusscore.cpp.

{
return _morpheus_score;
}

References _morpheus_score.

## Member Data Documentation

## _morpheus_score

pappso::pappso_double pappso::MorpheusScore::_morpheus_score

private

Definition at line 54 of file morpheusscore.h.

Referenced by MorpheusScore(), and getMorpheusScore().

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

- pappsomspp/psm/morpheus/morpheusscore.h
- pappsomspp/psm/morpheus/morpheusscore.cpp