OpenMS
Loading...
Searching...
No Matches
SqMassFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Hannes Roest $
6// $Authors: Hannes Roest $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
15
16namespace OpenMS
17{
18
31 class OPENMS_DLLAPI SqMassFile
32 {
33public:
34
40 struct OPENMS_DLLAPI SqMassConfig
41 {
42 bool write_full_meta{true};
43 bool use_lossy_numpress{false};
44 double linear_fp_mass_acc{-1};
45 };
46
48
54
58
62
63 void load(const String& filename, MapType& map) const;
64
71 void store(const String& filename, const MapType& map) const;
72
73 void transform(const String& filename_in, Interfaces::IMSDataConsumer* consumer, bool skip_full_count = false, bool skip_first_pass = false) const;
74
105 void convertToXICParquet(const String& filename_in,
106 const String& xic_filename,
107 UInt64 run_id = 0,
108 const String& source_file = "",
110
111 void setConfig(const SqMassConfig& config)
112 {
113 config_ = config;
114 }
115
116 // maybe later ...
117 // static inline void readSpectrumFast(OpenSwath::BinaryDataArrayPtr data1,
118 // OpenSwath::BinaryDataArrayPtr data2, std::ifstream& ifs, int& ms_level,
119 // double& rt)
120
121 // static inline void readChromatogramFast(OpenSwath::BinaryDataArrayPtr data1,
122 // OpenSwath::BinaryDataArrayPtr data2, std::ifstream& ifs)
123
124protected:
126 };
127}
128
129
The interface of a consumer of spectra and chromatograms.
Definition IMSDataConsumer.h:46
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
An class that uses on-disk SQLite database to read and write spectra and chromatograms.
Definition SqMassFile.h:32
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.
SqMassConfig config_
Definition SqMassFile.h:125
void setConfig(const SqMassConfig &config)
Definition SqMassFile.h:111
SqMassFile()
Default constructor.
void transform(const String &filename_in, Interfaces::IMSDataConsumer *consumer, bool skip_full_count=false, bool skip_first_pass=false) const
void store(const String &filename, const MapType &map) const
Store an MSExperiment in sqMass format.
void load(const String &filename, MapType &map) const
MSExperiment MapType
Definition SqMassFile.h:47
~SqMassFile()
Default destructor.
Configuration class for SqMassFile.
Definition SqMassFile.h:41
A more convenient string class.
Definition String.h:34
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition TransitionExperiment.h:356