libpappsomspp
Library for mass spectrometry
tracepeaklist.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/processing/detection/tracepeaklist.h
3  * \date 15/09/2021
4  * \author Olivier Langella
5  * \brief trace peak list
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2021 Olivier Langella
10  *<Olivier.Langella@universite-paris-saclay.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 
30 #pragma once
31 
32 #include "tracepeak.h"
34 
35 
36 namespace pappso
37 {
38 /**
39  * @todo write docs
40  */
41 class PMSPP_LIB_DECL TracePeakList : public std::vector<TracePeak>,
43 {
44  public:
45  /**
46  * Default constructor
47  */
48  TracePeakList();
49 
50  /**
51  * Copy constructor
52  *
53  * @param other TODO
54  */
55  TracePeakList(const TracePeakList &other);
56 
57  /**
58  * Destructor
59  */
60  virtual ~TracePeakList();
61 
62  virtual void setTracePeak(TracePeak &xic_peak) override;
63 };
64 
65 
66 /** @brief find the best peak matching a list of retention times
67  *
68  * @param begin begin iterator
69  * @param end end iterator
70  * @param rt_list retention time list in seconds
71  * @param nb_peaks retrieve the number of detected peaks concerned by the
72  * retention times
73  * @return iterator on the best peak (bigger area) concerned by the retention
74  * times
75  *
76  * */
77 PMSPP_LIB_DECL std::vector<TracePeak>::iterator
78 findBestTracePeakGivenRtList(std::vector<TracePeak>::iterator begin,
79  std::vector<TracePeak>::iterator end,
80  const std::vector<double> &rt_list,
81  std::size_t &nb_peaks);
82 
83 
84 /** @brief find the peak matching a retention time
85  *
86  * @param begin begin iterator
87  * @param end end iterator
88  * @param rt retention time in seconds
89  * @return iterator on the peak concerned by the retention time
90  * */
91 PMSPP_LIB_DECL std::vector<TracePeak>::iterator
92 findTracePeakGivenRt(std::vector<TracePeak>::iterator begin,
93  std::vector<TracePeak>::iterator end,
94  double rt);
95 
96 
97 } // namespace pappso
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
PMSPP_LIB_DECL std::vector< TracePeak >::iterator findBestTracePeakGivenRtList(std::vector< TracePeak >::iterator begin, std::vector< TracePeak >::iterator end, const std::vector< double > &rt_list, std::size_t &nb_peaks)
find the best peak matching a list of retention times
PMSPP_LIB_DECL std::vector< TracePeak >::iterator findTracePeakGivenRt(std::vector< TracePeak >::iterator begin, std::vector< TracePeak >::iterator end, double rt)
find the peak matching a retention time