pappsomspp
Library for mass spectrometry
filtertandemremovec13.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/filers/filtertandemremovec13.h
3  * \date 26/04/2019
4  * \author Olivier Langella
5  * \brief new implementation of the X!Tandem filter to remove isotopes in an MS2
6  * signal
7  */
8 
9 /*******************************************************************************
10  * Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
11  *
12  * This file is part of the PAPPSOms++ library.
13  *
14  * PAPPSOms++ is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation, either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * PAPPSOms++ is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
26  *
27  ******************************************************************************/
28 
29 #pragma once
30 
31 #include "filterinterface.h"
32 #include <cstddef>
33 
34 namespace pappso
35 {
36 
37 
38 /** \brief clean probable C13 isotopes as in X!Tandem algorithm
39  * */
40 class PMSPP_LIB_DECL FilterTandemRemoveC13 : public MassSpectrumFilterInterface
41 {
42  private:
43  double m_arbitrary_range_between_isotopes = 1.5;
44  double m_arbitrary_minimum_mz = 200.0;
45 
46  public:
47  FilterTandemRemoveC13();
48  FilterTandemRemoveC13(const FilterTandemRemoveC13 &other);
49  MassSpectrum &filter(MassSpectrum &data_points) const override;
50 };
51 
52 
53 /** @brief Deisotope the mass spectrum
54  * \c this mass spectrum is iterated over and according to a data point-based
55  * moving window progression does the following tests:
56  *
57  * - any data point having a x value (m/z value) less than 200 is conserved;
58  *
59  * - any data point having a x value greater than the previous data point's x
60  * value by at least 0.95 is conserved;
61  *
62  *
63 remove isotopes as in X!Tandem algorithm this method doesn't
64  * really remove isotopes: it cleans up multiple intensities within one
65  * Dalton of each other.
66  * */
67 
69 {
70  private:
71  double m_arbitrary_range_between_isotopes = 0.95;
72  double m_arbitrary_minimum_mz = 200.0;
73 
74  public:
77  MassSpectrum &filter(MassSpectrum &data_points) const override;
78 };
79 } // namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:12
pappso
Definition: aa.cpp:38
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition: massspectrum.h:89
filterinterface.h
pappso::MassSpectrumFilterInterface
generic interface to apply a filter on a MassSpectrum This is the same as FilterInterface,...
Definition: filterinterface.h:70
pappso::FilterTandemDeisotope
Deisotope the mass spectrum this mass spectrum is iterated over and according to a data point-based m...
Definition: filtertandemremovec13.h:84