![]() |
OpenMS
|
Read OpenSwath Parquet library input (.oswpq) into LightTargetedExperiment. More...
#include <OpenMS/ANALYSIS/OPENSWATH/TransitionParquetFile.h>
Public Member Functions | |
| TransitionParquetFile ()=default | |
| Default constructor (the class is stateless; API consists of the two convert* methods) | |
| ~TransitionParquetFile ()=default | |
| Default destructor. | |
| void | convertParquetToTargetedExperiment (const std::string &oswpq_dir, OpenSwath::LightTargetedExperiment &targeted_exp) const |
Read a .oswpq library and populate a OpenSwath::LightTargetedExperiment. | |
| void | convertLightTargetedExperimentToParquet (const std::string &oswpq_path, const OpenSwath::LightTargetedExperiment &targeted_exp) const |
Write a OpenSwath::LightTargetedExperiment to a .oswpq library. | |
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:
The metadata file contains an OpenMS metadata block and QC counts. The new canonical layout (matching OpenSwathOSWParquetWriter) looks like:
Required columns for precursors.parquet:
Required columns for transitions.parquet:
|
default |
Default constructor (the class is stateless; API consists of the two convert* methods)
|
default |
Default destructor.
| void convertLightTargetedExperimentToParquet | ( | const std::string & | oswpq_path, |
| const OpenSwath::LightTargetedExperiment & | targeted_exp | ||
| ) | const |
Write a OpenSwath::LightTargetedExperiment to a .oswpq library.
Output target depends on oswpq_path: if it points at an existing directory, the parquet files are written directly under <oswpq_path>/library/. Otherwise the writer stages the layout in a temporary directory, then assembles a zip archive at oswpq_path via a .tmp staging archive that is renamed into place once complete.
| [in] | oswpq_path | Destination — existing directory or zip-file path. |
| [in] | targeted_exp | Library to serialise. |
| Exception::FileNotWritable | If a generated file inside the staging area cannot be written. |
| Exception::MissingInformation | If required per-row data (e.g. a transition lacking a peptide ref) is missing from targeted_exp. |
| Exception::InvalidValue | If row-level invariants are violated (e.g. duplicate precursor ids, schema-incompatible values). |
| void convertParquetToTargetedExperiment | ( | const std::string & | oswpq_dir, |
| OpenSwath::LightTargetedExperiment & | targeted_exp | ||
| ) | const |
Read a .oswpq library and populate a OpenSwath::LightTargetedExperiment.
Opens library/precursors.parquet and library/transitions.parquet from oswpq_dir (zip archive or extracted directory), validates each table against the OSWPrecursorSchema / OSWTransitionSchema in subset mode (extra columns are tolerated), and materialises the rows into targeted_exp.
targeted_exp is reset to an empty OpenSwath::LightTargetedExperiment at the start of the call — pre-existing contents are discarded rather than appended to.
| [in] | oswpq_dir | Path to a .oswpq archive or to an already-extracted directory containing library/. |
| [out] | targeted_exp | Populated targeted experiment; cleared before being filled. |
| Exception::MissingInformation | If a required parquet entry (precursors / transitions) cannot be located inside oswpq_dir. |
| Exception::InvalidValue | If a loaded parquet table fails schema validation against the precursor / transition schema, or if any other required row-level field is missing during materialisation. |