OpenMS
OMSFile.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: Hendrik Weisser $
6 // $Authors: Hendrik Weisser $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
13 
14 namespace OpenMS
15 {
16  class FeatureMap;
17  class ConsensusMap;
18 
24  class OPENMS_DLLAPI OMSFile: public ProgressLogger
25  {
26  public:
28  explicit OMSFile(LogType log_type = LogType::NONE):
29  log_type_(log_type)
30  {
31  setLogType(log_type);
32  }
33 
39  void store(const String& filename, const IdentificationData& id_data);
40 
46  void store(const String& filename, const FeatureMap& features);
47 
53  void store(const String& filename, const ConsensusMap& consensus);
54 
60  void load(const String& filename, IdentificationData& id_data);
61 
67  void load(const String& filename, FeatureMap& features);
68 
74  void load(const String& filename, ConsensusMap& consensus);
75 
81  void exportToJSON(const String& filename_in, const String& filename_out);
82 
83  protected:
85  };
86 } // namespace OpenMS
A container for consensus elements.
Definition: ConsensusMap.h:66
A container for features.
Definition: FeatureMap.h:80
Definition: IdentificationData.h:87
This class supports reading and writing of OMS files.
Definition: OMSFile.h:25
OMSFile(LogType log_type=LogType::NONE)
Constructor (with option to set log type)
Definition: OMSFile.h:28
void store(const String &filename, const IdentificationData &id_data)
Write out an IdentificationData object to SQL-based OMS file.
void load(const String &filename, IdentificationData &id_data)
Read in an OMS file and construct an IdentificationData object.
void load(const String &filename, ConsensusMap &consensus)
Read in an OMS file and construct a consensus map.
void exportToJSON(const String &filename_in, const String &filename_out)
Read in an OMS file and write out the contents in JSON format.
LogType log_type_
Definition: OMSFile.h:84
void store(const String &filename, const ConsensusMap &consensus)
Write out a consensus map to SQL-based OMS file.
void load(const String &filename, FeatureMap &features)
Read in an OMS file and construct a feature map.
void store(const String &filename, const FeatureMap &features)
Write out a feature map to SQL-based OMS file.
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
LogType
Possible log types.
Definition: ProgressLogger.h:43
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19