![]() |
OpenMS
|
An class that uses on-disk SQLite database to read and write spectra and chromatograms. More...
#include <OpenMS/FORMAT/SqMassFile.h>
Classes | |
| struct | SqMassConfig |
| Configuration class for SqMassFile. More... | |
Public Types | |
| typedef MSExperiment | MapType |
Public Member Functions | |
Constructors and Destructor | |
| SqMassFile () | |
| Default constructor. | |
| ~SqMassFile () | |
| Default destructor. | |
Read / Write a complete mass spectrometric experiment | |
| SqMassConfig | config_ |
| void | load (const String &filename, MapType &map) const |
| void | store (const String &filename, const MapType &map) const |
| Store an MSExperiment in sqMass format. | |
| void | transform (const String &filename_in, Interfaces::IMSDataConsumer *consumer, bool skip_full_count=false, bool skip_first_pass=false) const |
| void | convertToXICParquet (const String &filename_in, const String &xic_filename, UInt64 run_id=0, const String &source_file="", const OpenSwath::LightTargetedExperiment &transition_exp=OpenSwath::LightTargetedExperiment()) const |
| Convert an sqMass file containing chromatogram data to an XIC Parquet file. | |
| void | setConfig (const SqMassConfig &config) |
An class that uses on-disk SQLite database to read and write spectra and chromatograms.
This class provides functions to read and write spectra and chromatograms to disk using a SQLite database and store them in sqMass format. This allows users to access, select and filter spectra and chromatograms on-demand even in a large collection of data.
Spectra and chromatograms with precursor information will additionally load/store the metavalue 'peptide_sequence' from the first precursor (if any).
| struct OpenMS::SqMassFile::SqMassConfig |
Configuration class for SqMassFile.
Contains configuration options for SQLite file
| typedef MSExperiment MapType |
| SqMassFile | ( | ) |
Default constructor.
| ~SqMassFile | ( | ) |
Default destructor.
| void convertToXICParquet | ( | const String & | filename_in, |
| const String & | xic_filename, | ||
| UInt64 | run_id = 0, |
||
| const String & | source_file = "", |
||
| const OpenSwath::LightTargetedExperiment & | transition_exp = OpenSwath::LightTargetedExperiment() |
||
| ) | const |
Convert an sqMass file containing chromatogram data to an XIC Parquet file.
This is a convenience function that will stream chromatograms from the input sqMass file into an OpenMS Parquet writer (MSChromatogramParquetConsumer) and write them to disk.
Note: The transition/precursor metadata passed to the underlying Parquet consumer is optional from the API perspective, but the writer expects chromatogram native IDs to have matching transition/precursor metadata in many cases. If required metadata for a chromatogram (precursor or transition) is missing the writer will throw an exception and the conversion will fail. Therefore it is recommended to provide a populated transition experiment when possible.
| [in] | filename_in | Path to the input sqMass file. |
| [in] | xic_filename | Path to the output .xic Parquet file. |
| [in] | run_id | Run identifier to store with each chromatogram (default 0). |
| [in] | source_file | Source filename to store in the parquet file (if empty, filename_in is used). |
| [in] | transition_exp | Optional transition/precursor metadata (LightTargetedExperiment) used to annotate chromatograms. If left empty, no transition metadata will be available to the writer and conversion may fail for chromatograms that require such metadata. Prefer supplying a populated transition experiment when available. |
| Exception::InvalidValue | If a chromatogram refers to a precursor or transition for which no matching metadata entry exists, or if Arrow/Parquet operations fail while assembling/writing the table. |
| Exception::FileNotWritable | If the output parquet file cannot be opened for writing. |
| Exception::NotImplemented | If Parquet support was not compiled in. |
| Exception::BaseException | Other OpenMS exceptions propagated from the writer/encoding layers may also be thrown. |
|
inline |
Store an MSExperiment in sqMass format.
If you want a specific RUN::ID in the sqMass file, make sure to populate MSExperiment::setSqlRunID(UInt64 id) before.
| void transform | ( | const String & | filename_in, |
| Interfaces::IMSDataConsumer * | consumer, | ||
| bool | skip_full_count = false, |
||
| bool | skip_first_pass = false |
||
| ) | const |
|
protected |