OpenMS
Loading...
Searching...
No Matches
ProteinIdentificationArrowIO.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#include <vector>
19
20// Forward declarations
21namespace arrow
22{
23 class Table;
24}
25
26namespace OpenMS
27{
28
41{
42public:
43 // ==================== Export methods ====================
44
53 static std::shared_ptr<arrow::Table> exportProteinsToArrow(
54 const std::vector<ProteinIdentification>& protein_identifications);
55
65 const std::vector<ProteinIdentification>& protein_identifications,
66 const String& filename,
67 const ParquetWriteConfig& config = ParquetWriteConfig{});
68
77 static std::shared_ptr<arrow::Table> exportProteinGroupsToArrow(
78 const std::vector<ProteinIdentification>& protein_identifications);
79
89 const std::vector<ProteinIdentification>& protein_identifications,
90 const String& filename,
91 const ParquetWriteConfig& config = ParquetWriteConfig{});
92
101 static std::shared_ptr<arrow::Table> exportSearchParamsToArrow(
102 const std::vector<ProteinIdentification>& protein_identifications);
103
113 const std::vector<ProteinIdentification>& protein_identifications,
114 const String& filename,
115 const ParquetWriteConfig& config = ParquetWriteConfig{});
116
117 // ==================== Import methods ====================
118
131 static bool importFromParquet(
132 const String& proteins_filename,
133 const String& protein_groups_filename,
134 const String& search_params_filename,
135 std::vector<ProteinIdentification>& protein_identifications);
136
148 const std::shared_ptr<arrow::Table>& table,
149 std::vector<ProteinIdentification>& protein_identifications);
150
162 const std::shared_ptr<arrow::Table>& table,
163 std::vector<ProteinIdentification>& protein_identifications);
164
176 const std::shared_ptr<arrow::Table>& table,
177 std::vector<ProteinIdentification>& protein_identifications);
178
187 const String& filename,
188 std::vector<ProteinIdentification>& protein_identifications);
189
198 const String& filename,
199 std::vector<ProteinIdentification>& protein_identifications);
200
209 const String& filename,
210 std::vector<ProteinIdentification>& protein_identifications);
211};
212
213} // namespace OpenMS
Import and export ProteinIdentification data to/from Apache Arrow format.
Definition ProteinIdentificationArrowIO.h:41
static bool importSearchParamsFromParquet(const String &filename, std::vector< ProteinIdentification > &protein_identifications)
Import search parameters from Parquet file.
static bool exportProteinsToParquet(const std::vector< ProteinIdentification > &protein_identifications, const String &filename, const ParquetWriteConfig &config=ParquetWriteConfig{})
Export protein hits to Parquet file.
static bool importProteinGroupsFromArrow(const std::shared_ptr< arrow::Table > &table, std::vector< ProteinIdentification > &protein_identifications)
Import protein groups from Arrow Table.
static bool importProteinGroupsFromParquet(const String &filename, std::vector< ProteinIdentification > &protein_identifications)
Import protein groups from Parquet file.
static bool exportProteinGroupsToParquet(const std::vector< ProteinIdentification > &protein_identifications, const String &filename, const ParquetWriteConfig &config=ParquetWriteConfig{})
Export protein groups to Parquet file.
static bool importProteinsFromParquet(const String &filename, std::vector< ProteinIdentification > &protein_identifications)
Import protein hits from Parquet file.
static bool importFromParquet(const String &proteins_filename, const String &protein_groups_filename, const String &search_params_filename, std::vector< ProteinIdentification > &protein_identifications)
Import all three Parquet files and reconstruct ProteinIdentifications.
static std::shared_ptr< arrow::Table > exportProteinGroupsToArrow(const std::vector< ProteinIdentification > &protein_identifications)
Export protein groups to Apache Arrow Table.
static bool importProteinsFromArrow(const std::shared_ptr< arrow::Table > &table, std::vector< ProteinIdentification > &protein_identifications)
Import protein hits from Arrow Table.
static std::shared_ptr< arrow::Table > exportSearchParamsToArrow(const std::vector< ProteinIdentification > &protein_identifications)
Export search parameters to Apache Arrow Table.
static bool importSearchParamsFromArrow(const std::shared_ptr< arrow::Table > &table, std::vector< ProteinIdentification > &protein_identifications)
Import search parameters from Arrow Table.
static std::shared_ptr< arrow::Table > exportProteinsToArrow(const std::vector< ProteinIdentification > &protein_identifications)
Export protein hits to Apache Arrow Table.
static bool exportSearchParamsToParquet(const std::vector< ProteinIdentification > &protein_identifications, const String &filename, const ParquetWriteConfig &config=ParquetWriteConfig{})
Export search parameters to Parquet file.
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