373{
374 qDebug();
375 const QJsonObject msrunpeptide_list(
376 documentFind(
"identification_data",
"msrunpeptide_list").toObject());
377 auto it = msrunpeptide_list.begin();
378 while(it != msrunpeptide_list.end())
379 {
380 qDebug() << it.key();
381 QJsonObject jmsrun_peptidelist_object = it.value().toObject();
382 auto it_peptide_obs = jmsrun_peptidelist_object.find("peptide_obs");
383 if(it_peptide_obs == jmsrun_peptidelist_object.end())
384 {
386 QObject::tr("peptide_obs not found in msrunpeptide_list %1").arg(it.key()));
387 }
388 QJsonObject json_msrunobs = it_peptide_obs->toObject();
391 {
393 }
395
396 auto itpep = json_msrunobs.begin();
397 while(itpep != json_msrunobs.end())
398 {
399 qDebug() << itpep.key();
400 QJsonArray json_obs_list = itpep.value().toArray();
403 {
405 }
407 qDebug() << "json_obs_list.size()=" << json_obs_list.size();
408 for(auto json_obs_value : json_obs_list)
409 {
410 QJsonObject observation = json_obs_value.toObject();
411 qint64 scan = observation.value("scan").toInteger();
412 qint64 index = observation.value("index").toInteger();
413 QString label = observation.value("label").toString();
414 std::uint8_t charge =
415 observation.value("precursor").toObject().value("charge").toInt();
416 try
417 {
419 if(!label.isEmpty())
420 {
421 p_label = peptide_sp.get()->getPeptideLabelPtr(label);
422 }
423 if(scan == 0)
424 {
425 msrunpep_sp.get()->addPeptideSpectrumIndexObservation(
426 peptide_sp, p_label, index, charge);
427 }
428 else
429 {
430
431 msrunpep_sp.get()->addPeptideScanNumberObservation(
432 peptide_sp, p_label, scan, charge);
433 }
434
435 peptide_sp.get()->addObservedChargeState(charge);
436 peptide_sp.get()->addObservedInMsRunSp(msrunpep_sp.get()->getMsRunSp());
437 }
439 {
441 QObject::tr("error reading peptide %1 observation scan %2 "
442 "index %3 : %4")
443 .arg(itpep.key())
444 .arg(scan)
445 .arg(index)
447 }
448 }
449
450
452 {
453 if(peptide_sp.get() != nullptr)
454 {
456 }
457 }
458
459
460 itpep++;
461 }
462
463 it++;
464 }
465 qDebug();
466}
virtual const QString & qwhat() const
std::shared_ptr< MsRunPeptideList > MsRunPeptideListSp