90 QString tag = cell.getStringValue();
95 else if(tag ==
"peptide")
99 else if(tag ==
"proteins")
103 else if(tag ==
"num_proteins")
107 else if(tag ==
"filename")
111 else if(tag ==
"scannr")
115 else if(tag ==
"rank")
119 else if(tag ==
"label")
123 else if(tag ==
"expmass")
128 else if(tag ==
"calcmass")
132 else if(tag ==
"charge")
136 else if(tag ==
"peptide_len")
140 else if(tag ==
"missed_cleavages")
144 else if(tag ==
"semi_enzymatic")
148 else if(tag ==
"isotope_error")
152 else if(tag ==
"precursor_ppm")
156 else if(tag ==
"fragment_ppm")
160 else if(tag ==
"hyperscore")
164 else if(tag ==
"delta_next")
168 else if(tag ==
"delta_best")
176 else if(tag ==
"aligned_rt")
180 else if(tag ==
"predicted_rt")
184 else if(tag ==
"delta_rt_model")
188 else if(tag ==
"ion_mobility")
192 else if(tag ==
"predicted_mobility")
196 else if(tag ==
"delta_mobility")
200 else if(tag ==
"matched_peaks")
204 else if(tag ==
"longest_b")
208 else if(tag ==
"longest_y")
212 else if(tag ==
"longest_y_pct")
216 else if(tag ==
"matched_intensity_pct")
220 else if(tag ==
"scored_candidates")
224 else if(tag ==
"poisson")
228 else if(tag ==
"sage_discriminant_score")
232 else if(tag ==
"posterior_error")
236 else if(tag ==
"spectrum_q")
240 else if(tag ==
"peptide_q")
244 else if(tag ==
"protein_q")
248 else if(tag ==
"ms2_intensity")
262 QObject::tr(
"the value %1 is out of range").arg(cell.getStringValue()));
276 if((std::size_t)cell.getDoubleValue() != (std::size_t)
m_proteinList.size())
279 QObject::tr(
"column \"num_proteins\"!=%1").arg(
m_proteinList.size()));
289 m_line.rank = cell.getDoubleValue();
292 m_line.label = cell.getDoubleValue();
295 m_line.expmass = cell.getDoubleValue();
298 m_line.calcmass = cell.getDoubleValue();
301 m_line.charge = cell.getDoubleValue();
304 m_line.peptide_len = cell.getDoubleValue();
307 m_line.missed_cleavages = cell.getDoubleValue();
310 m_line.semi_enzymatic = cell.getDoubleValue();
313 m_line.isotope_error = cell.getDoubleValue();
317 m_line.precursor_ppm = cell.getDoubleValue();
320 m_line.fragment_ppm = cell.getDoubleValue();
323 m_line.hyperscore = cell.getDoubleValue();
326 m_line.delta_next = cell.getDoubleValue();
329 m_line.delta_best = cell.getDoubleValue();
332 m_line.rt = cell.getDoubleValue() * 60;
335 m_line.aligned_rt = cell.getDoubleValue();
338 m_line.predicted_rt = cell.getDoubleValue();
341 m_line.delta_rt_model = cell.getDoubleValue();
344 m_line.ion_mobility = cell.getDoubleValue();
347 m_line.predicted_mobility = cell.getDoubleValue();
350 m_line.delta_mobility = cell.getDoubleValue();
353 m_line.matched_peaks = cell.getDoubleValue();
356 m_line.longest_b = cell.getDoubleValue();
359 m_line.longest_y = cell.getDoubleValue();
362 m_line.longest_y_pct = cell.getDoubleValue();
365 m_line.matched_intensity_pct = cell.getDoubleValue();
368 m_line.scored_candidates = cell.getDoubleValue();
371 m_line.poisson = cell.getDoubleValue();
374 m_line.sage_discriminant_score = cell.getDoubleValue();
377 m_line.posterior_error = cell.getDoubleValue();
380 m_line.spectrum_q = cell.getDoubleValue();
383 m_line.peptide_q = cell.getDoubleValue();
386 m_line.protein_q = cell.getDoubleValue();
389 m_line.ms2_intensity = cell.getDoubleValue();
392 qDebug() <<
"m_line.calcmass=" <<
m_line.calcmass;
394 QObject::tr(
"column type %1 not implemented").arg((std::uint8_t)column_type));
443 QString peptide_str_verif = peptide_str;
447 qDebug() << modif.strModification;
448 qDebug() << modif.modification->getAccession();
449 peptide_str_verif = peptide_str_verif.replace(
450 modif.strModification, QString(
"[%1]").arg(modif.modification->getAccession()));
455 qDebug() << modif.strModification;
456 qDebug() << modif.modification->getAccession();
457 peptide_str_verif = peptide_str_verif.replace(
458 modif.strModification, QString(
"[%1]").arg(modif.modification->getAccession()));
461 qDebug() << peptide_str_verif;
541 auto it_insert =
m_sampleMap.insert({msrun_filename, {}});
546 it_insert.first->second.name = msrun_filename;
548 QCborMap identification_file;
550 it_insert.first->second.cbor_core_sample.insert(QString(
"name"),
551 QFileInfo(msrun_filename).baseName());
554 QCborArray identification_file_list;
555 identification_file.insert(QString(
"name"),
m_sageReader.getmJsonAbsoluteFilePath());
556 identification_file_list.push_back(identification_file);
557 it_insert.first->second.cbor_core_sample.insert(QString(
"identification_file_list"),
558 identification_file_list);
561 ms_file.insert(QString(
"name"),
m_sageReader.getMzmlPath(msrun_filename));
562 it_insert.first->second.cbor_core_sample.insert(QString(
"peaklist_file"), ms_file);
586 psm_protein.
protein_sp = std::make_shared<pappso::Protein>(accession,
"");
589 it.first->second.cborEval.insert(QString(
"protein_q"),
m_line.protein_q);
618 Scan *current_cbor_scan_p = &(it_insert.first->second);
622 QCborMap &scan_id = it_insert.first->second.cbor_id;
626 QCborMap &scan_ms2 = it_insert.first->second.cbor_ms2;
627 scan_ms2.insert(QString(
"rt"),
m_line.rt);
629 QCborMap &scan_precursor = it_insert.first->second.cbor_precursor;
630 scan_precursor.insert(QString(
"z"),
m_line.charge);
631 scan_precursor.insert(QString(
"mz"),
m_line.expmass);
643 one_psm.
cbor_eval.insert(QString(
"delta_mobility"),
m_line.delta_mobility);
645 one_psm.
cbor_eval.insert(QString(
"delta_rt_model"),
m_line.delta_rt_model);
646 one_psm.
cbor_eval.insert(QString(
"fragment_ppm"),
m_line.fragment_ppm);
648 one_psm.
cbor_eval.insert(QString(
"ion_mobility"),
m_line.ion_mobility);
649 one_psm.
cbor_eval.insert(QString(
"isotope_error"),
m_line.isotope_error);
651 one_psm.
cbor_eval.insert(QString(
"longest_b"), (qint64)
m_line.longest_b);
652 one_psm.
cbor_eval.insert(QString(
"longest_y"), (qint64)
m_line.longest_y);
653 one_psm.
cbor_eval.insert(QString(
"longest_y_pct"),
m_line.longest_y_pct);
654 one_psm.
cbor_eval.insert(QString(
"matched_intensity_pct"),
m_line.matched_intensity_pct);
655 one_psm.
cbor_eval.insert(QString(
"matched_peaks"), (qint64)
m_line.matched_peaks);
656 one_psm.
cbor_eval.insert(QString(
"missed_cleavages"),
m_line.missed_cleavages);
657 one_psm.
cbor_eval.insert(QString(
"ms2_intensity"),
m_line.ms2_intensity);
658 one_psm.
cbor_eval.insert(QString(
"peptide_len"), (qint64)
m_line.peptide_len);
661 one_psm.
cbor_eval.insert(QString(
"posterior_error"),
m_line.posterior_error);
662 one_psm.
cbor_eval.insert(QString(
"precursor_ppm"),
m_line.precursor_ppm);
663 one_psm.
cbor_eval.insert(QString(
"predicted_mobility"),
m_line.predicted_mobility);
664 one_psm.
cbor_eval.insert(QString(
"predicted_rt"),
m_line.predicted_rt);
667 one_psm.
cbor_eval.insert(QString(
"sage_discriminant_score"),
m_line.sage_discriminant_score);
668 one_psm.
cbor_eval.insert(QString(
"scored_candidates"), (qint64)
m_line.scored_candidates);
669 one_psm.
cbor_eval.insert(QString(
"semi_enzymatic"),
m_line.semi_enzymatic);
672 current_cbor_scan_p->
psm_list.emplace_back(one_psm);
681 QObject::tr(
"Sage TSV data reading process interrupted"));
695 m_sageReader.getCborStreamWriter().append(
"identification_file_list");
700 m_sageReader.getCborStreamWriter().append(
"peaklist_file");
706 for(
auto &it_scan : one_sample.
scan_map)
729 for(
auto &it_psm : one_scan.
psm_list)
744 m_sageReader.getCborStreamWriter().append(
"protein_list");
746 QCborArray cbor_protein_list;
750 QCborMap cbor_protein;
751 cbor_protein.insert(QString(
"accession"), accession);
755 QString protein_sequence =
756 QString(
m_psmProteinMap.getByAccession(accession).protein_sp.get()->getSequence())
760 QCborArray positions;
763 positions.push_back(position);
767 cbor_protein.insert(QString(
"positions"), positions);
769 cbor_protein_list.append(cbor_protein);
773 QCborValue(cbor_protein_list).toCbor(
m_sageReader.getCborStreamWriter());