33 #include "../../peptide/peptiderawfragmentmasses.h"
34 #include "../../pappsoexception.h"
43 unsigned int retval = 1;
44 for(
int i = n; i > 1; --i)
51 bool refine_spectrum_synthesis,
53 const std::vector<PeptideIon> &ion_list)
87 unsigned int parent_charge)
92 unsigned int max_charge = parent_charge;
95 max_charge = parent_charge - 1;
101 RawFragmentationMode::full);
103 std::vector<SimplePeakIonMatch> match_products;
104 unsigned int charge_i;
107 charge_i = max_charge;
123 unsigned int charge_ion_count[5][20] = {0};
131 charge_dot_product[peptide_ion_match.ion_charge] +=
132 peptide_ion_match.peak.y *
135 peptide_ion_match.ion_type,
136 peptide_ion_match.ion_size);
137 charge_ion_count[peptide_ion_match.ion_charge]
138 [(std::int8_t)peptide_ion_match.ion_type] += 1;
139 m_ionCount[(std::int8_t)peptide_ion_match.ion_type] += 1;
143 for(
unsigned int i = 1; i <= max_charge; i++)
145 sum_intensity += charge_dot_product[i];
159 QObject::tr(
"ERROR computing hyperscore, PAPPSO exception:\n%1")
160 .arg(exception_pappso.
qwhat());
161 qDebug() <<
"XtandemHyperscore::XtandemHyperscore PappsoException :\n"
165 catch(std::exception &exception_std)
168 QObject::tr(
"ERROR computing hyperscore, std exception:\n%1")
169 .arg(exception_std.what());
170 qDebug() <<
"XtandemHyperscore::XtandemHyperscore std::exception :\n"
180 for(
long c = 64;
c < 126;
c++)
182 ret.insert(std::pair<char, pappso_double>(c,
pappso_double(1.0)));
192 for(
long c = 64;
c < 126;
c++)
194 ret.insert(std::pair<char, pappso_double>(c,
pappso_double(1.0)));
209 const QString &sequence,
PeptideIon ion_type,
unsigned int ion_size)
const
213 char last_aa_nter(
'_'), last_aa_cter(
'_');
217 last_aa_nter = sequence[ion_size - 1].toLatin1();
218 last_aa_cter = sequence[ion_size].toLatin1();
221 if(last_aa_nter ==
'P')
233 unsigned int offset(sequence.size() - ion_size);
234 last_aa_nter = sequence[offset - 1].toLatin1();
235 last_aa_cter = sequence[offset].toLatin1();
238 if(last_aa_nter ==
'P')
280 QObject::tr(
"ERROR in getHyperscore, PAPPSO exception:\n%1")
281 .arg(exception_pappso.
qwhat());
282 qDebug() <<
"XtandemHyperscore::getHyperscore PappsoException :\n"
286 catch(std::exception &exception_std)
289 QObject::tr(
"ERROR in getHyperscore, std exception:\n%1")
290 .arg(exception_std.what());
291 qDebug() <<
"XtandemHyperscore::getHyperscore std::exception :\n"