50 if(!keys().contains(
"id"))
54 if(keys().contains(
"psm_list"))
58 std::make_shared<pappso::specglob::ExperimentalSpectrum>(*qualified_mass_spectrum.get(),
63 *(qualified_mass_spectrum.get()->getMassSpectrumSPtr().get()));
65 QCborArray new_psm_arr;
66 for(QCborValue cbor_psm : value(
"psm_list").toArray())
68 QCborMap cbor_psm_map = cbor_psm.toMap();
70 if(!cbor_psm_map.keys().contains(
"proforma"))
73 QObject::tr(
"missing proforma in psm %1 spectrum %2")
74 .arg(cbor_psm_map.keys().size())
75 .arg(qualified_mass_spectrum.get()->getMassSpectrumId().getNativeId()));
77 QString proforma = cbor_psm_map.value(
"proforma").toString();
78 if(proforma.isEmpty())
82 QObject::tr(
"proforma is empty in psm %1 spectrum %2")
83 .arg(cbor_psm_map.keys().size())
84 .arg(qualified_mass_spectrum.get()->getMassSpectrumId().getNativeId()));
86 QCborMap cbor_psm_eval_specglob;
90 qDebug() << proforma <<
" " << peptide_sp.get()->toProForma();
92 std::make_shared<pappso::specglob::PeptideSpectrum>(peptide_sp);
100 spectral_alignment.
align(peptide_spectra, experimental_spectrum);
102 cbor_psm_eval_specglob.insert(QString(
"max_score"), spectral_alignment.
getMaxScore());
119 cbor_psm_eval_specglob.insert(QString(
"count"),
122 cbor_psm_eval_specglob.insert(QString(
"proforma"), peptide_model.
toProForma());
123 cbor_psm_eval_specglob.insert(QString(
"bracket"), peptide_model.
toString());
133 QCborMap psm_eval = cbor_psm_map.value(
"eval").toMap();
134 psm_eval.remove(QString(
"specglob"));
135 psm_eval.insert(QString(
"specglob"), cbor_psm_eval_specglob);
136 cbor_psm_map.remove(QString(
"eval"));
137 cbor_psm_map.insert(QString(
"eval"), psm_eval);
144 new_psm.insert(QString(
"proforma"),
145 cbor_psm_eval_specglob.value(
"proforma").toString());
146 new_psm.insert(QString(
"protein_list"), cbor_psm_map.value(
"protein_list"));
147 new_psm.insert(QString(
"eval"), cbor_psm_map.value(
"eval"));
148 new_psm_arr.push_back(new_psm);
153 new_psm_arr.push_back(cbor_psm_map);
158 remove(QString(
"psm_list"));
159 insert(QString(
"psm_list"), new_psm_arr);
bool findReplaceMutations()
const PeptideModel & getBetterPeptideModel() const