libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
sagetsvhandler.cpp
Go to the documentation of this file.
1/**
2 * \file input/sage/sagereader.h
3 * \date 21/08/2024
4 * \author Olivier Langella
5 * \brief read data files from Sage output
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of i2MassChroQ.
13 *
14 * i2MassChroQ is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * i2MassChroQ is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with i2MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29
30#include "sagetsvhandler.h"
37
38
39namespace pappso
40{
41namespace cbor
42{
43namespace psm
44{
45
47 const SageReader &sage_reader,
48 PsmProteinMap &psm_protein_map)
49 : m_sageReader(sage_reader), m_psmProteinMap(psm_protein_map)
50{
51 mp_monitor = p_monitor;
54 m_decoyTag = sage_reader.getDecoyTag();
55}
56
60
61void
63{
64 for(auto it_sample_map : m_sampleMap)
65 {
66 writeSample(it_sample_map.second);
67 }
68}
69
70void
72{
73 if(m_line.charge != 0)
74 recordLine();
76}
77
78void
82
83void
84SageTsvHandler::setCell(const OdsCell &cell)
85{
86 if(m_lineNumber == 0)
87 {
88 // header
89 QString tag = cell.getStringValue();
90 if(tag == "psm_id")
91 {
93 }
94 else if(tag == "peptide")
95 {
97 }
98 else if(tag == "proteins")
99 {
101 }
102 else if(tag == "protein_groups")
103 {
105 }
106 else if(tag == "num_protein_groups")
107 {
109 }
110 else if(tag == "num_proteins")
111 {
113 }
114 else if(tag == "filename")
115 {
117 }
118 else if(tag == "scannr")
119 {
121 }
122 else if(tag == "rank")
123 {
125 }
126 else if(tag == "label")
127 {
129 }
130 else if(tag == "expmass")
131 {
133 }
134
135 else if(tag == "calcmass")
136 {
138 }
139 else if(tag == "charge")
140 {
142 }
143 else if(tag == "peptide_len")
144 {
146 }
147 else if(tag == "missed_cleavages")
148 {
150 }
151 else if(tag == "semi_enzymatic")
152 {
154 }
155 else if(tag == "isotope_error")
156 {
158 }
159 else if(tag == "precursor_ppm")
160 {
162 }
163 else if(tag == "fragment_ppm")
164 {
166 }
167 else if(tag == "hyperscore")
168 {
170 }
171 else if(tag == "delta_next")
172 {
174 }
175 else if(tag == "delta_best")
176 {
178 }
179 else if(tag == "rt")
180 {
181 m_columnTypeList.push_back(Columns::rt);
182 }
183 else if(tag == "aligned_rt")
184 {
186 }
187 else if(tag == "predicted_rt")
188 {
190 }
191 else if(tag == "delta_rt_model")
192 {
194 }
195 else if(tag == "ion_mobility")
196 {
198 }
199 else if(tag == "predicted_mobility")
200 {
202 }
203 else if(tag == "delta_mobility")
204 {
206 }
207 else if(tag == "matched_peaks")
208 {
210 }
211 else if(tag == "longest_b")
212 {
214 }
215 else if(tag == "longest_y")
216 {
218 }
219 else if(tag == "longest_y_pct")
220 {
222 }
223 else if(tag == "matched_intensity_pct")
224 {
226 }
227 else if(tag == "scored_candidates")
228 {
230 }
231 else if(tag == "poisson")
232 {
234 }
235 else if(tag == "sage_discriminant_score")
236 {
238 }
239 else if(tag == "posterior_error")
240 {
242 }
243 else if(tag == "spectrum_q")
244 {
246 }
247 else if(tag == "peptide_q")
248 {
250 }
251 else if(tag == "protein_q")
252 {
254 }
255 else if(tag == "protein_group_q")
256 {
258 }
259 else if(tag == "ms2_intensity")
260 {
262 }
263 else
264 {
265 throw pappso::ExceptionNotPossible(QObject::tr("column \"%1\" not defined").arg(tag));
266 }
267 }
268 else
269 {
270 if(m_columnNumber >= m_columnTypeList.size())
271 {
273 QObject::tr("the value %1 is out of range").arg(cell.getStringValue()));
274 }
276 switch(column_type)
277 {
278 case Columns::psm_id:
279 break;
281 break;
283 break;
285 break;
286 case Columns::peptide:
287 parsePeptide(cell.toString());
288 break;
290 parseProteins(cell.toString());
291 break;
293 if((std::size_t)cell.getDoubleValue() != (std::size_t)m_proteinList.size())
294 {
296 QObject::tr("column \"num_proteins\"!=%1").arg(m_proteinList.size()));
297 }
298 break;
300 parseMsRunFilename(cell.toString());
301 break;
302 case Columns::scannr:
303 parseSpectrumStringId(cell.toString());
304 break;
305 case Columns::rank:
306 m_line.rank = cell.getDoubleValue();
307 break;
308 case Columns::label:
309 m_line.label = cell.getDoubleValue();
310 break;
311 case Columns::expmass:
312 m_line.expmass = cell.getDoubleValue();
313 break;
315 m_line.calcmass = cell.getDoubleValue();
316 break;
317 case Columns::charge:
318 m_line.charge = cell.getDoubleValue();
319 break;
321 m_line.peptide_len = cell.getDoubleValue();
322 break;
324 m_line.missed_cleavages = cell.getDoubleValue();
325 break;
327 m_line.semi_enzymatic = cell.getDoubleValue();
328 break;
330 m_line.isotope_error = cell.getDoubleValue();
331 break;
332
334 m_line.precursor_ppm = cell.getDoubleValue();
335 break;
337 m_line.fragment_ppm = cell.getDoubleValue();
338 break;
340 m_line.hyperscore = cell.getDoubleValue();
341 break;
343 m_line.delta_next = cell.getDoubleValue();
344 break;
346 m_line.delta_best = cell.getDoubleValue();
347 break;
348 case Columns::rt:
349 m_line.rt = cell.getDoubleValue() * 60; // to convert retention time in seconds
350 break;
352 m_line.aligned_rt = cell.getDoubleValue();
353 break;
355 m_line.predicted_rt = cell.getDoubleValue();
356 break;
358 m_line.delta_rt_model = cell.getDoubleValue();
359 break;
361 m_line.ion_mobility = cell.getDoubleValue();
362 break;
364 m_line.predicted_mobility = cell.getDoubleValue();
365 break;
367 m_line.delta_mobility = cell.getDoubleValue();
368 break;
370 m_line.matched_peaks = cell.getDoubleValue();
371 break;
373 m_line.longest_b = cell.getDoubleValue();
374 break;
376 m_line.longest_y = cell.getDoubleValue();
377 break;
379 m_line.longest_y_pct = cell.getDoubleValue();
380 break;
382 m_line.matched_intensity_pct = cell.getDoubleValue();
383 break;
385 m_line.scored_candidates = cell.getDoubleValue();
386 break;
387 case Columns::poisson:
388 m_line.poisson = cell.getDoubleValue();
389 break;
391 m_line.sage_discriminant_score = cell.getDoubleValue();
392 break;
394 m_line.posterior_error = cell.getDoubleValue();
395 break;
397 m_line.spectrum_q = cell.getDoubleValue();
398 break;
400 m_line.peptide_q = cell.getDoubleValue();
401 break;
403 m_line.protein_q = cell.getDoubleValue();
404 break;
406 m_line.ms2_intensity = cell.getDoubleValue();
407 break;
408 default:
409 qDebug() << "m_line.calcmass=" << m_line.calcmass;
411 QObject::tr("column type %1 not implemented").arg((std::uint8_t)column_type));
412 break;
413 }
414
415 /*
416
417 2333 TMISDSDYTEFENFTK
418 GRMZM2G018197_P01;GRMZM2G068952_P01;GRMZM5G822976_P01 3
419 20120906_balliau_extract_1_A01_urnb-1.mzML controllerType=0
420 controllerNumber=1 scan=12542 1 1 1926.8225 1926.8193 2 16 0 0
421 0.0 1.6471838 1.9796097 54.06803492297634 28.049970383419556 0.0 38.192993
422 0.76385987 0.7671368 0.0032769442 0.0 0.0 0.0 16 2 14 0.875 32.54396 380
423 -13.375352220427656 1.1570586 -34.13482 0.00016041065 0.00022231363
424 0.00040124074 1271951.1
425 */
426 }
428}
429
430void
432{
433 m_columnNumber = 0;
434 msp_peptide = nullptr;
435 m_proteinList.clear();
436 m_line = Line();
437}
438
439void
443void
444SageTsvHandler::startSheet(const QString &sheet_name [[maybe_unused]])
445{
446 m_columnNumber = 0;
447 m_lineNumber = 0;
448 mp_monitor->setStatus(QObject::tr("reading Sage TSV file"));
449
450 if(mp_monitor->shouldIstop())
451 {
452 throw pappso::ExceptionInterrupted(QObject::tr("Sage TSV data reading process interrupted"));
453 }
454}
455
456void
457SageTsvHandler::parsePeptide(const QString &peptide_str)
458{
459 qDebug();
460 QString peptide_str_verif = peptide_str;
461 // fixed modifications :
463 {
464 qDebug() << modif.strModification;
465 qDebug() << modif.modification->getAccession();
466 peptide_str_verif = peptide_str_verif.replace(
467 modif.strModification, QString("[%1]").arg(modif.modification->getAccession()));
468 }
469 // variable modifications :
471 {
472 qDebug() << modif.strModification;
473 qDebug() << modif.modification->getAccession();
474 peptide_str_verif = peptide_str_verif.replace(
475 modif.strModification, QString("[%1]").arg(modif.modification->getAccession()));
476 }
477
478 qDebug() << peptide_str_verif;
479 // LPMFGC[+57.0216]NDATQVYK
481 qDebug();
482 // variable modifications :
483 /*
484 setVariableModifications(peptide_sp,
485 peptide_line.peptide_string_list.at(6));
486*/
487 qDebug() << msp_peptide.get()->toProForma();
488}
489
490
491void
492SageTsvHandler::parseProteins(const QString &proteins_str)
493{
494 m_proteinList.clear();
495 m_proteinList = proteins_str.split(";");
496 for(QString accession : m_proteinList)
497 {
498
499 PsmProtein psm_protein;
500 psm_protein.protein_sp = std::make_shared<pappso::Protein>(accession, "");
501 psm_protein.isTarget = true;
502 if(accession.startsWith(m_decoyTag))
503 {
504 psm_protein.isTarget = false;
505 }
506
507 m_psmProteinMap.insert(psm_protein);
508 }
509}
510
511bool
512SageTsvHandler::parseSpectrumStringId(const QString &spectrum_string_id)
513{
514 m_spectrumNativeId = spectrum_string_id;
515 qDebug() << spectrum_string_id;
516 // controllerType=0 controllerNumber=1 scan=176056
517
518 bool is_ok = false;
519 QStringList scan_list = spectrum_string_id.split("scan=");
520 if(scan_list.size() == 2)
521 {
522 // we bet that there is a scan number, easy to parse
523 m_spectrumIndex = scan_list.at(1).toULongLong(&is_ok);
524 if(m_spectrumIndex > 0)
526 }
527 if(is_ok == false)
528 { /*
529 if(msp_previousMsrun != msp_msrun)
530 {
531 mp_monitor->setStatus(
532 QObject::tr("Reading mz data file %1").arg(msp_msrun.get()->getFileName()));
533 msp_previousMsrun = msp_msrun;
534 }
535
536 pappso::MsRunReader *msrunreader_p = msp_msrun.get()->getMsRunReaderSPtr().get();
537 if(msrunreader_p->getMsRunId()->getMsDataFormat() == pappso::MsDataFormat::brukerTims)
538 {
539 m_spectrumIndex = spectrum_string_id.toInt() * 2 - 1;
540 }
541 else
542 {
543 m_spectrumIndex =
544 msrunreader_p->spectrumStringIdentifier2SpectrumIndex(spectrum_string_id);
545 }*/
546 }
547
548 qDebug() << spectrum_string_id;
549 return is_ok;
550}
551
552void
553SageTsvHandler::parseMsRunFilename(const QString &msrun_filename)
554{
555
556
557 // find the sample :
558 auto it_insert = m_sampleMap.insert({msrun_filename, {}});
559 mp_currentSample = &(it_insert.first->second);
560 if(it_insert.second)
561 {
562 // new sample
563 it_insert.first->second.name = msrun_filename;
564 QCborMap ms_file;
565 QCborMap identification_file;
566
567 it_insert.first->second.cbor_core_sample.insert(QString("name"),
568 QFileInfo(msrun_filename).baseName());
569
570 // identification_file_list
571 QCborArray identification_file_list;
572 identification_file.insert(QString("name"), m_sageReader.getmJsonAbsoluteFilePath());
573 identification_file_list.push_back(identification_file);
574 it_insert.first->second.cbor_core_sample.insert(QString("identification_file_list"),
575 identification_file_list);
576
577
578 ms_file.insert(QString("name"), m_sageReader.getMzmlPath(msrun_filename));
579 it_insert.first->second.cbor_core_sample.insert(QString("peaklist_file"), ms_file);
580 }
581
582 /*
583 msp_msrun = m_sageReader.getSageFileReader().getMsRunSpWithFileName(msrun_filename);
584 qDebug() << msp_msrun.get()->getFileName();
585
586 msp_identificationSageJsonFileSp =
587 m_sageReader.getSageFileReader().getIdentificationSageJsonFileSpWithFileName(msrun_filename);
588
589 mp_identificationGroup =
590 m_sageReader.getSageFileReader().getIdentificationGroupPtrWithFileName(msrun_filename);
591 qDebug() << msp_msrun.get()->getFileName();
592 */
593}
594
595void
597{
598 qDebug();
599
600 for(const QString &accession : m_proteinList)
601 {
602 PsmProtein psm_protein;
603 psm_protein.protein_sp = std::make_shared<pappso::Protein>(accession, "");
604
605 auto it = m_psmProteinMap.insert(psm_protein);
606 it.first->second.cborEval.insert(QString("protein_q"), m_line.protein_q);
607 }
608 /*
609 PeptideEvidence pe(msp_msrun.get(), m_spectrumIndex, true);
610 pe.setCharge(m_line.charge);
611 pe.setChecked(true);
612 pe.setExperimentalMass(m_line.expmass);
613 pe.setPeptideXtpSp(msp_peptide);
614 pe.setIdentificationDataSource(msp_identificationSageJsonFileSp.get());
615 pe.setIdentificationEngine(m_identificationEngine);
616 pe.setRetentionTime(m_line.rt);
617 pe.setParam(PeptideEvidenceParam::tandem_hyperscore, m_line.hyperscore);
618 pe.setParam(PeptideEvidenceParam::sage_sage_discriminant_score,
619 m_line.sage_discriminant_score);
620 pe.setParam(PeptideEvidenceParam::sage_peptide_q, m_line.peptide_q);
621 pe.setParam(PeptideEvidenceParam::sage_posterior_error, m_line.posterior_error);
622 pe.setParam(PeptideEvidenceParam::sage_spectrum_q, m_line.spectrum_q);
623 pe.setParam(PeptideEvidenceParam::sage_predicted_rt, m_line.predicted_rt);
624 pe.setParam(PeptideEvidenceParam::sage_isotope_error, m_line.isotope_error);
625
626
627 PeptideMatch peptide_match;
628 // peptide_match.setStart(mz_peptide_evidence.start);
629 peptide_match.setPeptideEvidenceSp(
630 msp_identificationSageJsonFileSp.get()->getPeptideEvidenceStore().getInstance(&pe));
631 */
632
633 // find the scan in sample
634 auto it_insert = mp_currentSample->scan_map.insert({m_spectrumNativeId, Scan()});
635 Scan *current_cbor_scan_p = &(it_insert.first->second);
636 if(it_insert.second)
637 {
638 // new scan
639 QCborMap &scan_id = it_insert.first->second.cbor_id;
640 scan_id.insert(QString("index"), (qint64)m_spectrumIndex);
641 scan_id.insert(QString("native_id"), m_spectrumNativeId);
642
643 QCborMap &scan_ms2 = it_insert.first->second.cbor_ms2;
644 scan_ms2.insert(QString("rt"), m_line.rt);
645
646 QCborMap &scan_precursor = it_insert.first->second.cbor_precursor;
647 scan_precursor.insert(QString("z"), m_line.charge);
648 scan_precursor.insert(QString("mh"), m_line.expmass);
649 double exp_mz = (m_line.expmass + ((double)m_line.charge * MHPLUS)) / m_line.charge;
650 scan_precursor.insert(QString("mz"), exp_mz);
651 }
652
653 Psm one_psm;
654 one_psm.peptide_sequence_li = msp_peptide.get()->getSequenceLi();
655 one_psm.proforma = msp_peptide.get()->toProForma();
656 one_psm.protein_list = m_proteinList;
657
658
659 one_psm.cbor_eval.insert(QString("aligned_rt"), m_line.aligned_rt);
660 one_psm.cbor_eval.insert(QString("calcmass"), m_line.calcmass);
661 one_psm.cbor_eval.insert(QString("delta_best"), m_line.delta_best);
662 one_psm.cbor_eval.insert(QString("delta_mobility"), m_line.delta_mobility);
663 one_psm.cbor_eval.insert(QString("delta_next"), m_line.delta_next);
664 one_psm.cbor_eval.insert(QString("delta_rt_model"), m_line.delta_rt_model);
665 one_psm.cbor_eval.insert(QString("fragment_ppm"), m_line.fragment_ppm);
666 one_psm.cbor_eval.insert(QString("hyperscore"), m_line.hyperscore);
667 one_psm.cbor_eval.insert(QString("ion_mobility"), m_line.ion_mobility);
668 one_psm.cbor_eval.insert(QString("isotope_error"), m_line.isotope_error);
669 one_psm.cbor_eval.insert(QString("label"), m_line.label);
670 one_psm.cbor_eval.insert(QString("longest_b"), (qint64)m_line.longest_b);
671 one_psm.cbor_eval.insert(QString("longest_y"), (qint64)m_line.longest_y);
672 one_psm.cbor_eval.insert(QString("longest_y_pct"), m_line.longest_y_pct);
673 one_psm.cbor_eval.insert(QString("matched_intensity_pct"), m_line.matched_intensity_pct);
674 one_psm.cbor_eval.insert(QString("matched_peaks"), (qint64)m_line.matched_peaks);
675 one_psm.cbor_eval.insert(QString("missed_cleavages"), m_line.missed_cleavages);
676 one_psm.cbor_eval.insert(QString("ms2_intensity"), m_line.ms2_intensity);
677 one_psm.cbor_eval.insert(QString("peptide_len"), (qint64)m_line.peptide_len);
678 one_psm.cbor_eval.insert(QString("peptide_q"), m_line.peptide_q);
679 one_psm.cbor_eval.insert(QString("poisson"), m_line.poisson);
680 one_psm.cbor_eval.insert(QString("posterior_error"), m_line.posterior_error);
681 one_psm.cbor_eval.insert(QString("precursor_ppm"), m_line.precursor_ppm);
682 one_psm.cbor_eval.insert(QString("predicted_mobility"), m_line.predicted_mobility);
683 one_psm.cbor_eval.insert(QString("predicted_rt"), m_line.predicted_rt);
684 one_psm.cbor_eval.insert(QString("protein_q"), m_line.protein_q);
685 one_psm.cbor_eval.insert(QString("rank"), m_line.rank);
686 one_psm.cbor_eval.insert(QString("sage_discriminant_score"), m_line.sage_discriminant_score);
687 one_psm.cbor_eval.insert(QString("scored_candidates"), (qint64)m_line.scored_candidates);
688 one_psm.cbor_eval.insert(QString("semi_enzymatic"), m_line.semi_enzymatic);
689 one_psm.cbor_eval.insert(QString("spectrum_q"), m_line.spectrum_q);
690
691 current_cbor_scan_p->psm_list.emplace_back(one_psm);
692
693
694 std::size_t progress = m_lineNumber / 10000;
695 if(progress > m_progressIndex)
696 {
697 if(mp_monitor->shouldIstop())
698 {
700 QObject::tr("Sage TSV data reading process interrupted"));
701 }
702 m_progressIndex = progress;
703 mp_monitor->setStatus(QString("%1K ").arg(m_progressIndex * 10));
704 }
705}
706
707void
709{
710 m_sageReader.getCborStreamWriter().startMap();
711 m_sageReader.getCborStreamWriter().append("name");
712 one_sample.cbor_core_sample.value("name").toCbor(m_sageReader.getCborStreamWriter());
713
714 m_sageReader.getCborStreamWriter().append("identification_file_list");
715 one_sample.cbor_core_sample.value("identification_file_list")
716 .toCbor(m_sageReader.getCborStreamWriter());
717
718
719 m_sageReader.getCborStreamWriter().append("peaklist_file");
720 one_sample.cbor_core_sample.value("peaklist_file").toCbor(m_sageReader.getCborStreamWriter());
721 //"scan_list": [
722
723 m_sageReader.getCborStreamWriter().append("scan_list");
724 m_sageReader.getCborStreamWriter().startArray(one_sample.scan_map.size());
725 for(auto &it_scan : one_sample.scan_map)
726 {
727 writeScan(it_scan.second);
728 }
729 m_sageReader.getCborStreamWriter().endArray();
730
731
732 m_sageReader.getCborStreamWriter().endMap();
733}
734
735void
737{
738 m_sageReader.getCborStreamWriter().startMap();
739 m_sageReader.getCborStreamWriter().append("id");
740 QCborValue(one_scan.cbor_id).toCbor(m_sageReader.getCborStreamWriter());
741 m_sageReader.getCborStreamWriter().append("precursor");
742 QCborValue(one_scan.cbor_precursor).toCbor(m_sageReader.getCborStreamWriter());
743 m_sageReader.getCborStreamWriter().append("ms2");
744 QCborValue(one_scan.cbor_ms2).toCbor(m_sageReader.getCborStreamWriter());
745
746 m_sageReader.getCborStreamWriter().append("psm_list");
747 m_sageReader.getCborStreamWriter().startArray(one_scan.psm_list.size());
748 for(auto &it_psm : one_scan.psm_list)
749 {
750 writePsm(it_psm);
751 }
752 m_sageReader.getCborStreamWriter().endArray();
753
754 m_sageReader.getCborStreamWriter().endMap();
755}
756
757void
759{
760 m_sageReader.getCborStreamWriter().startMap();
761 m_sageReader.getCborStreamWriter().append("proforma");
762 m_sageReader.getCborStreamWriter().append(one_psm.proforma);
763 m_sageReader.getCborStreamWriter().append("protein_list");
764
765 QCborArray cbor_protein_list;
766 for(const QString &accession : one_psm.protein_list)
767 {
768 // qWarning() << "accession=" << accession;
769 QCborMap cbor_protein;
770 cbor_protein.insert(QString("accession"), accession);
771
772
773 // start/end positions
774 QString protein_sequence =
775 QString(m_psmProteinMap.getByAccession(accession).protein_sp.get()->getSequence())
776 .replace("L", "I");
777 int position = protein_sequence.indexOf(one_psm.peptide_sequence_li);
778
779 QCborArray positions;
780 while(position >= 0)
781 {
782 positions.push_back(position);
783 position = protein_sequence.indexOf(one_psm.peptide_sequence_li, position + 1);
784 }
785
786 cbor_protein.insert(QString("positions"), positions);
787
788 cbor_protein_list.append(cbor_protein);
789 }
790
791
792 QCborValue(cbor_protein_list).toCbor(m_sageReader.getCborStreamWriter());
793
794 m_sageReader.getCborStreamWriter().append("eval");
795 m_sageReader.getCborStreamWriter().startMap();
796 m_sageReader.getCborStreamWriter().append("sage");
797 QCborValue(one_psm.cbor_eval).toCbor(m_sageReader.getCborStreamWriter());
798 m_sageReader.getCborStreamWriter().endMap();
799
800 m_sageReader.getCborStreamWriter().endMap();
801}
802
803
804} // namespace psm
805} // namespace cbor
806} // namespace pappso
static PeptideSp parseString(const QString &pepstr)
store PsmProtein in a map with accession as key
std::vector< SageModification > getStaticModificationList() const
std::vector< SageModification > getVariableModificationList() const
std::vector< SageReader::SageModification > m_staticModificationList
void parseProteins(const QString &proteins_str)
virtual void endSheet() override
pappso::UiMonitorInterface * mp_monitor
virtual void startSheet(const QString &sheet_name) override
std::vector< SageReader::SageModification > m_variableModificationList
void parsePeptide(const QString &peptide_str)
bool parseSpectrumStringId(const QString &spectrum_string_id)
void writeSample(const Sample &one_sample)
virtual void setCell(const OdsCell &cell) override
void writePsm(const Psm &one_psm)
SageTsvHandler(pappso::UiMonitorInterface *p_monitor, const SageReader &sage_reader, PsmProteinMap &psm_protein_map)
void writeScan(const Scan &one_scan)
std::map< QString, Sample > m_sampleMap
virtual void endDocument() override
virtual void startLine() override
void parseMsRunFilename(const QString &msrun_filename)
virtual void endLine() override
std::vector< Columns > m_columnTypeList
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
const pappso_double MHPLUS(1.007276466879)
std::shared_ptr< Protein > protein_sp