OpenMS
OMSFile Class Reference

This class supports reading and writing of OMS files. More...

#include <OpenMS/FORMAT/OMSFile.h>

Inheritance diagram for OMSFile:
[legend]
Collaboration diagram for OMSFile:
[legend]

Public Member Functions

 OMSFile (LogType log_type=LogType::NONE)
 Constructor (with option to set log type) More...
 
void store (const String &filename, const IdentificationData &id_data)
 Write out an IdentificationData object to SQL-based OMS file. More...
 
void store (const String &filename, const FeatureMap &features)
 Write out a feature map to SQL-based OMS file. More...
 
void store (const String &filename, const ConsensusMap &consensus)
 Write out a consensus map to SQL-based OMS file. More...
 
void load (const String &filename, IdentificationData &id_data)
 Read in an OMS file and construct an IdentificationData object. More...
 
void load (const String &filename, FeatureMap &features)
 Read in an OMS file and construct a feature map. More...
 
void load (const String &filename, ConsensusMap &consensus)
 Read in an OMS file and construct a consensus map. More...
 
void exportToJSON (const String &filename_in, const String &filename_out)
 Read in an OMS file and write out the contents in JSON format. More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
virtual ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) More...
 

Protected Attributes

LogType log_type_
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

This class supports reading and writing of OMS files.

OMS files are SQLite databases consisting of several tables.

Constructor & Destructor Documentation

◆ OMSFile()

OMSFile ( LogType  log_type = LogType::NONE)
inlineexplicit

Constructor (with option to set log type)

Member Function Documentation

◆ exportToJSON()

void exportToJSON ( const String filename_in,
const String filename_out 
)

Read in an OMS file and write out the contents in JSON format.

Parameters
filename_inThe input file (OMS)
filename_outThe output file (JSON)

◆ load() [1/3]

void load ( const String filename,
ConsensusMap consensus 
)

Read in an OMS file and construct a consensus map.

Parameters
filenameThe input file
consensusThe consensus map

◆ load() [2/3]

void load ( const String filename,
FeatureMap features 
)

Read in an OMS file and construct a feature map.

Parameters
filenameThe input file
featuresThe feature map

◆ load() [3/3]

void load ( const String filename,
IdentificationData id_data 
)

Read in an OMS file and construct an IdentificationData object.

Parameters
filenameThe input file
id_dataThe IdentificationData object

Referenced by NucleicAcidSearchEngine::main_().

◆ store() [1/3]

void store ( const String filename,
const ConsensusMap consensus 
)

Write out a consensus map to SQL-based OMS file.

Parameters
filenameThe output file
consensusThe consensus map

◆ store() [2/3]

void store ( const String filename,
const FeatureMap features 
)

Write out a feature map to SQL-based OMS file.

Parameters
filenameThe output file
featuresThe feature map

◆ store() [3/3]

void store ( const String filename,
const IdentificationData id_data 
)

Write out an IdentificationData object to SQL-based OMS file.

Parameters
filenameThe output file
id_dataThe IdentificationData object

Referenced by NucleicAcidSearchEngine::main_().

Member Data Documentation

◆ log_type_

LogType log_type_
protected