OpenMS  2.4.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-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: Oliver Alka $
32 // $Authors: Oliver Alka $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
42 
43 #include <OpenMS/SYSTEM/File.h>
45 
46 #include <QString>
47 
48 namespace OpenMS
49 {
50  class OPENMS_DLLAPI SiriusAdapterAlgorithm : public DefaultParamHandler
51  {
52  public:
55 
58  {
62  };
63 
69  static SiriusAdapterAlgorithm::SiriusTmpStruct constructSiriusTmpStruct();
70 
78  static std::pair<String, String> checkSiriusExecutablePath(String& executable);
79 
80 
94  static void preprocessingSirius(const String& featureinfo,
95  MSExperiment& spectra,
96  std::vector<FeatureMap>& v_fp,
97  KDTreeFeatureMaps& fp_map_kd,
98  const SiriusAdapterAlgorithm& sirius_algo,
99  FeatureMapping::FeatureToMs2Indices& feature_mapping);
100 
111  static void checkFeatureSpectraNumber(const String& featureinfo,
112  const FeatureMapping::FeatureToMs2Indices& feature_mapping,
113  const MSExperiment& spectra,
114  const SiriusAdapterAlgorithm& sirius_algo);
115 
116 
129  static std::vector<String> callSiriusQProcess(const String& tmp_ms_file,
130  const String& tmp_out_dir,
131  String& executable,
132  const String& out_csifingerid,
133  const SiriusAdapterAlgorithm& sirius_algo);
134 
135  // getter (used to call functions from SiriusMSConverter, SiriusMzTabWriter, CsiFingerIDMzTabWriter)
136  String getFeatureOnly();
137  String getNoMasstraceInfoIsotopePattern();
138  String getConverterMode();
139  int getIsotopePatternIterations();
140  int getCandidates();
141  int getTopNHits();
142 
143  protected:
144 
145  // adapter parameters (preprocessing)
151  // flags
155  // parameters for SIRIUS (sirius)
159  int noise_;
160  int ppm_max_;
166  int cores_;
167  // flags
172 
173  void updateMembers_() override;
174  };
175 } // namespace OpenMS
String most_intense_ms2_
Definition: SiriusAdapterAlgorithm.h:171
int top_n_hits_
Definition: SiriusAdapterAlgorithm.h:165
String elements_
Definition: SiriusAdapterAlgorithm.h:162
String precursor_mz_tolerance_unit_
Definition: SiriusAdapterAlgorithm.h:148
A more convenient string class.
Definition: String.h:58
String tmp_dir
Definition: SiriusAdapterAlgorithm.h:59
int isotope_pattern_iterations_
Definition: SiriusAdapterAlgorithm.h:150
String auto_charge_
Definition: SiriusAdapterAlgorithm.h:168
String database_
Definition: SiriusAdapterAlgorithm.h:158
int tree_timeout_
Definition: SiriusAdapterAlgorithm.h:164
int compound_timeout_
Definition: SiriusAdapterAlgorithm.h:163
Stores a set of features, together with a 2D tree for fast search.
Definition: KDTreeFeatureMaps.h:49
Definition: SiriusAdapterAlgorithm.h:50
double precursor_mz_tolerance_
Definition: SiriusAdapterAlgorithm.h:147
int candidates_
Definition: SiriusAdapterAlgorithm.h:157
String feature_only_
Definition: SiriusAdapterAlgorithm.h:152
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
String no_recalibration_
Definition: SiriusAdapterAlgorithm.h:170
String ion_tree_
Definition: SiriusAdapterAlgorithm.h:169
String tmp_ms_file
Definition: SiriusAdapterAlgorithm.h:60
String tmp_out_dir
Definition: SiriusAdapterAlgorithm.h:61
String profile_
Definition: SiriusAdapterAlgorithm.h:156
String isotope_
Definition: SiriusAdapterAlgorithm.h:161
int noise_
Definition: SiriusAdapterAlgorithm.h:159
Struct for temporary folder structure.
Definition: SiriusAdapterAlgorithm.h:57
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
Definition: FeatureMapping.h:48
unsigned int filter_by_num_masstraces_
Definition: SiriusAdapterAlgorithm.h:146
int ppm_max_
Definition: SiriusAdapterAlgorithm.h:160
String no_masstrace_info_isotope_pattern_
Definition: SiriusAdapterAlgorithm.h:153
double precursor_rt_tolerance_
Definition: SiriusAdapterAlgorithm.h:149
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
int cores_
Definition: SiriusAdapterAlgorithm.h:166
String converter_mode_
Definition: SiriusAdapterAlgorithm.h:154