92 QString tag = cell.getStringValue();
97 else if(tag ==
"peptide")
101 else if(tag ==
"proteins")
105 else if(tag ==
"num_proteins")
109 else if(tag ==
"filename")
113 else if(tag ==
"scannr")
117 else if(tag ==
"rank")
121 else if(tag ==
"label")
125 else if(tag ==
"expmass")
130 else if(tag ==
"calcmass")
134 else if(tag ==
"charge")
138 else if(tag ==
"peptide_len")
142 else if(tag ==
"missed_cleavages")
146 else if(tag ==
"semi_enzymatic")
150 else if(tag ==
"isotope_error")
154 else if(tag ==
"precursor_ppm")
158 else if(tag ==
"fragment_ppm")
162 else if(tag ==
"hyperscore")
166 else if(tag ==
"delta_next")
170 else if(tag ==
"delta_best")
178 else if(tag ==
"aligned_rt")
182 else if(tag ==
"predicted_rt")
186 else if(tag ==
"delta_rt_model")
190 else if(tag ==
"ion_mobility")
194 else if(tag ==
"predicted_mobility")
198 else if(tag ==
"delta_mobility")
202 else if(tag ==
"matched_peaks")
206 else if(tag ==
"longest_b")
210 else if(tag ==
"longest_y")
214 else if(tag ==
"longest_y_pct")
218 else if(tag ==
"matched_intensity_pct")
222 else if(tag ==
"scored_candidates")
226 else if(tag ==
"poisson")
230 else if(tag ==
"sage_discriminant_score")
234 else if(tag ==
"posterior_error")
238 else if(tag ==
"spectrum_q")
242 else if(tag ==
"peptide_q")
246 else if(tag ==
"protein_q")
250 else if(tag ==
"ms2_intensity")
264 QObject::tr(
"the value %1 is out of range").arg(cell.getStringValue()));
278 if((std::size_t)cell.getDoubleValue() != (std::size_t)
m_proteinList.size())
281 QObject::tr(
"column \"num_proteins\"!=%1").arg(
m_proteinList.size()));
291 m_line.rank = cell.getDoubleValue();
294 m_line.label = cell.getDoubleValue();
297 m_line.expmass = cell.getDoubleValue();
300 m_line.calcmass = cell.getDoubleValue();
303 m_line.charge = cell.getDoubleValue();
306 m_line.peptide_len = cell.getDoubleValue();
309 m_line.missed_cleavages = cell.getDoubleValue();
312 m_line.semi_enzymatic = cell.getDoubleValue();
315 m_line.isotope_error = cell.getDoubleValue();
319 m_line.precursor_ppm = cell.getDoubleValue();
322 m_line.fragment_ppm = cell.getDoubleValue();
325 m_line.hyperscore = cell.getDoubleValue();
328 m_line.delta_next = cell.getDoubleValue();
331 m_line.delta_best = cell.getDoubleValue();
334 m_line.rt = cell.getDoubleValue() * 60;
337 m_line.aligned_rt = cell.getDoubleValue();
340 m_line.predicted_rt = cell.getDoubleValue();
343 m_line.delta_rt_model = cell.getDoubleValue();
346 m_line.ion_mobility = cell.getDoubleValue();
349 m_line.predicted_mobility = cell.getDoubleValue();
352 m_line.delta_mobility = cell.getDoubleValue();
355 m_line.matched_peaks = cell.getDoubleValue();
358 m_line.longest_b = cell.getDoubleValue();
361 m_line.longest_y = cell.getDoubleValue();
364 m_line.longest_y_pct = cell.getDoubleValue();
367 m_line.matched_intensity_pct = cell.getDoubleValue();
370 m_line.scored_candidates = cell.getDoubleValue();
373 m_line.poisson = cell.getDoubleValue();
376 m_line.sage_discriminant_score = cell.getDoubleValue();
379 m_line.posterior_error = cell.getDoubleValue();
382 m_line.spectrum_q = cell.getDoubleValue();
385 m_line.peptide_q = cell.getDoubleValue();
388 m_line.protein_q = cell.getDoubleValue();
391 m_line.ms2_intensity = cell.getDoubleValue();
394 qDebug() <<
"m_line.calcmass=" <<
m_line.calcmass;
396 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;
548 auto it_insert =
m_sampleMap.insert({msrun_filename, {}});
553 it_insert.first->second.name = msrun_filename;
555 QCborMap identification_file;
557 it_insert.first->second.cbor_core_sample.insert(QString(
"name"),
558 QFileInfo(msrun_filename).baseName());
561 QCborArray identification_file_list;
562 identification_file.insert(QString(
"name"),
m_sageReader.getmJsonAbsoluteFilePath());
563 identification_file_list.push_back(identification_file);
564 it_insert.first->second.cbor_core_sample.insert(QString(
"identification_file_list"),
565 identification_file_list);
568 ms_file.insert(QString(
"name"), QFileInfo(msrun_filename).absoluteFilePath());
569 it_insert.first->second.cbor_core_sample.insert(QString(
"peaklist_file"), ms_file);
595 psm_protein.
protein_sp = std::make_shared<pappso::Protein>(accession,
"");
598 it.first->second.cborEval.insert(QString(
"protein_q"),
m_line.protein_q);
630 Scan *current_cbor_scan_p = &(it_insert.first->second);
634 QCborMap &scan_id = it_insert.first->second.cbor_id;
638 QCborMap &scan_ms2 = it_insert.first->second.cbor_ms2;
639 scan_ms2.insert(QString(
"rt"),
m_line.rt);
641 QCborMap &scan_precursor = it_insert.first->second.cbor_precursor;
642 scan_precursor.insert(QString(
"z"),
m_line.charge);
643 scan_precursor.insert(QString(
"mz"),
m_line.expmass);
651 QCborMap cbor_protein;
652 cbor_protein.insert(QString(
"accession"), accession);
656 QString protein_sequence =
657 QString(
m_psmProteinMap.getByAccession(accession).protein_sp.get()->getSequence())
659 QString peptide_sequence =
msp_peptide.get()->getSequenceLi();
660 int position = protein_sequence.indexOf(peptide_sequence);
662 QCborArray positions;
665 positions.push_back(position);
666 position = protein_sequence.indexOf(peptide_sequence, position + 1);
669 cbor_protein.insert(QString(
"positions"), positions);
677 one_psm.
cbor_eval.insert(QString(
"delta_mobility"),
m_line.delta_mobility);
679 one_psm.
cbor_eval.insert(QString(
"delta_rt_model"),
m_line.delta_rt_model);
680 one_psm.
cbor_eval.insert(QString(
"fragment_ppm"),
m_line.fragment_ppm);
682 one_psm.
cbor_eval.insert(QString(
"ion_mobility"),
m_line.ion_mobility);
683 one_psm.
cbor_eval.insert(QString(
"isotope_error"),
m_line.isotope_error);
685 one_psm.
cbor_eval.insert(QString(
"longest_b"), (qint64)
m_line.longest_b);
686 one_psm.
cbor_eval.insert(QString(
"longest_y"), (qint64)
m_line.longest_y);
687 one_psm.
cbor_eval.insert(QString(
"longest_y_pct"),
m_line.longest_y_pct);
688 one_psm.
cbor_eval.insert(QString(
"matched_intensity_pct"),
m_line.matched_intensity_pct);
689 one_psm.
cbor_eval.insert(QString(
"matched_peaks"), (qint64)
m_line.matched_peaks);
690 one_psm.
cbor_eval.insert(QString(
"missed_cleavages"),
m_line.missed_cleavages);
691 one_psm.
cbor_eval.insert(QString(
"ms2_intensity"),
m_line.ms2_intensity);
692 one_psm.
cbor_eval.insert(QString(
"peptide_len"), (qint64)
m_line.peptide_len);
695 one_psm.
cbor_eval.insert(QString(
"posterior_error"),
m_line.posterior_error);
696 one_psm.
cbor_eval.insert(QString(
"precursor_ppm"),
m_line.precursor_ppm);
697 one_psm.
cbor_eval.insert(QString(
"predicted_mobility"),
m_line.predicted_mobility);
698 one_psm.
cbor_eval.insert(QString(
"predicted_rt"),
m_line.predicted_rt);
701 one_psm.
cbor_eval.insert(QString(
"sage_discriminant_score"),
m_line.sage_discriminant_score);
702 one_psm.
cbor_eval.insert(QString(
"scored_candidates"), (qint64)
m_line.scored_candidates);
703 one_psm.
cbor_eval.insert(QString(
"semi_enzymatic"),
m_line.semi_enzymatic);
706 current_cbor_scan_p->
psm_list.emplace_back(one_psm);
715 QObject::tr(
"Sage TSV data reading process interrupted"));
729 m_sageReader.getCborStreamWriter().append(
"identification_file_list");
734 m_sageReader.getCborStreamWriter().append(
"peaklist_file");
740 for(
auto &it_scan : one_sample.
scan_map)
763 for(
auto &it_psm : one_scan.
psm_list)
778 m_sageReader.getCborStreamWriter().append(
"protein_list");