libpappsomspp
Library for mass spectrometry
peptideisotopespectrummatch.h
Go to the documentation of this file.
1 /*
2  * *******************************************************************************
3  * * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4  * *
5  * * This file is part of MassChroqPRM.
6  * *
7  * * MassChroqPRM is free software: you can redistribute it and/or modify
8  * * it under the terms of the GNU General Public License as published by
9  * * the Free Software Foundation, either version 3 of the License, or
10  * * (at your option) any later version.
11  * *
12  * * MassChroqPRM is distributed in the hope that it will be useful,
13  * * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * * GNU General Public License for more details.
16  * *
17  * * You should have received a copy of the GNU General Public License
18  * * along with MassChroqPRM. If not, see <http://www.gnu.org/licenses/>.
19  * *
20  * * Contributors:
21  * * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
22  * implementation
23  * ******************************************************************************/
24 
25 
26 #pragma once
27 
28 
29 #include "../massspectrum/massspectrum.h"
30 #include "../mzrange.h"
31 #include "../peptide/peptidefragmention.h"
32 #include "../peptide/peptidefragmentionlistbase.h"
33 #include "peakionisotopematch.h"
34 #include "../exportinmportconfig.h"
35 
36 namespace pappso
37 {
38 
40 {
41  public:
42  /** @brief annotate spectrum with peptide ions and isotopes
43  * @param spectrum the spectrum to annotate
44  * @param peptide_sp peptide to fragment
45  * @param parent_charge charge of the ion parent
46  * @param precision MS2 mass measurement precision
47  * @param ion_list ion types to compute fragments
48  * @param max_isotope_number maximum isotope number to compute (0 means only
49  * monoisotope is computed)
50  * @param max_isotope_rank maximum rank inside isotope level to compute
51  */
53  const PeptideSp &peptide_sp,
54  unsigned int parent_charge,
55  PrecisionPtr precision,
56  const std::list<PeptideIon> &ion_type_list,
57  unsigned int max_isotope_number,
58  unsigned int max_isotope_rank);
60  const MassSpectrum &spectrum,
61  std::vector<PeptideNaturalIsotopeAverageSp> v_peptideIsotopeList,
62  std::vector<PeptideFragmentIonSp> v_peptideIonList,
63  PrecisionPtr precision);
65 
66  virtual ~PeptideIsotopeSpectrumMatch();
67 
68  const std::list<PeakIonIsotopeMatch> &getPeakIonIsotopeMatchList() const;
69 
70 
71  typedef std::list<PeakIonIsotopeMatch>::const_iterator const_iterator;
72 
73  std::size_t size() const;
74  const_iterator begin() const;
75  const_iterator end() const;
76 
77  void dropPeaksLackingMonoisotope();
78 
79  private:
80  virtual std::vector<DataPoint>::iterator
81  getBestPeakIterator(std::vector<DataPoint> &peak_list,
82  const PeptideNaturalIsotopeAverage &ion) const;
83 
85  std::list<PeakIonIsotopeMatch> _peak_ion_match_list;
86 };
87 
88 
89 } // namespace pappso
Class to represent a mass spectrum.
Definition: massspectrum.h:71
std::list< PeakIonIsotopeMatch >::const_iterator const_iterator
std::list< PeakIonIsotopeMatch > _peak_ion_match_list
PeptideIsotopeSpectrumMatch(const MassSpectrum &spectrum, const PeptideSp &peptide_sp, unsigned int parent_charge, PrecisionPtr precision, const std::list< PeptideIon > &ion_type_list, unsigned int max_isotope_number, unsigned int max_isotope_rank)
annotate spectrum with peptide ions and isotopes
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< const Peptide > PeptideSp