OpenMS
EDTAFile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Chris Bielow $
6 // $Authors: Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 #include <OpenMS/KERNEL/Feature.h>
15 #include <OpenMS/FORMAT/TextFile.h>
16 
17 #include <fstream>
18 #include <vector>
19 
20 namespace OpenMS
21 {
58  class OPENMS_DLLAPI EDTAFile
59  {
60 public:
64  virtual ~EDTAFile();
65 
66 private:
70  double checkedToDouble_(const std::vector<String> & parts, Size index, double def = -1);
71 
75  Int checkedToInt_(const std::vector<String> & parts, Size index, Int def = -1);
76 
77 public:
86  void load(const String & filename, ConsensusMap & consensus_map);
87 
95  void store(const String & filename, const ConsensusMap & map) const;
96 
97 
105  void store(const String & filename, const FeatureMap & map) const;
106  };
107 } // namespace OpenMS
108 
A container for consensus elements.
Definition: ConsensusMap.h:66
File adapter for Enhanced DTA files.
Definition: EDTAFile.h:59
virtual ~EDTAFile()
Destructor.
void store(const String &filename, const FeatureMap &map) const
Stores a FeatureMap as an enhanced DTA file.
void store(const String &filename, const ConsensusMap &map) const
Stores a ConsensusMap as an enhanced DTA file.
double checkedToDouble_(const std::vector< String > &parts, Size index, double def=-1)
void load(const String &filename, ConsensusMap &consensus_map)
Loads a EDTA file into a consensusXML.
Int checkedToInt_(const std::vector< String > &parts, Size index, Int def=-1)
EDTAFile()
Default constructor.
A container for features.
Definition: FeatureMap.h:80
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:76
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22