libpappsomspp
Library for mass spectrometry
msrunxicextractorinterface.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/xicextractor/msrunxicextractor.h
3  * \date 07/05/2018
4  * \author Olivier Langella
5  * \brief base interface to build XICs on an MsRun file
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.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  ******************************************************************************/
27 
28 #pragma once
29 
30 
31 #include "../msrun/msrunreader.h"
32 #include <memory>
33 #include <vector>
34 #include <limits>
35 #include "../mzrange.h"
36 #include "../xic/xic.h"
37 #include "../processing/uimonitor/uimonitorinterface.h"
38 
39 
40 namespace pappso
41 {
42 
43 class MsRunXicExtractorInterface;
44 typedef std::shared_ptr<MsRunXicExtractorInterface>
46 
48 {
49 
50  public:
51  /** @brief set the XIC extraction method
52  */
53  void setXicExtractMethod(XicExtractMethod method); // sum or max
54 
55  /** @brief set the retention time range in seconds around the target rt
56  *
57  * only the interesting part of the xic will be extracted, form the rt target
58  * - range_in_seconds to rt target + range in seconds by default, all the LC
59  * run time is extracted
60  *
61  * @param range_in_seconds range in seconds
62  */
63  void setRetentionTimeAroundTarget(double range_in_seconds);
64 
65 
66  /** @brief extract a list of XIC given a list of xic coordinates to extract
67  *
68  * XicCoord is a vessel containing the xic to fill and coordinates of this XIC
69  * in the MS run
70  *
71  * @param monitor process monitoring
72  * @param xic_coord_list list of xic coordinates to extract. The order of xic
73  * coordinates may change.
74  */
75  virtual void
77  std::vector<XicCoordSPtr> &xic_coord_list) = 0;
78 
79  const MsRunIdCstSPtr &getMsRunId() const;
80 
81  /** @brief get the msrunreader currently used for XIC extraction
82  */
83  const MsRunReaderSPtr &getMsRunReaderSPtr() const;
84 
85 
86  protected:
87  /** @brief constructor is private, use the MsRunXicExtractorFactory
88  */
91  virtual ~MsRunXicExtractorInterface();
92 
93  protected:
96  double m_retentionTimeAroundTarget = std::numeric_limits<double>::max();
97 };
98 
99 
100 } // namespace pappso
virtual void extractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr > &xic_coord_list)=0
extract a list of XIC given a list of xic coordinates to extract
#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< MsRunReader > MsRunReaderSPtr
Definition: msrunreader.h:166
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition: msrunid.h:44
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp
XicExtractMethod
Definition: types.h:200
@ max
maximum of intensities