OpenMS
Loading...
Searching...
No Matches
OSWParquetFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Justin Sing $
6// $Authors: Justin Sing, Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
15#include <OpenMS/config.h>
16#include <map>
17#include <memory>
18#include <string>
19#include <vector>
20
21namespace OpenSwath
22{
23struct LightTargetedExperiment;
24}
25
26namespace OpenMS
27{
44class OPENMS_DLLAPI OSWParquetFile : public ProgressLogger
45{
46public:
48 struct OPENMS_DLLAPI InferenceResults
49 {
50 InferenceLevel level = InferenceLevel::Peptide;
51 InferenceContext context = InferenceContext::Global;
52 std::vector<LevelContextResultRow> rows;
53 };
54
62 OSWParquetFile(const std::string& filename, const OpenSwath::LightTargetedExperiment& library, bool load_transition_metadata = true);
64 ~OSWParquetFile() override;
71
73 std::vector<LevelContextInputRow> readLevelContextData(InferenceLevel level, InferenceContext context) const;
74
84 void writeLevelContextResults(std::vector<InferenceResults> results);
85
87 std::vector<OpenSwathExportRow> readOpenSwathExportRows(const OpenSwathExportFilterConfig& config) const;
93 std::map<Int64, std::string> readRunBasenames() const;
94
96 void commit();
97
98private:
99 class Impl;
100 std::unique_ptr<Impl> impl_;
101};
102} // namespace OpenMS
Read and update OpenSWATH results in an OSWPQ directory or archive.
Definition OSWParquetFile.h:45
OSWParquetFile(const std::string &filename, const OpenSwath::LightTargetedExperiment &library, bool load_transition_metadata=true)
Open a workflow and build its prepared-library lookup.
OSWParquetFile & operator=(OSWParquetFile &&)
Transfer ownership, releasing the old workspace without committing it.
OSWParquetFile & operator=(const OSWParquetFile &)=delete
std::unique_ptr< Impl > impl_
Definition OSWParquetFile.h:100
OSWParquetFile(OSWParquetFile &&)
Transfer ownership of the workspace.
std::vector< LevelContextInputRow > readLevelContextData(InferenceLevel level, InferenceContext context) const
Read compact peptide-, protein-, or gene-level rows for context inference.
void writeLevelContextResults(std::vector< InferenceResults > results)
Write inference tables and synchronize the corresponding feature score columns.
std::map< Int64, std::string > readRunBasenames() const
Read run IDs and user-facing filename stems.
OpenSwathFeatureScoreTable readOpenSwathFeatureScoreTable(const OpenSwathParquetExportConfig &config) const
Read feature score rows for the Parquet exporter.
OpenSwathTransitionScoreTable readOpenSwathTransitionScoreTable(const OpenSwathParquetExportConfig &config) const
Read transition score rows for the Parquet exporter.
OSWParquetFile(const OSWParquetFile &)=delete
std::vector< OpenSwathExportRow > readOpenSwathExportRows(const OpenSwathExportFilterConfig &config) const
Read filtered rows for result and matrix exporters.
void commit()
Persist pending archive changes and refresh the sidecar index; a no-op if unchanged.
~OSWParquetFile() override
Release the workspace without implicitly committing archive changes.
std::vector< LevelContextResultRow > rows
Definition OSWParquetFile.h:52
Results for one inference level/context, including an explicitly empty result.
Definition OSWParquetFile.h:49
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:28
InferenceLevel
Inference level for OpenSWATH-derived confidence inference.
Definition OpenSwathInferenceData.h:30
InferenceContext
Context for peptide-, protein-, and gene-level inference.
Definition OpenSwathInferenceData.h:43
Shared filter configuration for OpenSWATH export readers.
Definition OpenSwathExportConfig.h:25
Feature-level Parquet export table with dynamically discovered FEATURE_MS1 / FEATURE_MS2 columns.
Definition OpenSwathExportData.h:291
Configuration for scored feature Parquet exports.
Definition OpenSwathExportConfig.h:79
Transition-level Parquet export table with dynamically discovered FEATURE_TRANSITION columns.
Definition OpenSwathExportData.h:332
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition Scoring.h:18
Definition TransitionExperiment.h:369