OpenMS
Loading...
Searching...
No Matches
FeatureMapArrowIO.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: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
13#ifdef WITH_PARQUET
14
18
19#include <memory>
20
21// Forward declarations
22namespace arrow
23{
24 class Table;
25}
26
27namespace OpenMS
28{
29
42class OPENMS_DLLAPI FeatureMapArrowIO
43{
44public:
45 // ==================== Export methods ====================
46
56 static std::shared_ptr<arrow::Table> exportFeaturesToArrow(
57 const FeatureMap& feature_map);
58
68 static std::shared_ptr<arrow::Table> exportPSMsToArrow(
69 const FeatureMap& feature_map);
70
86 static bool exportToParquet(
87 const FeatureMap& feature_map,
88 const String& directory,
89 const ParquetWriteConfig& config = ParquetWriteConfig{});
90
91 // ==================== Import methods ====================
92
103 static bool importFeaturesFromArrow(
104 const std::shared_ptr<arrow::Table>& table,
105 FeatureMap& feature_map);
106
117 static bool importPSMsFromArrow(
118 const std::shared_ptr<arrow::Table>& table,
119 FeatureMap& feature_map);
120
134 static bool importFromParquet(
135 const String& directory,
136 FeatureMap& feature_map);
137};
138
139} // namespace OpenMS
140
141#endif // WITH_PARQUET
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19