libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
psmspecpeptidoms.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/cbor/psm/evalscan/psmspecglob.h
3 * \date 19/07/2025
4 * \author Olivier Langella
5 * \brief compute specglob alignment on scan's PSM
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
10 *
11 * This file is part of PAPPSOms-tools.
12 *
13 * PAPPSOms-tools is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * PAPPSOms-tools is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
25 *
26 ******************************************************************************/
27#pragma once
28
34#include <QJsonObject>
35
36namespace pappso
37{
38namespace cbor
39{
40namespace psm
41{
42
43class PsmSpecPeptidOmsScan;
44/**
45 * @todo write docs
46 */
48{
50
51 public:
52 /**
53 * Default constructor
54 */
55 PsmSpecPeptidOms(std::size_t buffer_scan_size,
56 CborStreamWriter *cbor_output_p,
57 const QJsonObject &parameters);
58
59 /**
60 * Destructor
61 */
62 virtual ~PsmSpecPeptidOms();
63
64
65 void filterMassSpectrum(pappso::MassSpectrum &mass_spectrum) const;
66
67 const pappso::AaCode &getAaCode() const;
68
69 protected:
71
72 void parameterMapReady(pappso::UiMonitorInterface &monitor) override;
73
74
75 virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override;
76
77
78 virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override;
79
80
81 protected:
86 std::size_t m_nMostIntense;
87 bool m_deisotope = true;
89
90
91 std::size_t m_countScanProcessed = 0;
95};
96
97
99{
100 public:
101 /**
102 * Default constructor
103 */
104 PsmSpecPeptidOmsScan(const PsmSpecPeptidOms &psm_specpeptidoms,
105 pappso::PrecisionPtr fragment_tolerance);
106
107 /**
108 * Destructor
109 */
110 virtual ~PsmSpecPeptidOmsScan();
111
112 virtual void filterAndSortPsmList() override;
113
114 protected:
115 void process() override;
116
117 void sequenceAlignment(bool is_reverse,
118 const QCborMap &old_cbor_psm_map,
119 QCborArray &new_psm_arr,
120 pappso::specpeptidoms::SpOMSSpectrumCsp &experimental_spectrum,
121 pappso::specpeptidoms::SemiGlobalAlignment &semi_global_alignment,
122 const pappso::specpeptidoms::SpOMSProtein *protein_ptr);
123
124 void storeAlignment(bool is_reverse,
125 const QCborMap &old_cbor_psm,
126 QCborMap &new_cbor_psm,
127 const QString &accession,
128 const pappso::specpeptidoms::Alignment &alignment);
129
130 void fixPositionStart(bool is_reverse, QCborMap &new_cbor_psm, std::size_t offset_position) const;
131
132
133 private:
136};
137} // namespace psm
138} // namespace cbor
139} // namespace pappso
collection of integer code for each amino acid 0 => null 1 to 20 => amino acid sorted by there mass (...
Definition aacode.h:44
Class to represent a mass spectrum.
Basic PSM file reader to process scan (parallelized scan processing) and write a new resulting PSM fi...
store PsmProtein in a map with accession as key
void sequenceAlignment(bool is_reverse, const QCborMap &old_cbor_psm_map, QCborArray &new_psm_arr, pappso::specpeptidoms::SpOMSSpectrumCsp &experimental_spectrum, pappso::specpeptidoms::SemiGlobalAlignment &semi_global_alignment, const pappso::specpeptidoms::SpOMSProtein *protein_ptr)
void storeAlignment(bool is_reverse, const QCborMap &old_cbor_psm, QCborMap &new_cbor_psm, const QString &accession, const pappso::specpeptidoms::Alignment &alignment)
void fixPositionStart(bool is_reverse, QCborMap &new_cbor_psm, std::size_t offset_position) const
const PsmSpecPeptidOms * mp_psmSpecPeptidOms
void parameterMapReady(pappso::UiMonitorInterface &monitor) override
virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override
const pappso::AaCode & getAaCode() const
void filterMassSpectrum(pappso::MassSpectrum &mass_spectrum) const
pappso::specpeptidoms::ScoreValues m_scoreValues
pappso::cbor::psm::PsmProteinMap m_newProteinMap
CborScanMapBase * newCborScanMap() override
virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override
std::shared_ptr< const SpOMSSpectrum > SpOMSSpectrumCsp
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39