libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
experimentalspectrum.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/specglob/experimentalspectrum.h
3 * \date 08/11/2023
4 * \author Olivier Langella
5 * \brief transform a spectrum to SpecGlob spectra
6 *
7 * C++ implementation of the SpecGlob algorithm described in :
8 * 1. Prunier, G. et al. Fast alignment of mass spectra in large proteomics
9 * datasets, capturing dissimilarities arising from multiple complex
10 * modifications of peptides. BMC Bioinformatics 24, 421 (2023).
11 *
12 * HAL Id : hal-04296170 , version 1
13 * Mot de passe : hxo20cl
14 * DOI : 10.1186/s12859-023-05555-y
15 */
16
17
18/*
19 * SpecGlobTool, Spectra to peptide alignment tool
20 * Copyright (C) 2023 Olivier Langella
21 * <olivier.langella@universite-paris-saclay.fr>
22 *
23 * This program is free software: you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation, either version 3 of the License, or
26 * (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
35 *
36 */
37
38#pragma once
39
42#include "types.h"
43
44
45namespace pappso
46{
47namespace specglob
48{
49
56
58
59typedef std::shared_ptr<const ExperimentalSpectrum> ExperimentalSpectrumCsp;
60/**
61 * @todo write docs
62 */
64 : public std::vector<ExperimentalSpectrumDataPoint>
65{
66 public:
67 /**
68 * Default constructor
69 */
71 pappso::PrecisionPtr precision_ptr);
72
73 /**
74 * Copy constructor
75 *
76 * @param other TODO
77 */
79
80 /**
81 * Destructor
82 */
83 virtual ~ExperimentalSpectrum();
84
85 std::vector<double> getMassList() const;
86
87 /** @brief compute the symmetric mass
88 * for debuggin purpose
89 */
90 double getSymetricMz(double mz) const;
91
92 double getTargetMzSum() const;
93
94 double getPrecursorMass() const;
95
96 std::vector<double> getMassList(ExperimentalSpectrumDataPointType type) const;
97
98 QString toString() const;
99
100 const pappso::QualifiedMassSpectrum &getQualifiedMassSpectrum() const;
101
102 /** @brief find the peak for wich mass difference from rbegin corresponds to
103 * aaTheoMass Find if a peak back in the peak list has a mass difference that
104 * corresponds to the targeted mass
105 *
106 * @param start_position reverse iterator on the reference peak to look for
107 * mass difference from
108 * @param targeted_mass_range the mass difference to look forconst
109 * pappso::PeptideSp peptide_sp
110 * @return a reverse iterator on the peak (found) or the end of the search
111 * (not found)
112 */
113 std::vector<ExperimentalSpectrumDataPoint>::const_reverse_iterator
114 reverseFindDiffMz(std::size_t start_position,
115 const pappso::MzRange &targeted_mass_range) const;
116
117 private:
118 /** @brief add symmetric peaks to the spectrum
119 * Create a SymetricPeakList that contain symmetric peaks and the information
120 * if a peak is the initial peak, the symmetric peak, or both if already
121 * exist.
122 * assuming fragment ion charge is 1
123 */
124 void createSymetricPeakList();
125
126 /** @brief find the correspondin mz in the mass spectrum (given the precision)
127 */
128 std::vector<pappso::DataPoint>::const_iterator findMz(double mz);
129
130 private:
135};
136} // namespace specglob
137} // namespace pappso
Class representing a fully specified mass spectrum.
pappso::QualifiedMassSpectrum m_qualifiedMassSpectrum
#define PMSPP_LIB_DECL
std::shared_ptr< const ExperimentalSpectrum > ExperimentalSpectrumCsp
ExperimentalSpectrumDataPointType
Definition types.h:78
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
SpecGlobTool types definition.