OpenMS
Loading...
Searching...
No Matches
OpenSwathOSWParquetWriter Class Reference

#include <OpenMS/ANALYSIS/OPENSWATH/OpenSwathOSWParquetWriter.h>

Collaboration diagram for OpenSwathOSWParquetWriter:
[legend]

Public Member Functions

void write (const String &output_path, const OpenSwath::LightTargetedExperiment &assay_library, const FeatureMap &feature_map, UInt64 run_id, const String &input_filename, bool enable_uis_scoring) const
 Write an OSW parquet directory or zip archive.
 
void setPreserveExisting (bool preserve)
 Set whether the writer should preserve (append) existing archives.
 

Private Attributes

bool preserve_existing_ = false
 

Detailed Description

@brief Write OpenSwathWorkflow output to an OSW Parquet directory (.oswpq).

This writer mirrors the OSW SQLite tables in Parquet:
- runs.parquet
- features.parquet
- feature_precursor.parquet
- feature_transition.parquet (including UIS rows when present)

The output is a directory or zip archive with the following layout:
@code
<output>.oswpq
├── metadata.json
├── library/
│   ├── precursors.parquet
│   └── transitions.parquet
└── runs/
  ├── runs.parquet
  └── run_id=&lt;id&gt;/
    ├── features.parquet
    ├── feature_precursor.parquet
    └── feature_transition.parquet
@endcode

If the output directory already exists, the writer will append a new run partition under runs/run_id=<id>/, update runs.parquet, and refresh metadata.json. Existing runs are not modified.

Member Function Documentation

◆ setPreserveExisting()

void setPreserveExisting ( bool  preserve)

Set whether the writer should preserve (append) existing archives.

Parameters
[in]preserveIf true, the writer will append to existing .oswpq archives instead of overwriting them.

◆ write()

void write ( const String output_path,
const OpenSwath::LightTargetedExperiment assay_library,
const FeatureMap feature_map,
UInt64  run_id,
const String input_filename,
bool  enable_uis_scoring 
) const

Write an OSW parquet directory or zip archive.

Writes the assay library (precursors + transitions) and scored features for a single run into the Parquet directory layout. If the output directory already exists, the new run is appended under a fresh run_id= partition.

Parameters
[in]output_pathPath to the output directory (.oswpq)
[in]assay_libraryThe transition library used for extraction
[in]feature_mapScored features for this run
[in]run_idUnique identifier for this run
[in]input_filenameOriginal input filename (stored in metadata)
[in]enable_uis_scoringWhether UIS (identification) transitions are included
Exceptions
Exception::MissingFeatureif built without Parquet support
Exception::MissingInformationif a feature is missing required meta values
Exception::InvalidValueif a run_id already exists in the output

Member Data Documentation

◆ preserve_existing_

bool preserve_existing_ = false
mutableprivate