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

In-process Percolator scoring for OpenSWATH OSW and OSWPQ results. More...

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

Inheritance diagram for OpenSwathPercolatorScoring:
[legend]
Collaboration diagram for OpenSwathPercolatorScoring:
[legend]

Classes

struct  ScoreSummary
 Small execution summary returned by score() More...
 

Public Types

enum class  Level {
  MS1 , MS2 , MS1MS2 , TRANSITION ,
  SIZE_OF_LEVEL
}
 Supported OpenSWATH scoring levels. More...
 

Public Member Functions

 OpenSwathPercolatorScoring ()
 
 ~OpenSwathPercolatorScoring () override
 
ScoreSummary score (const std::string &input_path, Level level, const std::string &output_path="")
 Score an OpenSWATH OSW / OSWPQ file in place or into a copy.
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const std::string &name)
 Constructor with name that is displayed in error messages.
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor.
 
virtual ~DefaultParamHandler ()
 Destructor.
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator.
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator.
 
void setParameters (const Param &param)
 Sets the parameters.
 
const ParamgetParameters () const
 Non-mutable access to the parameters.
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters.
 
const std::string & getName () const
 Non-mutable access to the name.
 
void setName (const std::string &name)
 Mutable access to the name.
 
const std::vector< std::string > & getSubsections () const
 Non-mutable access to the registered subsections.
 

Static Public Attributes

static const std::array< std::string, static_cast< Size >(Level::SIZE_OF_LEVEL)> names_of_level
 String names of the supported scoring levels.
 

Protected Member Functions

void updateMembers_ () override
 This method is used to update extra member variables at the end of the setParameters() method.
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor.
 

Private Attributes

std::unique_ptr< Impl > impl_
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="")
 Writes all parameters to meta values.
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters.
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes!
 
std::vector< std::string > subsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes!
 
std::string error_name_
 Name that is displayed in error messages during the parameter checking.
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;.
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;.
 

Detailed Description

In-process Percolator scoring for OpenSWATH OSW and OSWPQ results.

The scorer reads OpenSWATH feature tables, converts them into a domain-agnostic Percolator::RescoreInput, performs target/decoy rescoring, and writes the resulting score, q-value, PEP, and peak-group rank back to the source format. Rows with missing active OpenSWATH features are skipped instead of being imputed to zero, matching PyProphet's cleanup step.

Peak-group-level q-values / PEPs follow the OpenSWATH / PyProphet convention: Percolator provides the discriminant, top-ranked target/decoy peak groups define the error model, and the resulting statistics are then projected back onto all scored candidates.

Supported levels:

  • MS1: writes SCORE_MS1 (SQLite) or score_ms1_* columns (.oswpq)
  • MS2: writes SCORE_MS2 (SQLite) or score_ms2_* columns (.oswpq)
  • MS1MS2: uses combined MS2 + MS1 features and writes SCORE_MS2 / score_ms2_* (matching the historical PyProphet convention)
  • Transition: requires prior MS2/MS1MS2 scoring and writes SCORE_TRANSITION / score_transition_*

Transition-level scoring reuses the historical OpenMS / PyProphet-style candidate filters: only transitions from non-decoy precursors whose peak-group rank and PEP pass the configured thresholds and whose transition-level isotope-overlap / log-SN filters pass are rescored.


Class Documentation

◆ OpenMS::OpenSwathPercolatorScoring::ScoreSummary

struct OpenMS::OpenSwathPercolatorScoring::ScoreSummary

Small execution summary returned by score()

Collaboration diagram for OpenSwathPercolatorScoring::ScoreSummary:
[legend]
Class Members
Size decoy_rows = 0
Size feature_count = 0
Size target_rows = 0
Size total_rows = 0

Member Enumeration Documentation

◆ Level

enum class Level
strong

Supported OpenSWATH scoring levels.

Enumerator
MS1 
MS2 
MS1MS2 
TRANSITION 
SIZE_OF_LEVEL 

Constructor & Destructor Documentation

◆ OpenSwathPercolatorScoring()

◆ ~OpenSwathPercolatorScoring()

Member Function Documentation

◆ score()

ScoreSummary score ( const std::string &  input_path,
Level  level,
const std::string &  output_path = "" 
)

Score an OpenSWATH OSW / OSWPQ file in place or into a copy.

Parameters
[in]input_pathInput .osw SQLite file or .oswpq directory/archive
[in]levelOpenSWATH scoring level to rescore
[in]output_pathOptional output path. If empty, score in place. Non-empty outputs preserve the input container kind (SQLite -> SQLite, directory -> directory, archive -> archive).
Returns
Small execution summary for the rescored rows.
Exceptions
Exception::FileNotFoundif the input file does not exist
Exception::Preconditionif required prerequisite scores are missing
Exception::InvalidValueif no usable feature columns are available

◆ updateMembers_()

void updateMembers_ ( )
overrideprotectedvirtual

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ impl_

std::unique_ptr<Impl> impl_
private

◆ names_of_level

const std::array<std::string, static_cast<Size>(Level::SIZE_OF_LEVEL)> names_of_level
static

String names of the supported scoring levels.