|
| void | write (const std::string &output_path, const OpenSwath::LightTargetedExperiment &assay_library, const FeatureMap &feature_map, UInt64 run_id, const std::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.
|
| |
| void | write (const std::string &output_path, const OpenSwath::LightTargetedExperiment &assay_library, const FeatureMap &feature_map, UInt64 run_id, const std::string &input_filename, bool enable_uis_scoring, const OpenSwathLibraryIDNormalizer::SourceIDMapping *source_ids) const |
| | Write an OSW parquet directory or zip archive while preserving source-ID provenance.
|
| |
| void | setPreserveExisting (bool preserve) |
| | Set whether the writer should preserve (append) existing archives.
|
| |
@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=<id>/
├── 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.
Write an OSW parquet directory or zip archive while preserving source-ID provenance.
- Parameters
-
| [in] | output_path | Path to the output directory (.oswpq) |
| [in] | assay_library | The transition library used for extraction |
| [in] | feature_map | Scored features for this run |
| [in] | run_id | Unique identifier for this run |
| [in] | input_filename | Original input filename (stored in metadata) |
| [in] | enable_uis_scoring | Whether UIS (identification) transitions are included |
| [in] | source_ids | Optional source-ID provenance for the persisted library traml_id |
- Exceptions
-
References File::absolutePath(), ZipArchiveFile::addOrReplaceFromFile(), ParquetFile::appendOrThrow(), LightTargetedExperiment::compounds, TransitionParquetFile::convertLightTargetedExperimentToParquet(), File::copyDirRecursively(), File::exists(), ParquetFile::finishArray(), ParquetFile::getColumn(), ParquetFile::getInt64(), Peak2D::getIntensity(), MetaInfoInterface::getMetaValue(), Peak2D::getRT(), Feature::getSubordinates(), UniqueIdInterface::getUniqueId(), File::isDirectory(), File::makeDir(), MetaInfoInterface::metaValueExists(), OPENMS_LOG_WARN, OSWPrecursorSchema::PRECURSOR_ID, OSWTransitionSchema::PRECURSOR_ID, OpenSwathOSWParquetWriter::preserve_existing_, ParquetFile::readTable(), File::remove(), File::removeDirRecursively(), OSWFeaturePrecursorSchema::schema(), OSWRunSchema::schema(), OSWFeatureSchema::schema(), OSWFeatureTransitionSchema::schema(), ExposedVector< VectorElement >::size(), OpenMS::StringUtils::split(), OpenMS::StringUtils::toInt64(), OpenMS::StringUtils::toStr(), OSWTransitionSchema::TRANSITION_ID, LightTargetedExperiment::transitions, ZipArchiveFile::unzipDirectory(), OpenMS::ArrowSchemaValidation::validate(), OpenSwathLibraryIDNormalizer::validateCanonicalIDs(), ZipArchiveFile::writeSidecarIndex(), and ParquetFile::writeTable().