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

Read OpenSwath Parquet library input (.oswpq) into LightTargetedExperiment. More...

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

Public Member Functions

 TransitionParquetFile ()=default
 Default constructor.
 
 ~TransitionParquetFile ()=default
 Default destructor.
 
void convertParquetToTargetedExperiment (const String &oswpq_dir, OpenSwath::LightTargetedExperiment &targeted_exp) const
 Read a .oswpq library directory and populate a LightTargetedExperiment.
 
void convertLightTargetedExperimentToParquet (const String &oswpq_path, const OpenSwath::LightTargetedExperiment &targeted_exp) const
 Write a LightTargetedExperiment to a .oswpq library (zip file or directory)
 

Detailed Description

Read OpenSwath Parquet library input (.oswpq) into LightTargetedExperiment.

The Parquet library format is a directory container with separate tables for precursors and transitions. The reader materializes all rows into OpenSwath::LightTargetedExperiment.

The container layout is:

<library>.oswpq
└── library/
├── metadata.json
├── precursors.parquet
└── transitions.parquet

The metadata file contains an OpenMS metadata block and QC counts. The new canonical layout (matching OpenSwathOSWParquetWriter) looks like:

{
"openms": {
"schema_version": 1,
"generator": "TransitionParquetFile",
"openms_version": "<version>",
"build_time": "<build_time>",
"tool": {"name": "OpenSwathWorkflow", "version": "<version>"},
"counts": {
"proteins": {"total": 0, "target": 0, "decoy": 0},
"peptides": {"total": 0, "target": 0, "decoy": 0},
"precursors": {"total": 0, "target": 0, "decoy": 0},
"compounds": {"total": 0, "target": 0, "decoy": 0},
"transitions": {"total": 0, "target": 0, "decoy": 0}
},
"fragment_type_counts": {
"target": {"b": 0, "y": 0, "other": 0},
"decoy": {"b": 0, "y": 0, "other": 0}
},
"charge_counts": {
"precursor": {"target": {"2": 0, "3": 0}, "decoy": {"2": 0, "3": 0}},
"transition": {"target": {"1": 0, "2": 0}, "decoy": {"1": 0, "2": 0}}
}
}
}

Required columns for precursors.parquet:

  • precursor_id (int64)
  • precursor_mz (float64)
  • charge (int32)
  • library_rt (float64) Optional columns:
  • library_drift_time (float64)
  • traml_id (string)
  • decoy (bool)
  • modified_sequence (string)
  • unmodified_sequence (string)
  • protein_accessions (string or list<string>)

Required columns for transitions.parquet:

  • transition_id (int64)
  • precursor_id (int64)
  • product_mz (float64)
  • charge (int32)
  • type (string)
  • ordinal (int32)
  • detecting (bool)
  • identifying (bool)
  • quantifying (bool)
  • library_intensity (float64)
  • decoy (bool) Optional columns:
  • traml_id (string)
  • annotation (string)

Constructor & Destructor Documentation

◆ TransitionParquetFile()

TransitionParquetFile ( )
default

Default constructor.

◆ ~TransitionParquetFile()

~TransitionParquetFile ( )
default

Default destructor.

Member Function Documentation

◆ convertLightTargetedExperimentToParquet()

void convertLightTargetedExperimentToParquet ( const String oswpq_path,
const OpenSwath::LightTargetedExperiment targeted_exp 
) const

Write a LightTargetedExperiment to a .oswpq library (zip file or directory)

◆ convertParquetToTargetedExperiment()

void convertParquetToTargetedExperiment ( const String oswpq_dir,
OpenSwath::LightTargetedExperiment targeted_exp 
) const

Read a .oswpq library directory and populate a LightTargetedExperiment.