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