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"
38
39
40namespace pappso
41{
42namespace cbor
43{
44namespace psm
45{
46
48 const SageReader &sage_reader,
49 bool is_fasta_pass,
50 PsmProteinMap &psm_protein_map)
51 : m_sageReader(sage_reader), m_psmProteinMap(psm_protein_map)
52{
53 mp_monitor = p_monitor;
56 m_decoyTag = sage_reader.getDecoyTag();
57 m_isFirstPass = is_fasta_pass;
58}
59
63
64void
66{
67 for(auto it_sample_map : m_sampleMap)
68 {
69 writeSample(it_sample_map.second);
70 }
71}
72
73void
75{
76 if(m_line.charge != 0)
77 recordLine();
79}
80
81void
85
86void
87SageTsvHandler::setCell(const OdsCell &cell)
88{
89 if(m_lineNumber == 0)
90 {
91 // header
92 QString tag = cell.getStringValue();
93 if(tag == "psm_id")
94 {
96 }
97 else if(tag == "peptide")
98 {
100 }
101 else if(tag == "proteins")
102 {
104 }
105 else if(tag == "num_proteins")
106 {
108 }
109 else if(tag == "filename")
110 {
112 }
113 else if(tag == "scannr")
114 {
116 }
117 else if(tag == "rank")
118 {
120 }
121 else if(tag == "label")
122 {
124 }
125 else if(tag == "expmass")
126 {
128 }
129
130 else if(tag == "calcmass")
131 {
133 }
134 else if(tag == "charge")
135 {
137 }
138 else if(tag == "peptide_len")
139 {
141 }
142 else if(tag == "missed_cleavages")
143 {
145 }
146 else if(tag == "semi_enzymatic")
147 {
149 }
150 else if(tag == "isotope_error")
151 {
153 }
154 else if(tag == "precursor_ppm")
155 {
157 }
158 else if(tag == "fragment_ppm")
159 {
161 }
162 else if(tag == "hyperscore")
163 {
165 }
166 else if(tag == "delta_next")
167 {
169 }
170 else if(tag == "delta_best")
171 {
173 }
174 else if(tag == "rt")
175 {
176 m_columnTypeList.push_back(Columns::rt);
177 }
178 else if(tag == "aligned_rt")
179 {
181 }
182 else if(tag == "predicted_rt")
183 {
185 }
186 else if(tag == "delta_rt_model")
187 {
189 }
190 else if(tag == "ion_mobility")
191 {
193 }
194 else if(tag == "predicted_mobility")
195 {
197 }
198 else if(tag == "delta_mobility")
199 {
201 }
202 else if(tag == "matched_peaks")
203 {
205 }
206 else if(tag == "longest_b")
207 {
209 }
210 else if(tag == "longest_y")
211 {
213 }
214 else if(tag == "longest_y_pct")
215 {
217 }
218 else if(tag == "matched_intensity_pct")
219 {
221 }
222 else if(tag == "scored_candidates")
223 {
225 }
226 else if(tag == "poisson")
227 {
229 }
230 else if(tag == "sage_discriminant_score")
231 {
233 }
234 else if(tag == "posterior_error")
235 {
237 }
238 else if(tag == "spectrum_q")
239 {
241 }
242 else if(tag == "peptide_q")
243 {
245 }
246 else if(tag == "protein_q")
247 {
249 }
250 else if(tag == "ms2_intensity")
251 {
253 }
254 else
255 {
256 throw pappso::ExceptionNotPossible(QObject::tr("column \"%1\" not defined").arg(tag));
257 }
258 }
259 else
260 {
261 if(m_columnNumber >= m_columnTypeList.size())
262 {
264 QObject::tr("the value %1 is out of range").arg(cell.getStringValue()));
265 }
267 switch(column_type)
268 {
269 case Columns::psm_id:
270 break;
271 case Columns::peptide:
272 parsePeptide(cell.toString());
273 break;
275 parseProteins(cell.toString());
276 break;
278 if((std::size_t)cell.getDoubleValue() != (std::size_t)m_proteinList.size())
279 {
281 QObject::tr("column \"num_proteins\"!=%1").arg(m_proteinList.size()));
282 }
283 break;
285 parseMsRunFilename(cell.toString());
286 break;
287 case Columns::scannr:
288 parseSpectrumStringId(cell.toString());
289 break;
290 case Columns::rank:
291 m_line.rank = cell.getDoubleValue();
292 break;
293 case Columns::label:
294 m_line.label = cell.getDoubleValue();
295 break;
296 case Columns::expmass:
297 m_line.expmass = cell.getDoubleValue();
298 break;
300 m_line.calcmass = cell.getDoubleValue();
301 break;
302 case Columns::charge:
303 m_line.charge = cell.getDoubleValue();
304 break;
306 m_line.peptide_len = cell.getDoubleValue();
307 break;
309 m_line.missed_cleavages = cell.getDoubleValue();
310 break;
312 m_line.semi_enzymatic = cell.getDoubleValue();
313 break;
315 m_line.isotope_error = cell.getDoubleValue();
316 break;
317
319 m_line.precursor_ppm = cell.getDoubleValue();
320 break;
322 m_line.fragment_ppm = cell.getDoubleValue();
323 break;
325 m_line.hyperscore = cell.getDoubleValue();
326 break;
328 m_line.delta_next = cell.getDoubleValue();
329 break;
331 m_line.delta_best = cell.getDoubleValue();
332 break;
333 case Columns::rt:
334 m_line.rt = cell.getDoubleValue() * 60; // to convert retention time in seconds
335 break;
337 m_line.aligned_rt = cell.getDoubleValue();
338 break;
340 m_line.predicted_rt = cell.getDoubleValue();
341 break;
343 m_line.delta_rt_model = cell.getDoubleValue();
344 break;
346 m_line.ion_mobility = cell.getDoubleValue();
347 break;
349 m_line.predicted_mobility = cell.getDoubleValue();
350 break;
352 m_line.delta_mobility = cell.getDoubleValue();
353 break;
355 m_line.matched_peaks = cell.getDoubleValue();
356 break;
358 m_line.longest_b = cell.getDoubleValue();
359 break;
361 m_line.longest_y = cell.getDoubleValue();
362 break;
364 m_line.longest_y_pct = cell.getDoubleValue();
365 break;
367 m_line.matched_intensity_pct = cell.getDoubleValue();
368 break;
370 m_line.scored_candidates = cell.getDoubleValue();
371 break;
372 case Columns::poisson:
373 m_line.poisson = cell.getDoubleValue();
374 break;
376 m_line.sage_discriminant_score = cell.getDoubleValue();
377 break;
379 m_line.posterior_error = cell.getDoubleValue();
380 break;
382 m_line.spectrum_q = cell.getDoubleValue();
383 break;
385 m_line.peptide_q = cell.getDoubleValue();
386 break;
388 m_line.protein_q = cell.getDoubleValue();
389 break;
391 m_line.ms2_intensity = cell.getDoubleValue();
392 break;
393 default:
394 qDebug() << "m_line.calcmass=" << m_line.calcmass;
396 QObject::tr("column type %1 not implemented").arg((std::uint8_t)column_type));
397 break;
398 }
399
400 /*
401
402 2333 TMISDSDYTEFENFTK
403 GRMZM2G018197_P01;GRMZM2G068952_P01;GRMZM5G822976_P01 3
404 20120906_balliau_extract_1_A01_urnb-1.mzML controllerType=0
405 controllerNumber=1 scan=12542 1 1 1926.8225 1926.8193 2 16 0 0
406 0.0 1.6471838 1.9796097 54.06803492297634 28.049970383419556 0.0 38.192993
407 0.76385987 0.7671368 0.0032769442 0.0 0.0 0.0 16 2 14 0.875 32.54396 380
408 -13.375352220427656 1.1570586 -34.13482 0.00016041065 0.00022231363
409 0.00040124074 1271951.1
410 */
411 }
413}
414
415void
417{
418 m_columnNumber = 0;
419 msp_peptide = nullptr;
420 m_proteinList.clear();
421 m_line = Line();
422}
423
424void
425SageTsvHandler::startSheet(const QString &sheet_name)
426{
427 m_columnNumber = 0;
428 m_lineNumber = 0;
429 mp_monitor->setStatus(QObject::tr("reading Sage TSV file"));
430
431 if(mp_monitor->shouldIstop())
432 {
433 throw pappso::ExceptionInterrupted(QObject::tr("Sage TSV data reading process interrupted"));
434 }
435}
436
437void
438SageTsvHandler::parsePeptide(const QString &peptide_str)
439{
440 qDebug();
441 if(m_isFirstPass)
442 return;
443 QString peptide_str_verif = peptide_str;
444 // fixed modifications :
446 {
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()));
451 }
452 // variable modifications :
454 {
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()));
459 }
460
461 qDebug() << peptide_str_verif;
462 // LPMFGC[+57.0216]NDATQVYK
464 qDebug();
465 // variable modifications :
466 /*
467 setVariableModifications(peptide_sp,
468 peptide_line.peptide_string_list.at(6));
469*/
470 qDebug() << msp_peptide.get()->toProForma();
471}
472
473
474void
475SageTsvHandler::parseProteins(const QString &proteins_str)
476{
477 m_proteinList.clear();
478 m_proteinList = proteins_str.split(";");
479 if(m_isFirstPass)
480 {
481 for(QString accession : m_proteinList)
482 {
483
484 PsmProtein psm_protein;
485 psm_protein.protein_sp = std::make_shared<pappso::Protein>(accession, "");
486 psm_protein.isTarget = true;
487 if(accession.startsWith(m_decoyTag))
488 {
489 psm_protein.isTarget = false;
490 }
491
492 m_psmProteinMap.insert(psm_protein);
493 }
494 }
495}
496
497bool
498SageTsvHandler::parseSpectrumStringId(const QString &spectrum_string_id)
499{
500 m_spectrumNativeId = spectrum_string_id;
501 qDebug() << spectrum_string_id;
502 if(m_isFirstPass)
503 return false;
504 // controllerType=0 controllerNumber=1 scan=176056
505
506 bool is_ok = false;
507 QStringList scan_list = spectrum_string_id.split("scan=");
508 if(scan_list.size() == 2)
509 {
510 // we bet that there is a scan number, easy to parse
511 m_spectrumIndex = scan_list.at(1).toULongLong(&is_ok);
512 if(m_spectrumIndex > 0)
514 }
515 if(is_ok == false)
516 { /*
517 if(msp_previousMsrun != msp_msrun)
518 {
519 mp_monitor->setStatus(
520 QObject::tr("Reading mz data file %1").arg(msp_msrun.get()->getFileName()));
521 msp_previousMsrun = msp_msrun;
522 }
523
524 pappso::MsRunReader *msrunreader_p = msp_msrun.get()->getMsRunReaderSPtr().get();
525 if(msrunreader_p->getMsRunId()->getMsDataFormat() == pappso::MsDataFormat::brukerTims)
526 {
527 m_spectrumIndex = spectrum_string_id.toInt() * 2 - 1;
528 }
529 else
530 {
531 m_spectrumIndex =
532 msrunreader_p->spectrumStringIdentifier2SpectrumIndex(spectrum_string_id);
533 }*/
534 }
535
536 qDebug() << spectrum_string_id;
537 return is_ok;
538}
539
540void
541SageTsvHandler::parseMsRunFilename(const QString &msrun_filename)
542{
543
544 if(m_isFirstPass)
545 return;
546
547 // find the sample :
548 auto it_insert = m_sampleMap.insert({msrun_filename, {}});
549 mp_currentSample = &(it_insert.first->second);
550 if(it_insert.second)
551 {
552 // new sample
553 it_insert.first->second.name = msrun_filename;
554 QCborMap ms_file;
555 QCborMap identification_file;
556
557 it_insert.first->second.cbor_core_sample.insert(QString("name"),
558 QFileInfo(msrun_filename).baseName());
559
560 // identification_file_list
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);
566
567
568 ms_file.insert(QString("name"), QFileInfo(msrun_filename).absoluteFilePath());
569 it_insert.first->second.cbor_core_sample.insert(QString("peaklist_file"), ms_file);
570 }
571
572 /*
573 msp_msrun = m_sageReader.getSageFileReader().getMsRunSpWithFileName(msrun_filename);
574 qDebug() << msp_msrun.get()->getFileName();
575
576 msp_identificationSageJsonFileSp =
577 m_sageReader.getSageFileReader().getIdentificationSageJsonFileSpWithFileName(msrun_filename);
578
579 mp_identificationGroup =
580 m_sageReader.getSageFileReader().getIdentificationGroupPtrWithFileName(msrun_filename);
581 qDebug() << msp_msrun.get()->getFileName();
582 */
583}
584
585void
587{
588 qDebug();
589
590 if(m_isFirstPass)
591 {
592 for(const QString &accession : m_proteinList)
593 {
594 PsmProtein psm_protein;
595 psm_protein.protein_sp = std::make_shared<pappso::Protein>(accession, "");
596
597 auto it = m_psmProteinMap.insert(psm_protein);
598 it.first->second.cborEval.insert(QString("protein_q"), m_line.protein_q);
599 }
600 }
601 else
602 {
603 /*
604 PeptideEvidence pe(msp_msrun.get(), m_spectrumIndex, true);
605 pe.setCharge(m_line.charge);
606 pe.setChecked(true);
607 pe.setExperimentalMass(m_line.expmass);
608 pe.setPeptideXtpSp(msp_peptide);
609 pe.setIdentificationDataSource(msp_identificationSageJsonFileSp.get());
610 pe.setIdentificationEngine(m_identificationEngine);
611 pe.setRetentionTime(m_line.rt);
612 pe.setParam(PeptideEvidenceParam::tandem_hyperscore, m_line.hyperscore);
613 pe.setParam(PeptideEvidenceParam::sage_sage_discriminant_score,
614 m_line.sage_discriminant_score);
615 pe.setParam(PeptideEvidenceParam::sage_peptide_q, m_line.peptide_q);
616 pe.setParam(PeptideEvidenceParam::sage_posterior_error, m_line.posterior_error);
617 pe.setParam(PeptideEvidenceParam::sage_spectrum_q, m_line.spectrum_q);
618 pe.setParam(PeptideEvidenceParam::sage_predicted_rt, m_line.predicted_rt);
619 pe.setParam(PeptideEvidenceParam::sage_isotope_error, m_line.isotope_error);
620
621
622 PeptideMatch peptide_match;
623 // peptide_match.setStart(mz_peptide_evidence.start);
624 peptide_match.setPeptideEvidenceSp(
625 msp_identificationSageJsonFileSp.get()->getPeptideEvidenceStore().getInstance(&pe));
626 */
627
628 // find the scan in sample
629 auto it_insert = mp_currentSample->scan_map.insert({m_spectrumNativeId, Scan()});
630 Scan *current_cbor_scan_p = &(it_insert.first->second);
631 if(it_insert.second)
632 {
633 // new scan
634 QCborMap &scan_id = it_insert.first->second.cbor_id;
635 scan_id.insert(QString("index"), (qint64)m_spectrumIndex);
636 scan_id.insert(QString("native_id"), m_spectrumNativeId);
637
638 QCborMap &scan_ms2 = it_insert.first->second.cbor_ms2;
639 scan_ms2.insert(QString("rt"), m_line.rt);
640
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);
644 }
645
646 Psm one_psm;
647 one_psm.proforma = msp_peptide.get()->toProForma();
648
649 for(const QString &accession : m_proteinList)
650 {
651 QCborMap cbor_protein;
652 cbor_protein.insert(QString("accession"), accession);
653
654
655 // start/end positions
656 QString protein_sequence =
657 QString(m_psmProteinMap.getByAccession(accession).protein_sp.get()->getSequence())
658 .replace("L", "I");
659 QString peptide_sequence = msp_peptide.get()->getSequenceLi();
660 int position = protein_sequence.indexOf(peptide_sequence);
661
662 QCborArray positions;
663 while(position >= 0)
664 {
665 positions.push_back(position);
666 position = protein_sequence.indexOf(peptide_sequence, position + 1);
667 }
668
669 cbor_protein.insert(QString("positions"), positions);
670
671 one_psm.cbor_protein_list.append(cbor_protein);
672 }
673
674 one_psm.cbor_eval.insert(QString("aligned_rt"), m_line.aligned_rt);
675 one_psm.cbor_eval.insert(QString("calcmass"), m_line.calcmass);
676 one_psm.cbor_eval.insert(QString("delta_best"), m_line.delta_best);
677 one_psm.cbor_eval.insert(QString("delta_mobility"), m_line.delta_mobility);
678 one_psm.cbor_eval.insert(QString("delta_next"), m_line.delta_next);
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);
681 one_psm.cbor_eval.insert(QString("hyperscore"), m_line.hyperscore);
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);
684 one_psm.cbor_eval.insert(QString("label"), m_line.label);
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);
693 one_psm.cbor_eval.insert(QString("peptide_q"), m_line.peptide_q);
694 one_psm.cbor_eval.insert(QString("poisson"), m_line.poisson);
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);
699 one_psm.cbor_eval.insert(QString("protein_q"), m_line.protein_q);
700 one_psm.cbor_eval.insert(QString("rank"), m_line.rank);
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);
704 one_psm.cbor_eval.insert(QString("spectrum_q"), m_line.spectrum_q);
705
706 current_cbor_scan_p->psm_list.emplace_back(one_psm);
707 }
708
709 std::size_t progress = m_lineNumber / 10000;
710 if(progress > m_progressIndex)
711 {
712 if(mp_monitor->shouldIstop())
713 {
715 QObject::tr("Sage TSV data reading process interrupted"));
716 }
717 m_progressIndex = progress;
718 mp_monitor->setStatus(QString("%1K ").arg(m_progressIndex * 10));
719 }
720}
721
722void
724{
725 m_sageReader.getCborStreamWriter().startMap();
726 m_sageReader.getCborStreamWriter().append("name");
727 one_sample.cbor_core_sample.value("name").toCbor(m_sageReader.getCborStreamWriter());
728
729 m_sageReader.getCborStreamWriter().append("identification_file_list");
730 one_sample.cbor_core_sample.value("identification_file_list")
731 .toCbor(m_sageReader.getCborStreamWriter());
732
733
734 m_sageReader.getCborStreamWriter().append("peaklist_file");
735 one_sample.cbor_core_sample.value("peaklist_file").toCbor(m_sageReader.getCborStreamWriter());
736 //"scan_list": [
737
738 m_sageReader.getCborStreamWriter().append("scan_list");
739 m_sageReader.getCborStreamWriter().startArray(one_sample.scan_map.size());
740 for(auto &it_scan : one_sample.scan_map)
741 {
742 writeScan(it_scan.second);
743 }
744 m_sageReader.getCborStreamWriter().endArray();
745
746
747 m_sageReader.getCborStreamWriter().endMap();
748}
749
750void
752{
753 m_sageReader.getCborStreamWriter().startMap();
754 m_sageReader.getCborStreamWriter().append("id");
755 QCborValue(one_scan.cbor_id).toCbor(m_sageReader.getCborStreamWriter());
756 m_sageReader.getCborStreamWriter().append("precursor");
757 QCborValue(one_scan.cbor_precursor).toCbor(m_sageReader.getCborStreamWriter());
758 m_sageReader.getCborStreamWriter().append("ms2");
759 QCborValue(one_scan.cbor_ms2).toCbor(m_sageReader.getCborStreamWriter());
760
761 m_sageReader.getCborStreamWriter().append("psm_list");
762 m_sageReader.getCborStreamWriter().startArray(one_scan.psm_list.size());
763 for(auto &it_psm : one_scan.psm_list)
764 {
765 writePsm(it_psm);
766 }
767 m_sageReader.getCborStreamWriter().endArray();
768
769 m_sageReader.getCborStreamWriter().endMap();
770}
771
772void
774{
775 m_sageReader.getCborStreamWriter().startMap();
776 m_sageReader.getCborStreamWriter().append("proforma");
777 m_sageReader.getCborStreamWriter().append(one_psm.proforma);
778 m_sageReader.getCborStreamWriter().append("protein_list");
779 QCborValue(one_psm.cbor_protein_list).toCbor(m_sageReader.getCborStreamWriter());
780
781 m_sageReader.getCborStreamWriter().append("eval");
782 m_sageReader.getCborStreamWriter().startMap();
783 m_sageReader.getCborStreamWriter().append("sage");
784 QCborValue(one_psm.cbor_eval).toCbor(m_sageReader.getCborStreamWriter());
785 m_sageReader.getCborStreamWriter().endMap();
786
787 m_sageReader.getCborStreamWriter().endMap();
788}
789
790
791} // namespace psm
792} // namespace cbor
793} // namespace pappso
static PeptideSp parseString(const QString &pepstr)
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)
SageTsvHandler(pappso::UiMonitorInterface *p_monitor, const SageReader &sage_reader, bool is_fasta_pass, PsmProteinMap &psm_protein_map)
void writeSample(const Sample &one_sample)
virtual void setCell(const OdsCell &cell) override
void writePsm(const Psm &one_psm)
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
std::shared_ptr< Protein > protein_sp