libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
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
32#include <memory>
33#include <vector>
34#include <limits>
36
37
38namespace pappso
39{
40
42typedef std::shared_ptr<MsRunXicExtractorInterface> MsRunXicExtractorInterfaceSp;
43
45{
46
47 public:
48 /** @brief set the XIC extraction method
49 */
50 void setXicExtractMethod(Enums::XicExtractMethod method); // sum or max
51
52 /** @brief set the retention time range in seconds around the target rt
53 *
54 * only the interesting part of the xic will be extracted, form the rt target
55 * - range_in_seconds to rt target + range in seconds by default, all the LC
56 * run time is extracted
57 *
58 * @param range_in_seconds range in seconds
59 */
60 void setRetentionTimeAroundTarget(double range_in_seconds);
61
62
63 /** @brief extract a list of XIC given a list of xic coordinates to extract
64 *
65 * XicCoord is a vessel containing the xic to fill and coordinates of this XIC
66 * in the MS run
67 *
68 * @param monitor process monitoring
69 * @param xic_coord_list list of xic coordinates to extract. The order of xic
70 * coordinates may change.
71 */
72 virtual void extractXicCoordSPtrList(UiMonitorInterface &monitor,
73 std::vector<XicCoordSPtr> &xic_coord_list) final;
74
75
76 /** @brief multithreaded XIC extraction
77 *
78 * divide xic_coord_list and run extractXicCoordSPtrList separated threads
79 *
80 * @param monitor process monitoring
81 * @param xic_coord_list list of xic coordinates to extract. The order of xic
82 * coordinates may change.
83 */
85 std::vector<XicCoordSPtr> &xic_coord_list) final;
86
87 const MsRunIdCstSPtr &getMsRunId() const;
88
89 /** @brief get the msrunreader currently used for XIC extraction
90 */
92
93 /** @brief filter interface to apply just after XIC extration on each trace
94 */
96
97
98 protected:
99 /** @brief constructor is private, use the MsRunXicExtractorFactory
100 */
104
105 /** @brief possible post extraction process, eventually trace filters
106 */
107 virtual void postExtractionProcess(UiMonitorInterface &monitor,
108 std::vector<XicCoordSPtr>::iterator it_xic_coord_list_begin,
109 std::vector<XicCoordSPtr>::iterator it_xic_coord_list_end);
110
111 virtual void
113 std::vector<XicCoordSPtr>::iterator it_xic_coord_list_begin,
114 std::vector<XicCoordSPtr>::iterator it_xic_coord_list_end) = 0;
115
116
117 protected:
120 double m_retentionTimeAroundTarget = std::numeric_limits<double>::max();
122};
123
124
125} // namespace pappso
virtual void extractXicCoordSPtrListParallelized(UiMonitorInterface &monitor, std::vector< XicCoordSPtr > &xic_coord_list) final
multithreaded XIC extraction
virtual void postExtractionProcess(UiMonitorInterface &monitor, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_begin, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_end)
possible post extraction process, eventually trace filters
void setPostExtractionTraceFilterCstSPtr(pappso::FilterInterfaceCstSPtr &filter)
filter interface to apply just after XIC extration on each trace
virtual void protectedExtractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_begin, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_end)=0
virtual void extractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr > &xic_coord_list) final
extract a list of XIC given a list of xic coordinates to extract
const MsRunReaderSPtr & getMsRunReaderSPtr() const
get the msrunreader currently used for XIC extraction
void setXicExtractMethod(Enums::XicExtractMethod method)
set the XIC extraction method
void setRetentionTimeAroundTarget(double range_in_seconds)
set the retention time range in seconds around the target rt
pappso::FilterInterfaceCstSPtr mcsp_postExtractionTraceFilter
MsRunXicExtractorInterface(MsRunReaderSPtr &msrun_reader)
constructor is private, use the MsRunXicExtractorFactory
#define PMSPP_LIB_DECL
@ max
maximum of intensities
Definition types.h:280
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:57
@ filter
concerning filters (psm, peptide, protein validation)
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp