Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
OpenSwathOSWWriter Class Reference

Class to write out an OpenSwath OSW SQLite output (PyProphet input) More...

#include <OpenMS/ANALYSIS/OPENSWATH/OpenSwathOSWWriter.h>

Public Member Functions

 OpenSwathOSWWriter (String output_filename, String input_filename="inputfile", bool ms1_scores=false, bool sonar=false, bool uis_scores=false)
 
bool isActive ()
 
void writeHeader ()
 Initializes file by generating SQLite tables. More...
 
String prepareLine (const OpenSwath::LightCompound &, const OpenSwath::LightTransition *, FeatureMap &output, String id)
 Prepare a single line (feature) for output. More...
 
void writeLines (std::vector< String > to_osw_output)
 Write data to disk. More...
 

Static Public Member Functions

static int callback (void *, int argc, char **argv, char **azColName)
 

Private Attributes

String output_filename_
 
String input_filename_
 
bool doWrite_
 
bool use_ms1_traces_
 
bool sonar_
 
bool enable_uis_scoring_
 

Detailed Description

Class to write out an OpenSwath OSW SQLite output (PyProphet input)

The class can take a FeatureMap and create a set of string from it suitable for output to OSW using the prepareLine function.

Constructor & Destructor Documentation

◆ OpenSwathOSWWriter()

OpenSwathOSWWriter ( String  output_filename,
String  input_filename = "inputfile",
bool  ms1_scores = false,
bool  sonar = false,
bool  uis_scores = false 
)
inline

Member Function Documentation

◆ callback()

static int callback ( void *  ,
int  argc,
char **  argv,
char **  azColName 
)
inlinestatic

◆ isActive()

bool isActive ( )
inline

◆ prepareLine()

String prepareLine ( const OpenSwath::LightCompound ,
const OpenSwath::LightTransition ,
FeatureMap output,
String  id 
)
inline

Prepare a single line (feature) for output.

The result can be flushed to disk using writeLines (either line by line or after collecting several lines).

Parameters
pepThe compound (peptide/metabolite) used for extraction
transitionThe transition used for extraction
outputThe feature map containing all features (each feature will generate one entry in the output)
idThe transition group identifier (peptide/metabolite id)
Returns
A string to be written using writeLines

◆ writeHeader()

void writeHeader ( )
inline

Initializes file by generating SQLite tables.

◆ writeLines()

void writeLines ( std::vector< String to_osw_output)
inline

Write data to disk.

Takes a set of pre-prepared data statements from prepareLine and flushes them to disk

Parameters
to_osw_outputStatements generated by prepareLine
Note
Try to call this function as little as possible (it opens a new database connection each time)
Only call inside an OpenMP critical section

Member Data Documentation

◆ doWrite_

bool doWrite_
private

◆ enable_uis_scoring_

bool enable_uis_scoring_
private

◆ input_filename_

String input_filename_
private

◆ output_filename_

String output_filename_
private

◆ sonar_

bool sonar_
private

◆ use_ms1_traces_

bool use_ms1_traces_
private

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