OpenMS
SqMassFile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- 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 
14 
15 namespace OpenMS
16 {
17 
30  class OPENMS_DLLAPI SqMassFile
31  {
32 public:
33 
39  struct OPENMS_DLLAPI SqMassConfig
40  {
41  bool write_full_meta{true};
42  bool use_lossy_numpress{false};
43  double linear_fp_mass_acc{-1};
44  };
45 
47 
53 
57 
61 
62  void load(const String& filename, MapType& map) const;
63 
70  void store(const String& filename, const MapType& map) const;
71 
72  void transform(const String& filename_in, Interfaces::IMSDataConsumer* consumer, bool skip_full_count = false, bool skip_first_pass = false) const;
73 
74  void setConfig(const SqMassConfig& config)
75  {
76  config_ = config;
77  }
78 
79  // maybe later ...
80  // static inline void readSpectrumFast(OpenSwath::BinaryDataArrayPtr data1,
81  // OpenSwath::BinaryDataArrayPtr data2, std::ifstream& ifs, int& ms_level,
82  // double& rt)
83 
84  // static inline void readChromatogramFast(OpenSwath::BinaryDataArrayPtr data1,
85  // OpenSwath::BinaryDataArrayPtr data2, std::ifstream& ifs)
86 
87 protected:
89  };
90 }
91 
92 
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:46
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:45
An class that uses on-disk SQLite database to read and write spectra and chromatograms.
Definition: SqMassFile.h:31
SqMassConfig config_
Definition: SqMassFile.h:88
void setConfig(const SqMassConfig &config)
Definition: SqMassFile.h:74
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:46
~SqMassFile()
Default destructor.
Configuration class for SqMassFile.
Definition: SqMassFile.h:40
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19