OpenMS  2.5.0
SiriusAdapterAlgorithm.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-2020.
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: Oliver Alka $
32 // $Authors: Oliver Alka $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
39 
40 namespace OpenMS
41 {
42  class FeatureMap;
43  class File;
44  class KDTreeFeatureMaps;
45 
46  class OPENMS_DLLAPI SiriusAdapterAlgorithm : public DefaultParamHandler
47  {
48  public:
51 
53  struct OPENMS_DLLAPI SiriusTemporaryFileSystemObjects
54  {
55  public:
56 
58  SiriusTemporaryFileSystemObjects(int debug_level);
59 
62 
63  const String& getTmpDir() const;
64  const String& getTmpOutDir() const;
65  const String& getTmpMsFile() const;
66 
67  private:
69 
73 
74  };
75 
89  static void preprocessingSirius(const String& featureinfo,
90  const MSExperiment& spectra,
91  std::vector<FeatureMap>& v_fp,
92  KDTreeFeatureMaps& fp_map_kd,
93  const SiriusAdapterAlgorithm& sirius_algo,
94  FeatureMapping::FeatureToMs2Indices& feature_mapping);
95 
106  static void checkFeatureSpectraNumber(const String& featureinfo,
107  const FeatureMapping::FeatureToMs2Indices& feature_mapping,
108  const MSExperiment& spectra,
109  const SiriusAdapterAlgorithm& sirius_algo);
110 
111 
124  const static std::vector<String> callSiriusQProcess(const String& tmp_ms_file,
125  const String& tmp_out_dir,
126  String& executable,
127  const String& out_csifingerid,
128  const SiriusAdapterAlgorithm& sirius_algo);
129 
130  // getter (used to call functions from SiriusMSConverter, SiriusMzTabWriter, CsiFingerIDMzTabWriter)
131  String getFeatureOnly();
132  String getNoMasstraceInfoIsotopePattern();
133  int getIsotopePatternIterations();
134  int getCandidates();
135  int getTopNHits();
136 
137  protected:
138 
139  // adapter parameters (preprocessing)
145  // flags
148  // parameters for SIRIUS (sirius)
152  int noise_;
153  int ppm_max_;
159  int cores_;
160  // flags
165 
166  void updateMembers_() override;
167  };
168 } // namespace OpenMS
String auto_charge_
Definition: SiriusAdapterAlgorithm.h:161
Struct for temporary folder structure.
Definition: SiriusAdapterAlgorithm.h:53
String feature_only_
Definition: SiriusAdapterAlgorithm.h:146
int debug_level_
Definition: SiriusAdapterAlgorithm.h:68
String isotope_
Definition: SiriusAdapterAlgorithm.h:154
String tmp_dir_
Definition: SiriusAdapterAlgorithm.h:70
double precursor_mz_tolerance_
Definition: SiriusAdapterAlgorithm.h:141
String most_intense_ms2_
Definition: SiriusAdapterAlgorithm.h:164
Definition: SiriusAdapterAlgorithm.h:46
int isotope_pattern_iterations_
Definition: SiriusAdapterAlgorithm.h:144
String tmp_ms_file_
Definition: SiriusAdapterAlgorithm.h:71
int tree_timeout_
Definition: SiriusAdapterAlgorithm.h:157
String ion_tree_
Definition: SiriusAdapterAlgorithm.h:162
int noise_
Definition: SiriusAdapterAlgorithm.h:152
String no_masstrace_info_isotope_pattern_
Definition: SiriusAdapterAlgorithm.h:147
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
Stores a set of features, together with a 2D tree for fast search.
Definition: KDTreeFeatureMaps.h:49
String database_
Definition: SiriusAdapterAlgorithm.h:151
Definition: FeatureMapping.h:48
int top_n_hits_
Definition: SiriusAdapterAlgorithm.h:158
int compound_timeout_
Definition: SiriusAdapterAlgorithm.h:156
String no_recalibration_
Definition: SiriusAdapterAlgorithm.h:163
int candidates_
Definition: SiriusAdapterAlgorithm.h:150
int ppm_max_
Definition: SiriusAdapterAlgorithm.h:153
unsigned int filter_by_num_masstraces_
Definition: SiriusAdapterAlgorithm.h:140
String precursor_mz_tolerance_unit_
Definition: SiriusAdapterAlgorithm.h:142
double precursor_rt_tolerance_
Definition: SiriusAdapterAlgorithm.h:143
A more convenient string class.
Definition: String.h:58
String profile_
Definition: SiriusAdapterAlgorithm.h:149
String elements_
Definition: SiriusAdapterAlgorithm.h:155
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
String tmp_out_dir_
Definition: SiriusAdapterAlgorithm.h:72
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
int cores_
Definition: SiriusAdapterAlgorithm.h:159