libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
peptidespectrummatch.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/psm/peptidespectrummatch.h
3 * \date 2/4/2015
4 * \author Olivier Langella
5 * \brief find peaks matching between ions and spectrum
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
10 *
11 * This file is part of the PAPPSOms++ library.
12 *
13 * PAPPSOms++ 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++ 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++. If not, see <http://www.gnu.org/licenses/>.
25 *
26 * Contributors:
27 * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
28 *implementation
29 ******************************************************************************/
30
31#pragma once
32
34#include "../mzrange.h"
37#include "peakionmatch.h"
38
39namespace pappso
40{
41
42
44{
45 public:
46 PeptideSpectrumMatch(const MassSpectrum &spectrum,
47 const pappso::PeptideSp &peptideSp,
48 unsigned int parent_charge,
49 PrecisionPtr precision,
50 const std::list<PeptideIon> &ion_type_list);
52 const MassSpectrum &spectrum,
53 const PeptideFragmentIonListBase &peptide_fragment_ion_list,
54 unsigned int parent_charge,
55 PrecisionPtr precision,
56 const std::list<PeptideIon> &ion_type_list);
58 const MassSpectrum &spectrum,
59 std::vector<PeptideFragmentIonSp> &v_peptide_fragment_ion,
60 std::vector<unsigned int> &v_peptide_fragment_ion_charge,
61 PrecisionPtr precision);
63
64 virtual ~PeptideSpectrumMatch();
65
66 bool contains(const PeptideFragmentIon *peptideFragmentIonSp,
67 unsigned int z) const;
68
69 typedef std::list<PeakIonMatch>::const_iterator const_iterator;
70
71 unsigned int size() const;
72 const_iterator begin() const;
73 const_iterator end() const;
74
75 unsigned int countTotalMatchedIons() const;
76 const std::array<unsigned int, PEPTIDE_ION_TYPE_COUNT> &
77 getIonTypeCountArray() const;
78
79 private:
80 void privMatchIonList(const MassSpectrum &spectrum,
81 const PeptideFragmentIonListBase &fragmentIonList,
82 unsigned int max_charge,
83 const std::list<PeptideIon> &ion_type_list);
84
85 virtual std::list<DataPoint>::iterator
86 getBestPeakIterator(std::list<DataPoint> &peak_list,
87 const PeptideFragmentIonSp &ion,
88 unsigned int charge) const;
89
90
91 private:
93
94 std::list<PeakIonMatch> _peak_ion_match_list;
95
96 std::array<unsigned int, PEPTIDE_ION_TYPE_COUNT> _ion_type_count = {{0}};
97};
98
99
100} // namespace pappso
Class to represent a mass spectrum.
std::list< PeakIonMatch >::const_iterator const_iterator
std::list< PeakIonMatch > _peak_ion_match_list
#define PMSPP_LIB_DECL
basic mass spectrum
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const PeptideFragmentIon > PeptideFragmentIonSp
std::shared_ptr< const Peptide > PeptideSp
associate a peak and a peptide + charge
peptide ion model
fragmentation base object