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>
36
37namespace pappso
38{
39namespace cbor
40{
41namespace psm
42{
43
45/**
46 * @todo write docs
47 */
49{
51
52 public:
53 /**
54 * Default constructor
55 */
56 PsmSpecPeptidOms(std::size_t buffer_scan_size,
57 CborStreamWriter *cbor_output_p,
58 const QJsonObject &parameters);
59
60 /**
61 * Destructor
62 */
63 virtual ~PsmSpecPeptidOms();
64
65
66 void filterMassSpectrum(pappso::MassSpectrum &mass_spectrum) const;
67
68 const pappso::AaCode &getAaCode() const;
69
70 protected:
72
73 void parameterMapReady(pappso::UiMonitorInterface &monitor) override;
74
75
76 virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override;
77
78
79 virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override;
80
81
82 protected:
87 std::size_t m_nMostIntense;
88 bool m_deisotope = true;
90
91
92 std::size_t m_countScanProcessed = 0;
96};
97
98
100{
101 public:
102 /**
103 * Default constructor
104 */
105 PsmSpecPeptidOmsScan(const PsmSpecPeptidOms &psm_specpeptidoms,
106 pappso::PrecisionPtr fragment_tolerance);
107
108 /**
109 * Destructor
110 */
111 virtual ~PsmSpecPeptidOmsScan();
112
113 virtual void filterAndSortPsmList() override;
114
115 protected:
116 void process() override;
117
118 void sequenceAlignment(bool is_reverse,
119 const QCborMap &old_cbor_psm_map,
120 QCborArray &new_psm_arr,
121 pappso::specpeptidoms::SpOMSSpectrumCsp &experimental_spectrum,
122 pappso::specpeptidoms::SemiGlobalAlignment &semi_global_alignment,
123 const pappso::specpeptidoms::SpOMSProtein *protein_ptr);
124
125 void storeAlignment(bool is_reverse,
126 const QCborMap &old_cbor_psm,
127 QCborMap &new_cbor_psm,
128 const QString &accession,
129 const pappso::specpeptidoms::Alignment &alignment);
130
131 void fixPositionStart(bool is_reverse, QCborMap &new_cbor_psm, std::size_t offset_position) const;
132
133
134 private:
137};
138} // namespace psm
139} // namespace cbor
140} // 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.
overrides QCborStreamWriter base class to provide convenient functions
CborScanMapBase(const PsmFileScanProcess &psm_file_scan_process)
PsmFileScanProcessAndCopy(std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QString &operation)
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
PsmSpecPeptidOmsScan(const PsmSpecPeptidOms &psm_specpeptidoms, pappso::PrecisionPtr fragment_tolerance)
void parameterMapReady(pappso::UiMonitorInterface &monitor) override
virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override
PsmSpecPeptidOms(std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QJsonObject &parameters)
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
#define PMSPP_LIB_DECL
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
const PrecisionBase * PrecisionPtr
Definition precision.h:122