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

Sqlite handler for storing spectra and chromatograms. More...

#include <OpenMS/FORMAT/HANDLERS/MzMLSqliteHandler.h>

Public Member Functions

 MzMLSqliteHandler (String filename)
 

Protected Attributes

String filename_
 
Base64 base64coder_
 Decoder/Encoder for Base64-data in MzML. More...
 
MSNumpressCoder numpress_coder_
 
Int spec_id_
 
Int chrom_id_
 

Functions for reading files

----------------------------------- Reading of SQL file starts here -----------------------------------

void readExperiment (MSExperiment &exp, bool meta_only=false)
 Read an experiment into an MSExperiment structure. More...
 
void populateChromatogramsWithData_ (sqlite3 *db, std::vector< MSChromatogram > &chromatograms)
 
void populateSpectraWithData_ (sqlite3 *db, std::vector< MSSpectrum > &spectra)
 
void prepareChroms_ (sqlite3 *db, std::vector< MSChromatogram > &chromatograms)
 
void prepareSpectra_ (sqlite3 *db, std::vector< MSSpectrum > &spectra)
 

Functions for writing files

----------------------------------- Writing to SQL file starts here -----------------------------------

void writeExperiment (const MSExperiment &exp)
 Write an experiment to disk. More...
 
void createTables ()
 Create data tables for a new file. More...
 
void writeSpectra (const std::vector< MSSpectrum > &spectra)
 Writes a set of spectra to disk. More...
 
void writeChromatograms (const std::vector< MSChromatogram > &chroms)
 Writes a set of chromatograms to disk. More...
 
void executeBlobBind_ (sqlite3 *db, String &prepare_statement, std::vector< String > &data)
 
void executeSql_ (sqlite3 *db, const std::stringstream &statement)
 

Detailed Description

Sqlite handler for storing spectra and chromatograms.

Note
Do not use this class directly, rather use SqMassFile.
This class writes spectra and chromatograms from a cache to make writing substantially faster. It is thus recommended to provide many spectra / chromatograms together to the writing function or else performance suffers.

Constructor & Destructor Documentation

◆ MzMLSqliteHandler()

MzMLSqliteHandler ( String  filename)

Member Function Documentation

◆ createTables()

void createTables ( )

Create data tables for a new file.

Note
It is required to call this function first before writing any data to disk, otherwise the tables will not be set up!

◆ executeBlobBind_()

void executeBlobBind_ ( sqlite3 *  db,
String prepare_statement,
std::vector< String > &  data 
)
protected

◆ executeSql_()

void executeSql_ ( sqlite3 *  db,
const std::stringstream &  statement 
)
protected

◆ populateChromatogramsWithData_()

void populateChromatogramsWithData_ ( sqlite3 *  db,
std::vector< MSChromatogram > &  chromatograms 
)
protected

◆ populateSpectraWithData_()

void populateSpectraWithData_ ( sqlite3 *  db,
std::vector< MSSpectrum > &  spectra 
)
protected

◆ prepareChroms_()

void prepareChroms_ ( sqlite3 *  db,
std::vector< MSChromatogram > &  chromatograms 
)
protected

◆ prepareSpectra_()

void prepareSpectra_ ( sqlite3 *  db,
std::vector< MSSpectrum > &  spectra 
)
protected

◆ readExperiment()

void readExperiment ( MSExperiment exp,
bool  meta_only = false 
)

Read an experiment into an MSExperiment structure.

Parameters
expThe result data structure
meta_onlyOnly read the meta data

◆ writeChromatograms()

void writeChromatograms ( const std::vector< MSChromatogram > &  chroms)

Writes a set of chromatograms to disk.

Parameters
chromatogramsThe chromatograms to write

◆ writeExperiment()

void writeExperiment ( const MSExperiment exp)

Write an experiment to disk.

Parameters
expThe data to write

◆ writeSpectra()

void writeSpectra ( const std::vector< MSSpectrum > &  spectra)

Writes a set of spectra to disk.

Parameters
spectraThe spectra to write

Member Data Documentation

◆ base64coder_

Base64 base64coder_
protected

Decoder/Encoder for Base64-data in MzML.

◆ chrom_id_

Int chrom_id_
protected

◆ filename_

String filename_
protected

◆ numpress_coder_

MSNumpressCoder numpress_coder_
protected

◆ spec_id_

Int spec_id_
protected

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