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

Read and update OpenSWATH results in an OSWPQ directory or archive. More...

#include <OpenMS/FORMAT/OSWParquetFile.h>

Inheritance diagram for OSWParquetFile:
ProgressLogger

Classes

struct  InferenceResults
 Results for one inference level/context, including an explicitly empty result. More...
 

Public Member Functions

 OSWParquetFile (const std::string &filename, const OpenSwath::LightTargetedExperiment &library, bool load_transition_metadata=true)
 Open a workflow and build its prepared-library lookup.
 
 ~OSWParquetFile () override
 Release the workspace without implicitly committing archive changes.
 
 OSWParquetFile (const OSWParquetFile &)=delete
 
OSWParquetFile & operator= (const OSWParquetFile &)=delete
 
 OSWParquetFile (OSWParquetFile &&)
 Transfer ownership of the workspace.
 
OSWParquetFile & operator= (OSWParquetFile &&)
 Transfer ownership, releasing the old workspace without committing it.
 
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::vector< OpenSwathExportRow > readOpenSwathExportRows (const OpenSwathExportFilterConfig &config) const
 Read filtered rows for result and matrix exporters.
 
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.
 
std::map< Int64, std::string > readRunBasenames () const
 Read run IDs and user-facing filename stems.
 
void commit ()
 Persist pending archive changes and refresh the sidecar index; a no-op if unchanged.
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor.
 
virtual ~ProgressLogger ()
 Destructor.
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor.
 
ProgressLogger & operator= (const ProgressLogger &other)
 Assignment Operator.
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE!
 
LogType getLogType () const
 Returns the type of progress log being used.
 
void setLogger (ProgressLoggerImpl *logger)
 Sets the logger to be used for progress logging.
 
void startProgress (SignedSize begin, SignedSize end, const std::string &label) const
 Initializes the progress display.
 
void setProgress (SignedSize value) const
 Sets the current progress.
 
void endProgress (UInt64 bytes_processed=0) const
 
void nextProgress () const
 increment progress by 1 (according to range begin-end)
 

Private Attributes

std::unique_ptr< Impl > impl_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD , GUI , NONE }
 Possible log types. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImpl * current_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static std::atomic< int > recursion_depth_
 

Detailed Description

Read and update OpenSWATH results in an OSWPQ directory or archive.

Provides the result-storage operations used by OpenDIA without exposing Arrow types. The prepared library must use the same canonical numeric IDs as the library used to write the workflow. Its lookup data is owned by this object; the supplied experiment need not outlive the constructor.

An archive is unpacked once into an owned temporary directory. Updates to that workspace are visible to subsequent reads, but only commit() repacks the archive. Destruction releases temporary files without committing. For directory inputs, writes take effect immediately and cannot be rolled back. Feature tables are processed one run at a time; only the run table is cached.


Class Documentation

◆ OpenMS::OSWParquetFile::InferenceResults

struct OpenMS::OSWParquetFile::InferenceResults

Results for one inference level/context, including an explicitly empty result.

Class Members
InferenceContext context = InferenceContext::Global
InferenceLevel level = InferenceLevel::Peptide
vector< LevelContextResultRow > rows

Constructor & Destructor Documentation

◆ OSWParquetFile() [1/3]

OSWParquetFile ( const std::string &  filename,
const OpenSwath::LightTargetedExperiment &  library,
bool  load_transition_metadata = true 
)

Open a workflow and build its prepared-library lookup.

Parameters
[in]filenameOSWPQ directory or ZIP archive
[in]libraryPrepared library with canonical numeric IDs
[in]load_transition_metadataRetain transition metadata for feature/transition exports and transition quantification; may be false for inference-only use

◆ ~OSWParquetFile()

~OSWParquetFile ( )
override

Release the workspace without implicitly committing archive changes.

◆ OSWParquetFile() [2/3]

OSWParquetFile ( const OSWParquetFile &  )
delete

◆ OSWParquetFile() [3/3]

Transfer ownership of the workspace.

Member Function Documentation

◆ commit()

void commit ( )

Persist pending archive changes and refresh the sidecar index; a no-op if unchanged.

◆ operator=() [1/2]

OSWParquetFile & operator= ( const OSWParquetFile &  )
delete

◆ operator=() [2/2]

OSWParquetFile & operator= ( OSWParquetFile &&  )

Transfer ownership, releasing the old workspace without committing it.

◆ readLevelContextData()

std::vector< LevelContextInputRow > readLevelContextData ( InferenceLevel  level,
InferenceContext  context 
) const

Read compact peptide-, protein-, or gene-level rows for context inference.

◆ readOpenSwathExportRows()

std::vector< OpenSwathExportRow > readOpenSwathExportRows ( const OpenSwathExportFilterConfig &  config) const

Read filtered rows for result and matrix exporters.

◆ readOpenSwathFeatureScoreTable()

OpenSwathFeatureScoreTable readOpenSwathFeatureScoreTable ( const OpenSwathParquetExportConfig &  config) const

Read feature score rows for the Parquet exporter.

◆ readOpenSwathTransitionScoreTable()

OpenSwathTransitionScoreTable readOpenSwathTransitionScoreTable ( const OpenSwathParquetExportConfig &  config) const

Read transition score rows for the Parquet exporter.

◆ readRunBasenames()

std::map< Int64, std::string > readRunBasenames ( ) const

Read run IDs and user-facing filename stems.

◆ writeLevelContextResults()

void writeLevelContextResults ( std::vector< InferenceResults >  results)

Write inference tables and synchronize the corresponding feature score columns.

Parameters
[in]resultsResults for all requested level/context combinations All contexts for each supplied level replace that level's inference table. Only the requested feature score columns are replaced; an empty result writes null scores. Each run's feature table is updated once for the batch. Pass the batch with std::move to avoid copying it at the API boundary. Peptidoform inference is not supported. Changes to archives require commit().

Member Data Documentation

◆ impl_

std::unique_ptr<Impl> impl_
private