Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
OpenSwathOSWWriter.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-2017.
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: George Rosenberger $
32 // $Authors: George Rosenberger $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_OPENSWATHOSWWRITER_H
36 #define OPENMS_ANALYSIS_OPENSWATH_OPENSWATHOSWWRITER_H
37 
38 // Interfaces
40 
42 
43 #include <sqlite3.h>
44 
45 #include <fstream>
46 
47 namespace OpenMS
48 {
49 
57  class OPENMS_DLLAPI OpenSwathOSWWriter
58  {
61  bool doWrite_;
63  bool sonar_;
65 
66  public:
67 
68  OpenSwathOSWWriter(String output_filename, String input_filename = "inputfile", bool ms1_scores = false, bool sonar = false, bool uis_scores = false) :
69  output_filename_(output_filename),
70  input_filename_(input_filename),
71  doWrite_(!output_filename.empty()),
72  use_ms1_traces_(ms1_scores),
73  sonar_(sonar),
74  enable_uis_scoring_(uis_scores)
75  {}
76 
77  static int callback(void * /* NotUsed */, int argc, char **argv, char **azColName){
78  int i;
79  for(i=0; i<argc; i++)
80  {
81  printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
82  }
83  printf("\n");
84  return(0);
85  }
86 
87  bool isActive()
88  {
89  return doWrite_;
90  }
91 
96  void writeHeader()
97  {
98  sqlite3 *db;
99  char *zErrMsg = 0;
100  int rc;
101 
102  // Open database
103  rc = sqlite3_open(output_filename_.c_str(), &db);
104  if( rc )
105  {
106  fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
107  }
108 
109  // Create SQL structure
110  const char * create_sql =
111  "CREATE TABLE FEATURE(" \
112  "ID INT PRIMARY KEY NOT NULL," \
113  "PRECURSOR_ID INT NOT NULL," \
114  "RT REAL NOT NULL," \
115  "DELTA_RT REAL NOT NULL," \
116  "LEFT_WIDTH REAL NOT NULL," \
117  "RIGHT_WIDTH REAL NOT NULL); " \
118 
119  "CREATE TABLE FEATURE_MS1(" \
120  "FEATURE_ID INT NOT NULL," \
121  "AREA_INTENSITY REAL NOT NULL," \
122  "APEX_INTENSITY REAL NOT NULL," \
123  "VAR_MASSDEV_SCORE REAL NOT NULL," \
124  "VAR_ISOTOPE_CORRELATION_SCORE REAL NOT NULL," \
125  "VAR_ISOTOPE_OVERLAP_SCORE REAL NOT NULL," \
126  "VAR_XCORR_COELUTION REAL NOT NULL," \
127  "VAR_XCORR_SHAPE REAL NOT NULL); " \
128 
129  "CREATE TABLE FEATURE_MS2(" \
130  "FEATURE_ID INT NOT NULL," \
131  "AREA_INTENSITY REAL NOT NULL," \
132  "APEX_INTENSITY REAL NOT NULL," \
133  "VAR_BSERIES_SCORE REAL NOT NULL," \
134  "VAR_DOTPROD_SCORE REAL NOT NULL," \
135  "VAR_INTENSITY_SCORE REAL NOT NULL," \
136  "VAR_ISOTOPE_CORRELATION_SCORE REAL NOT NULL," \
137  "VAR_ISOTOPE_OVERLAP_SCORE REAL NOT NULL," \
138  "VAR_LIBRARY_CORR REAL NOT NULL," \
139  "VAR_LIBRARY_DOTPROD REAL NOT NULL," \
140  "VAR_LIBRARY_MANHATTAN REAL NOT NULL," \
141  "VAR_LIBRARY_RMSD REAL NOT NULL," \
142  "VAR_LIBRARY_ROOTMEANSQUARE REAL NOT NULL," \
143  "VAR_LIBRARY_SANGLE REAL NOT NULL," \
144  "VAR_LOG_SN_SCORE REAL NOT NULL," \
145  "VAR_MANHATTAN_SCORE REAL NOT NULL," \
146  "VAR_MASSDEV_SCORE REAL NOT NULL," \
147  "VAR_MASSDEV_SCORE_WEIGHTED REAL NOT NULL," \
148  "VAR_NORM_RT_SCORE REAL NOT NULL," \
149  "VAR_XCORR_COELUTION REAL NOT NULL," \
150  "VAR_XCORR_COELUTION_WEIGHTED REAL NOT NULL," \
151  "VAR_XCORR_SHAPE REAL NOT NULL," \
152  "VAR_XCORR_SHAPE_WEIGHTED REAL NOT NULL," \
153  "VAR_YSERIES_SCORE REAL NOT NULL," \
154  "VAR_ELUTION_MODEL_FIT_SCORE REAL NULL," \
155  "VAR_SONAR_LAG REAL NULL," \
156  "VAR_SONAR_SHAPE REAL NULL," \
157  "VAR_SONAR_LOG_SN REAL NULL," \
158  "VAR_SONAR_LOG_DIFF REAL NULL," \
159  "VAR_SONAR_LOG_TREND REAL NULL," \
160  "VAR_SONAR_RSQ REAL NULL); " \
161 
162  "CREATE TABLE FEATURE_TRANSITION(" \
163  "FEATURE_ID INT NOT NULL," \
164  "TRANSITION_ID INT NOT NULL," \
165  "AREA_INTENSITY REAL NOT NULL," \
166  "APEX_INTENSITY REAL NOT NULL," \
167  "VAR_LOG_INTENSITY REAL NULL," \
168  "VAR_XCORR_COELUTION REAL NULL," \
169  "VAR_XCORR_SHAPE REAL NULL," \
170  "VAR_LOG_SN_SCORE REAL NULL," \
171  "VAR_MASSDEV_SCORE REAL NULL," \
172  "VAR_ISOTOPE_CORRELATION_SCORE REAL NULL," \
173  "VAR_ISOTOPE_OVERLAP_SCORE REAL NULL); " ;
174 
175 
176  // Execute SQL create statement
177  rc = sqlite3_exec(db, create_sql, callback, 0, &zErrMsg);
178  if( rc != SQLITE_OK )
179  {
180  throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
181  zErrMsg);
182  sqlite3_free(zErrMsg);
183  }
184  sqlite3_close(db);
185  }
186 
202  const OpenSwath::LightTransition* /* transition */,
203  FeatureMap& output, String id)
204  {
205  std::stringstream sql, sql_feature, sql_feature_ms1, sql_feature_ms2, sql_feature_ms2_transition, sql_feature_uis_transition;
206 
207  for (FeatureMap::iterator feature_it = output.begin(); feature_it != output.end(); ++feature_it)
208  {
209  for (std::vector<Feature>::iterator sub_it = feature_it->getSubordinates().begin(); sub_it != feature_it->getSubordinates().end(); ++sub_it)
210  {
211  if (sub_it->metaValueExists("FeatureLevel") && sub_it->getMetaValue("FeatureLevel") == "MS2")
212  {
213  sql_feature_ms2_transition << "INSERT INTO FEATURE_TRANSITION (FEATURE_ID, TRANSITION_ID, AREA_INTENSITY, APEX_INTENSITY) VALUES ("
214  << feature_it->getUniqueId() << ", "
215  << (String)sub_it->getMetaValue("native_id") << ", "
216  << sub_it->getIntensity() << ", "
217  << sub_it->getMetaValue("peak_apex_int") << "); ";
218  }
219  else if (sub_it->metaValueExists("FeatureLevel") && sub_it->getMetaValue("FeatureLevel") == "MS1")
220  {
221  sql_feature_ms1 << "INSERT INTO FEATURE_MS1 (FEATURE_ID, AREA_INTENSITY, APEX_INTENSITY, VAR_MASSDEV_SCORE, VAR_ISOTOPE_CORRELATION_SCORE, VAR_ISOTOPE_OVERLAP_SCORE, VAR_XCORR_COELUTION, VAR_XCORR_SHAPE) VALUES ("
222  << feature_it->getUniqueId() << ", "
223  << sub_it->getIntensity() << ", "
224  << sub_it->getMetaValue("peak_apex_int") << ", "
225  << feature_it->getMetaValue("var_ms1_ppm_diff") << ", "
226  << feature_it->getMetaValue("var_ms1_isotope_correlation") << ", "
227  << feature_it->getMetaValue("var_ms1_isotope_overlap") << ", "
228  << feature_it->getMetaValue("var_ms1_xcorr_coelution") << ", "
229  << feature_it->getMetaValue("var_ms1_xcorr_shape") << "); ";
230  }
231  }
232 
233  sql_feature << "INSERT INTO FEATURE (ID, PRECURSOR_ID, RT, DELTA_RT, LEFT_WIDTH, RIGHT_WIDTH) VALUES ("
234  << feature_it->getUniqueId() << ", "
235  << id << ", "
236  << feature_it->getMetaValue("norm_RT") << ", "
237  << feature_it->getMetaValue("delta_rt") << ", "
238  << feature_it->getMetaValue("leftWidth") << ", "
239  << feature_it->getMetaValue("rightWidth") << "); ";
240 
241  std::string var_elution_model_fit_score = "NULL", var_sonar_lag = "NULL", var_sonar_shape = "NULL", var_sonar_log_sn = "NULL", var_sonar_log_diff = "NULL", var_sonar_log_trend = "NULL", var_sonar_rsq = "NULL";
242 
243  if (!feature_it->getMetaValue("var_elution_model_fit_score").isEmpty())
244  {
245  var_elution_model_fit_score = feature_it->getMetaValue("var_elution_model_fit_score").toString();
246  }
247  if (!feature_it->getMetaValue("var_sonar_lag").isEmpty())
248  {
249  var_sonar_lag = feature_it->getMetaValue("var_sonar_lag").toString();
250  }
251  if (!feature_it->getMetaValue("var_sonar_shape").isEmpty())
252  {
253  var_sonar_shape = feature_it->getMetaValue("var_sonar_shape").toString();
254  }
255  if (!feature_it->getMetaValue("var_sonar_log_sn").isEmpty())
256  {
257  var_sonar_log_sn = feature_it->getMetaValue("var_sonar_log_sn").toString();
258  }
259  if (!feature_it->getMetaValue("var_sonar_log_diff").isEmpty())
260  {
261  var_sonar_log_diff = feature_it->getMetaValue("var_sonar_log_diff").toString();
262  }
263  if (!feature_it->getMetaValue("var_sonar_log_trend").isEmpty())
264  {
265  var_sonar_log_trend = feature_it->getMetaValue("var_sonar_log_trend").toString();
266  }
267  if (!feature_it->getMetaValue("var_sonar_rsq").isEmpty())
268  {
269  var_sonar_rsq = feature_it->getMetaValue("var_sonar_rsq").toString();
270  }
271 
272  sql_feature_ms2 << "INSERT INTO FEATURE_MS2 (FEATURE_ID, AREA_INTENSITY, APEX_INTENSITY, VAR_BSERIES_SCORE, VAR_DOTPROD_SCORE, VAR_INTENSITY_SCORE, VAR_ISOTOPE_CORRELATION_SCORE, VAR_ISOTOPE_OVERLAP_SCORE, VAR_LIBRARY_CORR, VAR_LIBRARY_DOTPROD, VAR_LIBRARY_MANHATTAN, VAR_LIBRARY_RMSD, VAR_LIBRARY_ROOTMEANSQUARE, VAR_LIBRARY_SANGLE, VAR_LOG_SN_SCORE, VAR_MANHATTAN_SCORE, VAR_MASSDEV_SCORE, VAR_MASSDEV_SCORE_WEIGHTED, VAR_NORM_RT_SCORE, VAR_XCORR_COELUTION,VAR_XCORR_COELUTION_WEIGHTED, VAR_XCORR_SHAPE, VAR_XCORR_SHAPE_WEIGHTED, VAR_YSERIES_SCORE, VAR_ELUTION_MODEL_FIT_SCORE, VAR_SONAR_LAG, VAR_SONAR_SHAPE, VAR_SONAR_LOG_SN, VAR_SONAR_LOG_DIFF, VAR_SONAR_LOG_TREND, VAR_SONAR_RSQ) VALUES ("
273  << feature_it->getUniqueId() << ", "
274  << feature_it->getIntensity() << ", "
275  << feature_it->getMetaValue("peak_apices_sum") << ", "
276  << feature_it->getMetaValue("var_bseries_score") << ", "
277  << feature_it->getMetaValue("var_dotprod_score") << ", "
278  << feature_it->getMetaValue("var_intensity_score") << ", "
279  << feature_it->getMetaValue("var_isotope_correlation_score") << ", "
280  << feature_it->getMetaValue("var_isotope_overlap_score") << ", "
281  << feature_it->getMetaValue("var_library_corr") << ", "
282  << feature_it->getMetaValue("var_library_dotprod") << ", "
283  << feature_it->getMetaValue("var_library_manhattan") << ", "
284  << feature_it->getMetaValue("var_library_rmsd") << ", "
285  << feature_it->getMetaValue("var_library_rootmeansquare") << ", "
286  << feature_it->getMetaValue("var_library_sangle") << ", "
287  << feature_it->getMetaValue("var_log_sn_score") << ", "
288  << feature_it->getMetaValue("var_manhatt_score") << ", "
289  << feature_it->getMetaValue("var_massdev_score") << ", "
290  << feature_it->getMetaValue("var_massdev_score_weighted") << ", "
291  << feature_it->getMetaValue("var_norm_rt_score") << ", "
292  << feature_it->getMetaValue("var_xcorr_coelution") << ", "
293  << feature_it->getMetaValue("var_xcorr_coelution_weighted") << ", "
294  << feature_it->getMetaValue("var_xcorr_shape") << ", "
295  << feature_it->getMetaValue("var_xcorr_shape_weighted") << ", "
296  << feature_it->getMetaValue("var_yseries_score") << ", "
297  << var_elution_model_fit_score << ", "
298  << var_sonar_lag << ", "
299  << var_sonar_shape << ", "
300  << var_sonar_log_sn << ", "
301  << var_sonar_log_diff << ", "
302  << var_sonar_log_trend << ", "
303  << var_sonar_rsq << "); ";
304 
305  if (enable_uis_scoring_)
306  {
307  std::vector<String> id_target_transition_names = ListUtils::create<String>((String)feature_it->getMetaValue("id_target_transition_names"),';');
308  std::vector<double> id_target_area_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_area_intensity"),';');
309  std::vector<double> id_target_apex_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_apex_intensity"),';');
310  std::vector<double> id_target_log_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_log_intensity"),';');
311  std::vector<double> id_target_ind_xcorr_coelution = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_xcorr_coelution"),';');
312  std::vector<double> id_target_ind_xcorr_shape = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_xcorr_shape"),';');
313  std::vector<double> id_target_ind_log_sn_score = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_log_sn_score"),';');
314  std::vector<double> id_target_ind_massdev_score = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_massdev_score"),';');
315  std::vector<double> id_target_ind_isotope_correlation = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_isotope_correlation"),';');
316  std::vector<double> id_target_ind_isotope_overlap = ListUtils::create<double>((String)feature_it->getMetaValue("id_target_ind_isotope_overlap"),';');
317 
318  if ((String)feature_it->getMetaValue("id_target_num_transitions") != "")
319  {
320  for (int i = 0; i < feature_it->getMetaValue("id_target_num_transitions").toString().toInt(); ++i)
321  {
322  sql_feature_uis_transition << "INSERT INTO FEATURE_TRANSITION (FEATURE_ID, TRANSITION_ID, AREA_INTENSITY, APEX_INTENSITY, VAR_LOG_INTENSITY, VAR_XCORR_COELUTION, VAR_XCORR_SHAPE, VAR_LOG_SN_SCORE, VAR_MASSDEV_SCORE, VAR_ISOTOPE_CORRELATION_SCORE, VAR_ISOTOPE_OVERLAP_SCORE) VALUES ("
323  << feature_it->getUniqueId() << ", "
324  << id_target_transition_names[i] << ", "
325  << id_target_area_intensity[i] << ", "
326  << id_target_apex_intensity[i] << ", "
327  << id_target_log_intensity[i] << ", "
328  << id_target_ind_xcorr_coelution[i] << ", "
329  << id_target_ind_xcorr_shape[i] << ", "
330  << id_target_ind_log_sn_score[i] << ", "
331  << id_target_ind_massdev_score[i] << ", "
332  << id_target_ind_isotope_correlation[i] << ", "
333  << id_target_ind_isotope_overlap[i] << "); ";
334  }
335  }
336 
337  std::vector<String> id_decoy_transition_names = ListUtils::create<String>((String)feature_it->getMetaValue("id_decoy_transition_names"),';');
338  std::vector<double> id_decoy_area_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_area_intensity"),';');
339  std::vector<double> id_decoy_apex_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_apex_intensity"),';');
340  std::vector<double> id_decoy_log_intensity = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_log_intensity"),';');
341  std::vector<double> id_decoy_ind_xcorr_coelution = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_xcorr_coelution"),';');
342  std::vector<double> id_decoy_ind_xcorr_shape = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_xcorr_shape"),';');
343  std::vector<double> id_decoy_ind_log_sn_score = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_log_sn_score"),';');
344  std::vector<double> id_decoy_ind_massdev_score = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_massdev_score"),';');
345  std::vector<double> id_decoy_ind_isotope_correlation = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_isotope_correlation"),';');
346  std::vector<double> id_decoy_ind_isotope_overlap = ListUtils::create<double>((String)feature_it->getMetaValue("id_decoy_ind_isotope_overlap"),';');
347 
348  if ((String)feature_it->getMetaValue("id_decoy_num_transitions") != "")
349  {
350  for (int i = 0; i < feature_it->getMetaValue("id_decoy_num_transitions").toString().toInt(); ++i)
351  {
352  sql_feature_uis_transition << "INSERT INTO FEATURE_TRANSITION (FEATURE_ID, TRANSITION_ID, AREA_INTENSITY, APEX_INTENSITY, VAR_LOG_INTENSITY, VAR_XCORR_COELUTION, VAR_XCORR_SHAPE, VAR_LOG_SN_SCORE, VAR_MASSDEV_SCORE, VAR_ISOTOPE_CORRELATION_SCORE, VAR_ISOTOPE_OVERLAP_SCORE) VALUES ("
353  << feature_it->getUniqueId() << ", "
354  << id_decoy_transition_names[i] << ", "
355  << id_decoy_area_intensity[i] << ", "
356  << id_decoy_apex_intensity[i] << ", "
357  << id_decoy_log_intensity[i] << ", "
358  << id_decoy_ind_xcorr_coelution[i] << ", "
359  << id_decoy_ind_xcorr_shape[i] << ", "
360  << id_decoy_ind_log_sn_score[i] << ", "
361  << id_decoy_ind_massdev_score[i] << ", "
362  << id_decoy_ind_isotope_correlation[i] << ", "
363  << id_decoy_ind_isotope_overlap[i] << "); ";
364  }
365  }
366  }
367  }
368 
369  if (enable_uis_scoring_)
370  {
371  sql << sql_feature.str() << sql_feature_ms1.str() << sql_feature_ms2.str() << sql_feature_uis_transition.str();
372  }
373  else
374  {
375  sql << sql_feature.str() << sql_feature_ms1.str() << sql_feature_ms2.str() << sql_feature_ms2_transition.str();
376  }
377 
378  return(sql.str());
379  }
380 
394  void writeLines(std::vector<String> to_osw_output)
395  {
396  sqlite3 *db;
397  char *zErrMsg = 0;
398  int rc;
399  // char *create_sql;
400 
401  // Open database
402  rc = sqlite3_open(output_filename_.c_str(), &db);
403  if( rc )
404  {
405  fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
406  }
407 
408  sqlite3_exec(db, "BEGIN TRANSACTION", NULL, NULL, &zErrMsg);
409 
410  for (Size i = 0; i < to_osw_output.size(); i++)
411  {
412  rc = sqlite3_exec(db, to_osw_output[i].c_str(), callback, 0, &zErrMsg);
413  if( rc != SQLITE_OK )
414  {
415  throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
416  zErrMsg);
417  sqlite3_free(zErrMsg);
418  }
419  }
420 
421  sqlite3_exec(db, "END TRANSACTION", NULL, NULL, &zErrMsg);
422 
423  sqlite3_close(db);
424  }
425 
426  };
427 
428 }
429 
430 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHOSWWRITER_H
431 
String input_filename_
Definition: OpenSwathOSWWriter.h:60
String output_filename_
Definition: OpenSwathOSWWriter.h:59
A more convenient string class.
Definition: String.h:57
A container for features.
Definition: FeatureMap.h:94
bool sonar_
Definition: OpenSwathOSWWriter.h:63
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool use_ms1_traces_
Definition: OpenSwathOSWWriter.h:62
static int callback(void *, int argc, char **argv, char **azColName)
Definition: OpenSwathOSWWriter.h:77
Class to write out an OpenSwath OSW SQLite output (PyProphet input)
Definition: OpenSwathOSWWriter.h:57
void writeHeader()
Initializes file by generating SQLite tables.
Definition: OpenSwathOSWWriter.h:96
bool enable_uis_scoring_
Definition: OpenSwathOSWWriter.h:64
OpenSwathOSWWriter(String output_filename, String input_filename="inputfile", bool ms1_scores=false, bool sonar=false, bool uis_scores=false)
Definition: OpenSwathOSWWriter.h:68
A method or algorithm argument contains illegal values.
Definition: Exception.h:649
String prepareLine(const OpenSwath::LightCompound &, const OpenSwath::LightTransition *, FeatureMap &output, String id)
Prepare a single line (feature) for output.
Definition: OpenSwathOSWWriter.h:201
bool doWrite_
Definition: OpenSwathOSWWriter.h:61
Definition: TransitionExperiment.h:150
Definition: TransitionExperiment.h:47
bool isActive()
Definition: OpenSwathOSWWriter.h:87
void writeLines(std::vector< String > to_osw_output)
Write data to disk.
Definition: OpenSwathOSWWriter.h:394
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:02 using doxygen 1.8.13