![]() |
OpenMS
|
Writes targeted mz/RT/IM peak maps to a Parquet file (.xipm). More...
#include <OpenSwathPeakMapExtractor/include/XIPMParquetConsumer.h>
Public Member Functions | |
| XIPMParquetConsumer (const std::string &filename, const OpenSwath::LightTargetedExperiment &transition_exp) | |
| Construct a parquet writer for targeted peak-map export. | |
| ~XIPMParquetConsumer () | |
| Destructor flushes pending rows and closes the parquet writer. | |
| void | consumePeakMap (const PeakMapExtractor::ExtractedPeakMap &peak_map, UInt64 run_id, const std::string &source_file, Int64 ms_level) |
| Consume one targeted peak map. | |
| void | finalize () |
| Finalize and write the parquet file. | |
| void | setExpectedSize (Size expectedPeakMaps) |
| Reserve storage for the expected number of peak maps. | |
Private Attributes | |
| std::unique_ptr< XIPMParquetConsumerImpl > | impl_ |
Writes targeted mz/RT/IM peak maps to a Parquet file (.xipm).
The schema includes run metadata, precursor/transition annotations, extraction window metadata, compressed mz/RT/ion mobility/intensity arrays, and compression flags.
The Parquet output has the following columns (one row per extracted peak map):
| Column | Type | Description |
|---|---|---|
| RUN_ID | int64 | Run identifier |
| SOURCE_FILE | string (nullable) | Input source filename |
| MS_LEVEL | int64 | MS level (1 for precursor peak maps, 2 for fragment peak maps) |
| PEAKMAP_TYPE | string | Peak-map type (precursor or transition) |
| PRECURSOR_ID | int64 (nullable) | Precursor id |
| TRANSITION_ID | int64 (nullable) | Transition id |
| MODIFIED_SEQUENCE | string (nullable) | Modified peptide sequence |
| PRECURSOR_CHARGE | int64 (nullable) | Precursor charge |
| PRODUCT_CHARGE | int64 (nullable) | Product charge |
| DETECTING_TRANSITION | int64 (nullable) | Detecting transition flag |
| PRECURSOR_DECOY | int64 (nullable) | Precursor decoy flag |
| PRODUCT_DECOY | int64 (nullable) | Product decoy flag |
| TRANSITION_ORDINAL | int64 (nullable) | Transition ordinal |
| TRANSITION_TYPE | string (nullable) | Transition type (e.g. y, b) |
| ANNOTATION | string (nullable) | Transition annotation (e.g. y3^1) or precursor annotation |
| TARGET_MZ | float64 | Extraction target m/z |
| TARGET_RT | float64 (nullable) | Extraction target RT in the run coordinate system |
| TARGET_ION_MOBILITY | float64 (nullable) | Extraction target ion mobility |
| RT_START | float64 (nullable) | Extraction window start in RT |
| RT_END | float64 (nullable) | Extraction window end in RT |
| MZ_DATA | binary | Compressed mz array |
| RT_DATA | binary | Compressed RT array |
| MOBILITY_DATA | binary | Compressed ion mobility array |
| INTENSITY_DATA | binary | Compressed intensity array |
| MZ_COMPRESSION | int64 | m/z compression scheme id |
| RT_COMPRESSION | int64 | RT compression scheme id |
| MOBILITY_COMPRESSION | int64 | Ion mobility compression scheme id |
| INTENSITY_COMPRESSION | int64 | Intensity compression scheme id |
Compression identifiers:
| Column | Value | Description |
|---|---|---|
| MZ_COMPRESSION | 0 | No compression (raw doubles) |
| MZ_COMPRESSION | 1 | Zlib-compressed raw doubles |
| MZ_COMPRESSION | 5 | MSNumpress (linear) with lossy compression |
| RT_COMPRESSION | 0 | No compression (raw doubles) |
| RT_COMPRESSION | 1 | Zlib-compressed raw doubles |
| RT_COMPRESSION | 5 | MSNumpress (linear) with lossy compression |
| MOBILITY_COMPRESSION | 0 | No compression (raw doubles) |
| MOBILITY_COMPRESSION | 1 | Zlib-compressed raw doubles |
| MOBILITY_COMPRESSION | 5 | MSNumpress (linear) with lossy compression |
| INTENSITY_COMPRESSION | 0 | No compression (raw doubles) |
| INTENSITY_COMPRESSION | 1 | Zlib-compressed raw doubles |
| INTENSITY_COMPRESSION | 6 | MSNumpress (short logged float) with lossy compression |
| XIPMParquetConsumer | ( | const std::string & | filename, |
| const OpenSwath::LightTargetedExperiment & | transition_exp | ||
| ) |
Construct a parquet writer for targeted peak-map export.
| [in] | filename | Output parquet filename |
| [in] | transition_exp | Transition metadata used to annotate rows |
References XIPMParquetConsumer::impl_.
|
default |
Destructor flushes pending rows and closes the parquet writer.
| void consumePeakMap | ( | const PeakMapExtractor::ExtractedPeakMap & | peak_map, |
| UInt64 | run_id, | ||
| const std::string & | source_file, | ||
| Int64 | ms_level | ||
| ) |
Consume one targeted peak map.
| [in] | peak_map | Extracted peak map to append |
| [in] | run_id | Run identifier |
| [in] | source_file | Source mzML / raw file name |
| [in] | ms_level | MS level of the extraction (1 = precursor, 2 = fragment) |
References XIPMParquetConsumer::impl_.
| void finalize | ( | ) |
Finalize and write the parquet file.
References XIPMParquetConsumer::impl_.
| void setExpectedSize | ( | Size | expectedPeakMaps | ) |
Reserve storage for the expected number of peak maps.
| [in] | expectedPeakMaps | The expected number of rows |
References XIPMParquetConsumer::impl_.
|
private |