libpappsomspp
Library for mass spectrometry
msrunxicextractorfactory.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/xicextractor/msrunxicextractorfactory.h
3  * \date 07/05/2018
4  * \author Olivier Langella
5  * \brief factory to build XIC extractor 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  * Contributors:
27  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
28  *implementation
29  ******************************************************************************/
30 
31 #pragma once
32 
34 
35 
36 namespace pappso
37 {
38 /** @brief factory to build different kinds of XIC extractors
39  */
41 {
42  private:
44  QString m_tmpDirName;
45 
47  virtual ~MsRunXicExtractorFactory();
48 
49  public:
50  /** @brief singleton to get the only instance of the factory
51  */
52  static MsRunXicExtractorFactory &getInstance();
53 
54  /** @brief build a simple XIC extractor that directly uses Proeowizard library
55  * to read and extract XICs building the xic extractor is fast, but extracting
56  * each XIC is slow
57  * @param msrun_reader the MsRun reader on which the XIC extractor will run
58  */
60  buildMsRunXicExtractorSp(MsRunReaderSPtr &msrun_reader) const;
61 
62  /** @brief build Xic extractor that first read the whole MsRun, put it on disk
63  * and extract XICs more quickly This needs some space on disk to store slices
64  * (1 dalton each) building the XIC extractor is slow extracting XIC from
65  * slices is a very quick operation
66  * @param msrun_reader the MsRun reader on which the XIC extractor will run
67  */
69  buildMsRunXicExtractorDiskSp(MsRunReaderSPtr &msrun_reader) const;
70 
71  /** @brief build Xic extractor that first read the whole MsRun, put it on disk
72  * using a write cache and extract XICs more quickly This needs some space on
73  * disk to store slices (1 dalton each) building the XIC extractor is slower
74  * than buildMsRunXicExtractorPwizSp, but faster than
75  * buildMsRunXicExtractorDiskSp extracting XIC from slices is a very quick
76  * operation
77  * @param msrun_reader the MsRun reader on which the XIC extractor will run
78  */
80  buildMsRunXicExtractorDiskBufferSp(MsRunReaderSPtr &msrun_reader) const;
81 
82  /// set the temporary working directory
83  void setTmpDir(const QString &dir_name);
84 };
85 
86 } // namespace pappso
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
pappso::MsRunReaderSPtr
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition: msrunreader.h:151
pappso::MsRunXicExtractorFactory::m_tmpDirName
QString m_tmpDirName
Definition: msrunxicextractorfactory.h:44
msrunxicextractorinterface.h
pappso::MsRunXicExtractorFactory::m_instance
static MsRunXicExtractorFactory m_instance
Definition: msrunxicextractorfactory.h:43
pappso::MsRunXicExtractorFactory
factory to build different kinds of XIC extractors
Definition: msrunxicextractorfactory.h:41
pappso::MsRunXicExtractorInterfaceSp
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp
Definition: msrunxicextractorinterface.h:41