OpenMS
FIAMSScheduler.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Svetlana Kutuzova, Douglas McCloskey $
6 // $Authors: Svetlana Kutuzova, Douglas McCloskey $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/FORMAT/CsvFile.h>
12 #include <map>
13 
14 namespace OpenMS
15 {
16 class MzMLFile;
17 /*
18  @brief Scheduler for FIA-MS data batches. Works with FIAMSDataProcessor.
19 
20  The class is initialised with the path to the csv file that must contain the following columns:
21  - *filename* - the mzML filename for the sample. Must not contains the extension and path. The results filenames follow the pattern @filename_@n_seconds.
22  - *dir_input* - the location of the directory with the mzML file
23  - *dir_output* - the location of the directory where the results will be stored
24  - *resolution* - the resolution of the instrument
25  - *polarity* - the charge of the instrument, accepts "positive" or "negative"
26  - *db:mapping* - database input file containing three tab-separated columns of mass, formula, identifier for the accurate mass search
27  - *db:struct* - database input file containing four tab-separated columns of identifier, name, SMILES, INCHI for the accurate mass search
28  - *positive_adducts* - file containing the list of potential positive adducts for the accurate mass search
29  - *negative_adducts* - file containing the list of potential negative adducts for the accurate mass search
30  - *time* - ";"-separated numbers of seconds to process, f.e. "30;60;90;180"
31 */
32 class OPENMS_DLLAPI FIAMSScheduler
33  {
34 public:
35  FIAMSScheduler() = default;
36 
39  String filename,
40  String base_dir = "/",
41  bool load_cached_ = true
42  );
43 
45  ~FIAMSScheduler() = default;
46 
48  FIAMSScheduler(const FIAMSScheduler& cp) = default;
49 
51  FIAMSScheduler& operator=(const FIAMSScheduler& fdp) = default;
52 
56  void run();
57 
61  const std::vector<std::map<String, String>>& getSamples();
62 
66  const String& getBaseDir();
67 
68 private:
72  void loadSamples_();
73 
77  std::vector<std::map<String, String>> samples_;
78  };
79 } // namespace OpenMS
Definition: FIAMSScheduler.h:33
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:77
String filename_
Definition: FIAMSScheduler.h:74
~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:76
const std::vector< std::map< String, String > > & getSamples()
Get the batch.
FIAMSScheduler & operator=(const FIAMSScheduler &fdp)=default
Assignment.
String base_dir_
Definition: FIAMSScheduler.h:75
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:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22