41 unsigned int parent_charge,
43 std::vector<Enums::PeptideIon> ion_list,
46 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
49 std::vector<pappso_double> ion_products;
50 unsigned int charge = parent_charge;
55 calc_mass_list_proline.
pushBackIonMz(ion_products, ion, charge);
62 unsigned int number_of_matched_peaks = 0;
64 std::sort(ion_products.begin(), ion_products.end());
68 std::vector<pappso_double>::const_iterator it_theoretical = ion_products.begin();
69 std::vector<pappso_double>::const_iterator it_theoretical_end = ion_products.end();
70 std::vector<DataPoint>::const_iterator it_spectrum = spectrum.begin();
71 std::vector<DataPoint>::const_iterator it_spectrum_end = spectrum.end();
75 while((it_spectrum != it_spectrum_end) && (it_theoretical != it_theoretical_end))
77 sum_intensities += it_spectrum->y;
78 MzRange peak_range(it_spectrum->x, precision);
80 while((it_theoretical != it_theoretical_end) && (*it_theoretical < peak_range.
lower()))
84 while((it_theoretical != it_theoretical_end) && peak_range.
contains(*it_theoretical))
86 sum_matched_intensities += it_spectrum->y;
87 number_of_matched_peaks++;
92 while(it_spectrum != it_spectrum_end)
94 sum_intensities += it_spectrum->y;
104 (
pappso_double)number_of_matched_peaks + (sum_matched_intensities / sum_intensities);
106 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
MorpheusScore(const MassSpectrum &spectrum, pappso::PeptideSp peptideSp, unsigned int parent_charge, PrecisionPtr precision, std::vector< Enums::PeptideIon > ion_list, RawFragmentationMode fragmentation_mode)