OpenMS  2.7.0
FIAMSScheduler.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2018.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Svetlana Kutuzova, Douglas McCloskey $
32 // $Authors: Svetlana Kutuzova, Douglas McCloskey $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/FORMAT/CsvFile.h>
38 #include <map>
39 
40 namespace OpenMS
41 {
42 class MzMLFile;
43 /*
44  @brief Scheduler for FIA-MS data batches. Works with FIAMSDataProcessor.
45 
46  The class is initialised with the path to the csv file that must contain the following columns:
47  - *filename* - the mzML filename for the sample. Must not contains the extension and path. The results filenames follow the pattern @filename_@n_seconds.
48  - *dir_input* - the location of the directory with the mzML file
49  - *dir_output* - the location of the directory where the results will be stored
50  - *resolution* - the resolution of the instrument
51  - *polarity* - the charge of the instrument, accepts "positive" or "negative"
52  - *db:mapping* - database input file containing three tab-separated columns of mass, formula, identifier for the accurate mass search
53  - *db:struct* - database input file containing four tab-separated columns of identifier, name, SMILES, INCHI for the accurate mass search
54  - *positive_adducts* - file containing the list of potential positive adducts for the accurate mass search
55  - *negative_adducts* - file containing the list of potential negative adducts for the accurate mass search
56  - *time* - ";"-separated numbers of seconds to process, f.e. "30;60;90;180"
57 */
58 class OPENMS_DLLAPI FIAMSScheduler
59  {
60 public:
61  FIAMSScheduler() = default;
62 
65  String filename,
66  String base_dir = "/",
67  bool load_cached_ = true
68  );
69 
71  ~FIAMSScheduler() = default;
72 
74  FIAMSScheduler(const FIAMSScheduler& cp) = default;
75 
77  FIAMSScheduler& operator=(const FIAMSScheduler& fdp) = default;
78 
82  void run();
83 
87  const std::vector<std::map<String, String>>& getSamples();
88 
92  const String& getBaseDir();
93 
94 private:
98  void loadSamples_();
99 
103  std::vector<std::map<String, String>> samples_;
104  };
105 } // namespace OpenMS
Definition: FIAMSScheduler.h:59
void run()
Run the FIA-MS data analysis for the batch defined in the @filename_.
void loadSamples_()
Load the batch from the csv file and store as the vector of maps.
std::vector< std::map< String, String > > samples_
Definition: FIAMSScheduler.h:103
String filename_
Definition: FIAMSScheduler.h:100
~FIAMSScheduler()=default
Default destructor.
const String & getBaseDir()
Get the base directory for the relevant paths from the csv file.
bool load_cached_
Definition: FIAMSScheduler.h:102
const std::vector< std::map< String, String > > & getSamples()
Get the batch.
FIAMSScheduler & operator=(const FIAMSScheduler &fdp)=default
Assignment.
String base_dir_
Definition: FIAMSScheduler.h:101
FIAMSScheduler(const FIAMSScheduler &cp)=default
Copy constructor.
FIAMSScheduler(String filename, String base_dir="/", bool load_cached_=true)
Default constructor.
A more convenient string class.
Definition: String.h:61
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47