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
16
17#include <memory>
18
19// Forward declarations
20namespace arrow
21{
22 class Table;
23}
24
25namespace OpenMS
26{
27
40class OPENMS_DLLAPI FeatureMapArrowIO
41{
42public:
43 // ==================== Export methods ====================
44
54 static std::shared_ptr<arrow::Table> exportFeaturesToArrow(
55 const FeatureMap& feature_map);
56
66 static std::shared_ptr<arrow::Table> exportPSMsToArrow(
67 const FeatureMap& feature_map);
68
84 static bool exportToParquet(
85 const FeatureMap& feature_map,
86 const String& directory,
87 const ParquetWriteConfig& config = ParquetWriteConfig{});
88
89 // ==================== Import methods ====================
90
102 const std::shared_ptr<arrow::Table>& table,
103 FeatureMap& feature_map);
104
116 const std::shared_ptr<arrow::Table>& table,
117 FeatureMap& feature_map);
118
132 static bool importFromParquet(
133 const String& directory,
134 FeatureMap& feature_map);
135};
136
137} // namespace OpenMS
Import and export FeatureMap data to/from Apache Arrow format.
Definition FeatureMapArrowIO.h:41
static std::shared_ptr< arrow::Table > exportPSMsToArrow(const FeatureMap &feature_map)
Export peptide spectrum matches (PSMs) associated with features to Apache Arrow Table.
static bool importFeaturesFromArrow(const std::shared_ptr< arrow::Table > &table, FeatureMap &feature_map)
Import features from Apache Arrow Table.
static bool importPSMsFromArrow(const std::shared_ptr< arrow::Table > &table, FeatureMap &feature_map)
Import PSMs from Apache Arrow Table.
static bool importFromParquet(const String &directory, FeatureMap &feature_map)
Import FeatureMap from a directory of Parquet files.
static std::shared_ptr< arrow::Table > exportFeaturesToArrow(const FeatureMap &feature_map)
Export features to Apache Arrow Table.
static bool exportToParquet(const FeatureMap &feature_map, const String &directory, const ParquetWriteConfig &config=ParquetWriteConfig{})
Export FeatureMap to a directory of Parquet files.
A container for features.
Definition FeatureMap.h:78
A more convenient string class.
Definition String.h:32
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition ArrowSchemaRegistry.h:18
Configuration for Parquet file writing.
Definition MSExperimentArrowExport.h:136