![]() |
OpenMS
|
Import and export FeatureMap data to/from Apache Arrow format. More...
#include <OpenMS/FORMAT/FeatureMapArrowIO.h>
Static Public Member Functions | |
| static std::shared_ptr< arrow::Table > | exportFeaturesToArrow (const FeatureMap &feature_map) |
| Export features to Apache Arrow Table. | |
| 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 | exportToParquet (const FeatureMap &feature_map, const String &directory, const ParquetWriteConfig &config=ParquetWriteConfig{}) |
| Export FeatureMap to a directory of Parquet files. | |
| 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. | |
Import and export FeatureMap data to/from Apache Arrow format.
This class provides static methods to export and import FeatureMap data to/from Apache Arrow Tables and Parquet files. Separate tables are provided for features (with their geometry and metadata) and for peptide spectrum matches (PSMs) associated with features.
|
static |
Export features to Apache Arrow Table.
Each Feature becomes one row with RT, MZ, intensity, charge, quality, convex hull geometry, and metadata columns.
| [in] | feature_map | The FeatureMap to export |
|
static |
Export peptide spectrum matches (PSMs) associated with features to Apache Arrow Table.
Each PeptideHit from each PeptideIdentification (both feature-level and unassigned) becomes one row.
| [in] | feature_map | The FeatureMap whose identifications to export |
|
static |
Export FeatureMap to a directory of Parquet files.
Writes five Parquet files: features.parquet, psms.parquet, proteins.parquet, protein_groups.parquet, and search_params.parquet into the specified directory. Protein-level data is delegated to ProteinIdentificationArrowIO. FeatureMap-level metadata (DocumentIdentifier, DataProcessing) is stored as file-level key-value metadata in features.parquet.
| [in] | feature_map | The FeatureMap to export |
| [in] | directory | Output directory path |
| [in] | config | Parquet writing options |
|
static |
Import features from Apache Arrow Table.
Each row becomes a Feature with RT, MZ, intensity, charge, quality, convex hull geometry, and metadata populated.
| [in] | table | Arrow Table with feature data |
| [out] | feature_map | FeatureMap to populate |
|
static |
Import FeatureMap from a directory of Parquet files.
Reads five Parquet files (features.parquet, psms.parquet, proteins.parquet, protein_groups.parquet, search_params.parquet) from the specified directory and reconstructs a complete FeatureMap including feature hierarchy, PSM linkage, protein identifications, and FeatureMap-level metadata.
| [in] | directory | Input directory path containing Parquet files |
| [out] | feature_map | FeatureMap to populate |
|
static |
Import PSMs from Apache Arrow Table.
Reconstructs PeptideIdentifications and PeptideHits from the table and assigns them to the appropriate features or as unassigned.
| [in] | table | Arrow Table with PSM data |
| [out] | feature_map | FeatureMap to populate |