pappsomspp
Library for mass spectrometry
xtandemspectrumprocess.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/psm/xtandem/xtandemhyperscore.h
3  * \date 16/8/2016
4  * \author Olivier Langella
5  * \brief process spectrum to compute X!Tandem hyperscore
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2016 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 
33 #include "../../massspectrum/massspectrum.h"
34 #include "../../peptide/peptide.h"
35 #include "../../processing/filters/filterpass.h"
36 #include "../../processing/filters/filterresample.h"
37 #include "../../processing/filters/filtertandemremovec13.h"
38 
39 namespace pappso
40 {
41 class PMSPP_LIB_DECL XtandemSpectrumProcess
42 {
43  private:
44  // MassSpectrum spectrum_simple =
45  // _spectrum.getOriginalSpectrumSp()->applyCutOff(150).takeNmostIntense(100).applyDynamicRange(100);
46  // pappso_double m_minimumMz = 150;
47  FilterResampleKeepGreater m_filter_keep_greater;
48  FilterGreatestY m_n_most_intense;
49  FilterRescaleY m_filter_rescale;
50  FilterTandemRemoveC13 m_filter_remove_c13;
51  FilterFloorY m_filter_floor;
52  FilterHighPass m_filter_highpass;
53  bool m_isRemoveIsotope = true;
54  bool m_isExcludeParent = false;
55  pappso::pappso_double m_isExcludeParent_lower_dalton = 2;
56  pappso::pappso_double m_isExcludeParent_upper_dalton = 2;
57  bool m_isExcludeParent_neutral_loss = false;
58  pappso::pappso_double m_neutralLossMass = MASSH2O;
59  pappso::pappso_double m_neutralLossWindowDalton = 0.5;
60  bool m_isRefineSpectrumModel = true;
61  bool _y_ions = true; // PeptideIon::y
62  bool _ystar_ions = false; // PeptideIon::ystar
63  bool _b_ions = true; // PeptideIon::b
64  bool _bstar_ions = false; // PeptideIon::bstar
65  bool _c_ions = false; // PeptideIon::ystar
66  bool _z_ions = false; // PeptideIon::z
67  bool _a_ions = false; // PeptideIon::a
68  bool _x_ions = false; // CO2
69  bool _astar_ions = false; // PeptideIon::a
70  bool _ao_ions = false; // PeptideIon::ao
71  bool _bo_ions = false; // PeptideIon::bo
72  bool _yo_ions = false; // PeptideIon::yo
73 
74  public:
78 
79  /** \brief process raw spectrum to prepare hyperscore computation
80  */
81  MassSpectrum process(const MassSpectrum &spectrum,
82  pappso_double parent_ion_mass,
83  unsigned int parent_charge) const;
84  void setMinimumMz(pappso_double minimum_mz);
85  void setNmostIntense(unsigned int nmost_intense);
86  void setDynamicRange(pappso::pappso_double dynamic_range);
87  void setRemoveIsotope(bool remove_isotope);
88  void setExcludeParent(bool exclude_parent);
89  void setExcludeParentNeutralLoss(bool neutral_loss);
90  void setNeutralLossMass(pappso::pappso_double neutral_loss_mass);
91  void setNeutralLossWindowDalton(pappso::pappso_double neutral_loss_precision);
92  void setRefineSpectrumModel(bool refine);
93  void setIonScore(PeptideIon ion_type, bool compute_score);
94 
95  pappso_double getMinimumMz() const;
96  unsigned int getNmostIntense() const;
97  pappso::pappso_double getDynamicRange() const;
98  bool getRemoveIsotope() const;
99  bool getExcludeParent() const;
100  bool getExcludeParentNeutralLoss() const;
101  pappso::pappso_double getNeutralLossMass() const;
102  pappso::pappso_double getNeutralLossWindowDalton() const;
103  bool getRefineSpectrumModel() const;
104  bool getIonScore(PeptideIon ion_type) const;
105 };
106 } // namespace pappso
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition: types.h:67
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:12
pappso
Definition: aa.cpp:38
pappso::XtandemSpectrumProcess
Definition: xtandemspectrumprocess.h:60
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition: massspectrum.h:89
pappso::PeptideIon
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
Definition: types.h:352
pappso::MASSH2O
const pappso_double MASSH2O((MPROTIUM *2)+MASSOXYGEN)