OpenMS
FIAMSScheduler.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, 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 subdirectory (relative to the `base_dir`) with the mzML file
23  - *dir_output* - the location of the subdirectory (relative to the `output_dir`) 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 in `base_dir` containing three tab-separated columns of mass, formula, identifier for the accurate mass search
27  - *db:struct* - database input file in `base_dir` containing four tab-separated columns of identifier, name, SMILES, INCHI for the accurate mass search
28  - *positive_adducts* - file in `base_dir` containing the list of potential positive adducts for the accurate mass search
29  - *negative_adducts* - file in `base_dir` 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  String output_dir = "/",
42  bool load_cached_ = true
43  );
44 
46  ~FIAMSScheduler() = default;
47 
49  FIAMSScheduler(const FIAMSScheduler& cp) = default;
50 
52  FIAMSScheduler& operator=(const FIAMSScheduler& fdp) = default;
53 
57  void run();
58 
62  const std::vector<std::map<String, String>>& getSamples();
63 
67  const String& getBaseDir();
68 
72  const String& getOutputDir();
73 
74 private:
78  void loadSamples_();
79 
84  std::vector<std::map<String, String>> samples_;
85  };
86 } // 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.
const String & getOutputDir()
Get the output directory for the results.
std::vector< std::map< String, String > > samples_
Definition: FIAMSScheduler.h:84
String filename_
Definition: FIAMSScheduler.h:80
FIAMSScheduler(String filename, String base_dir="/", String output_dir="/", bool load_cached_=true)
Default constructor.
~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:83
String output_dir_
Definition: FIAMSScheduler.h:82
const std::vector< std::map< String, String > > & getSamples()
Get the batch.
FIAMSScheduler & operator=(const FIAMSScheduler &fdp)=default
Assignment.
String base_dir_
Definition: FIAMSScheduler.h:81
FIAMSScheduler(const FIAMSScheduler &cp)=default
Copy constructor.
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19