libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
peptidemodel.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/specglob/peptidemodel.h
3 * \date 05/10/2025
4 * \author Olivier Langella
5 * \brief SpecPeptidOMS peptide model
6 * \todo https://www.psidev.info/proforma
7 *
8 */
9
10
11/*
12 * SpecGlobTool, Spectra to peptide alignment tool
13 * Copyright (C) 2025 Olivier Langella
14 * <olivier.langella@universite-paris-saclay.fr>
15 *
16 * This program is free software: you can redistribute ipetide to spectrum
17 * alignmentt and/or modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation, either version 3 of the
19 * License, or (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 */
30
31#pragma once
32
36
37namespace pappso
38{
39namespace specpeptidoms
40{
41
42
44{
46 double m_massDifference = 0;
47 bool m_skipped = false;
48
49 QString toProForma() const;
50 QString toInterpretation() const;
51};
52/**
53 * @brief modelize peptide sequence to facilitate rendering in bracket or proforma
54 */
55class PMSPP_LIB_DECL PeptideModel : public std::vector<AminoAcidModel>
56{
57 public:
58 /**
59 * Default constructor
60 */
62
63 /**
64 * Destructor
65 */
66 virtual ~PeptideModel();
67
68 void reset();
69
70 void setCterShift(double mass_shift);
71 void setNterShift(double mass_shift);
72
73 QString toProForma() const;
74
75 QString toInterpretation() const;
76
77 void setPrecursorMass(double mass);
78
79 double getPrecursorMass() const;
80
81 static QString toProFormaMass(double mass);
82
83 double getMass() const;
84
85 /**
86 * @brief Return the difference between the precursor's mass and the mass modelized by the
87 * PeptideModel.
88 */
89 double getNonAlignedMass() const;
90
91 private:
92 double m_cterShift = 0;
93 double m_nterShift = 0;
94 double m_precursorMass = 0;
95};
96
97} // namespace specpeptidoms
98} // namespace pappso
static QString toProFormaMass(double mass)
void setNterShift(double mass_shift)
void setCterShift(double mass_shift)
double getNonAlignedMass() const
Return the difference between the precursor's mass and the mass modelized by the PeptideModel.
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39