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

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 std::string &  filename_in,
const std::string &  filename_out 
)

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

Parameters
[in]filename_inThe input file (OMS)
[out]filename_outThe output file (JSON)

◆ load() [1/3]

void load ( const std::string &  filename,
ConsensusMap consensus 
)

Read in an OMS file and construct a consensus map.

Parameters
[out]filenameThe input file
[in]consensusThe consensus map

◆ load() [2/3]

void load ( const std::string &  filename,
FeatureMap features 
)

Read in an OMS file and construct a feature map.

Parameters
[out]filenameThe input file
[in]featuresThe feature map

◆ load() [3/3]

void load ( const std::string &  filename,
IdentificationData id_data 
)

Read in an OMS file and construct an IdentificationData object.

Parameters
[out]filenameThe input file
[in]id_dataThe IdentificationData object

Referenced by NucleicAcidSearchEngine::main_().

◆ store() [1/3]

void store ( const std::string &  filename,
const ConsensusMap consensus 
)

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

Parameters
[in]filenameThe output file
[in]consensusThe consensus map

◆ store() [2/3]

void store ( const std::string &  filename,
const FeatureMap features 
)

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

Parameters
[in]filenameThe output file
[in]featuresThe feature map

◆ store() [3/3]

void store ( const std::string &  filename,
const IdentificationData id_data 
)

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

Parameters
[in]filenameThe output file
[in]id_dataThe IdentificationData object

Referenced by NucleicAcidSearchEngine::main_().

Member Data Documentation

◆ log_type_

LogType log_type_
protected