libpappsomspp
Library for mass spectrometry
xic.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3  * *
4  * * This file is part of MassChroqPRM.
5  * *
6  * * MassChroqPRM is free software: you can redistribute it and/or modify
7  * * it under the terms of the GNU General Public License as published by
8  * * the Free Software Foundation, either version 3 of the License, or
9  * * (at your option) any later version.
10  * *
11  * * MassChroqPRM is distributed in the hope that it will be useful,
12  * * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * * GNU General Public License for more details.
15  * *
16  * * You should have received a copy of the GNU General Public License
17  * * along with MassChroqPRM. If not, see <http://www.gnu.org/licenses/>.
18  * *
19  * * Contributors:
20  * * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21  * implementation
22  * ******************************************************************************/
23 
24 #pragma once
25 
26 #include <vector>
27 #include <memory>
28 #include "../trace/trace.h"
29 #include "../mzrange.h"
30 
31 namespace pappso
32 {
33 
34 
35 class XicPeak;
36 
37 class Xic;
38 typedef std::shared_ptr<const Xic> XicCstSPtr;
39 typedef std::shared_ptr<Xic> XicSPtr;
40 
41 class MsRunXic;
42 
43 class PMSPP_LIB_DECL Xic : public Trace
44 {
45  public:
46  Xic();
47  Xic(const Trace & other);
48  virtual ~Xic();
49 
50 
51  XicCstSPtr makeXicCstSPtr() const;
52 
53  XicSPtr makeXicSPtr() const;
54 
55  /** \brief get the number of MS measurement between 2 retention times on this
56  * xic */
57  unsigned int getMsPointDistance(pappso_double rt,
58  pappso_double rt_other) const;
59 
60  void debugPrintValues() const;
61 
62 
63  /** @brief sort peaks by retention time
64  */
65  void sortByRetentionTime();
66 
67  /** @brief get the DataPoint at the given retention time */
68  const DataPoint &atRetentionTime(pappso_double rt) const;
69 };
70 
71 
72 } // namespace pappso
A simple container of DataPoint instances.
Definition: trace.h:148
#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 Xic > XicCstSPtr
Definition: xic.h:37
double pappso_double
A type definition for doubles.
Definition: types.h:49
std::shared_ptr< Xic > XicSPtr
Definition: xic.h:39
@ rt
Retention time.