libpappsomspp
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
39namespace pappso
40{
42{
43 public:
47
48 /** \brief process raw spectrum to prepare hyperscore computation
49 */
50 MassSpectrum process(const MassSpectrum &spectrum,
51 pappso_double parent_ion_mass,
52 unsigned int parent_charge) const;
53 void setMinimumMz(pappso_double minimum_mz);
54 void setNmostIntense(unsigned int nmost_intense);
55 void setDynamicRange(pappso::pappso_double dynamic_range);
56 void setRemoveIsotope(bool remove_isotope);
57 void setExcludeParent(bool exclude_parent);
58 void setExcludeParentNeutralLoss(bool neutral_loss);
59 void setNeutralLossMass(pappso::pappso_double neutral_loss_mass);
60 void setNeutralLossWindowDalton(pappso::pappso_double neutral_loss_precision);
61 void setRefineSpectrumModel(bool refine);
62 void setIonScore(PeptideIon ion_type, bool compute_score);
63
64 pappso_double getMinimumMz() const;
65 unsigned int getNmostIntense() const;
66 pappso::pappso_double getDynamicRange() const;
67 bool getRemoveIsotope() const;
68 bool getExcludeParent() const;
69 bool getExcludeParentNeutralLoss() const;
70 pappso::pappso_double getNeutralLossMass() const;
71 pappso::pappso_double getNeutralLossWindowDalton() const;
72 bool getRefineSpectrumModel() const;
73 bool getIonScore(PeptideIon ion_type) const;
74
75
76 private:
77 // MassSpectrum spectrum_simple =
78 // _spectrum.getOriginalSpectrumSp()->applyCutOff(150).takeNmostIntense(100).applyDynamicRange(100);
79 // pappso_double m_minimumMz = 150;
83 FilterTandemDeisotope m_filter_remove_c13 = FilterTandemDeisotope(1.5, 200);
86 bool m_isRemoveIsotope = true;
87 bool m_isExcludeParent = false;
88 pappso::pappso_double m_isExcludeParent_lower_dalton = 2;
89 pappso::pappso_double m_isExcludeParent_upper_dalton = 2;
90 bool m_isExcludeParent_neutral_loss = false;
91 pappso::pappso_double m_neutralLossMass = MASSH2O;
92 pappso::pappso_double m_neutralLossWindowDalton = 0.5;
93 bool m_isRefineSpectrumModel = true;
94 bool _y_ions = true; // PeptideIon::y
95 bool _ystar_ions = false; // PeptideIon::ystar
96 bool _b_ions = true; // PeptideIon::b
97 bool _bstar_ions = false; // PeptideIon::bstar
98 bool _c_ions = false; // PeptideIon::ystar
99 bool _z_ions = false; // PeptideIon::z
100 bool _a_ions = false; // PeptideIon::a
101 bool _x_ions = false; // CO2
102 bool _astar_ions = false; // PeptideIon::a
103 bool _ao_ions = false; // PeptideIon::ao
104 bool _bo_ions = false; // PeptideIon::bo
105 bool _yo_ions = false; // PeptideIon::yo
106};
107} // namespace pappso
apply std::floor (round to lowest integer) to all Y values
Definition: filterpass.h:166
keep N datapoints form the greatest intensities to the lowest
Definition: filterpass.h:96
remove datapoints below a given Y value (intensity)
Definition: filterpass.h:58
rescales Y values into a dynamic range if the dynamic range is set to 0, this filter is ignored
Definition: filterpass.h:196
Deisotope the mass spectrum this mass spectrum is iterated over and according to a data point-based m...
Class to represent a mass spectrum.
Definition: massspectrum.h:71
FilterResampleKeepGreater m_filter_keep_greater
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
Definition: types.h:386
double pappso_double
A type definition for doubles.
Definition: types.h:49
const pappso_double MASSH2O((MPROTIUM *2)+MASSOXYGEN)