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

OpenSwath inference of peptidoforms (IPF). More...

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

Classes

struct  BayesianModelRow
 Compact Bayesian model row used by the public helper methods. More...
 
struct  PosteriorRow
 Posterior probability row returned by applyBM. More...
 

Public Member Functions

std::vector< IPFPrecursorProbabilityRowprecursorInference (const std::vector< IPFPrecursorRow > &precursor_rows, const PeptidoformInferenceConfig &config) const
 Perform precursor-layer inference and return precursor peakgroup PEPs.
 
std::vector< IPFResultRowinfer (const std::vector< IPFPrecursorRow > &precursor_rows, const std::vector< IPFTransitionRow > &transition_rows, const std::vector< IPFAlignmentRow > &alignment_rows, const PeptidoformInferenceConfig &config) const
 Perform complete peptidoform inference.
 

Static Public Member Functions

static std::vector< double > computeModelFDR (const std::vector< double > &pep_values)
 Compute model FDR/q-values from posterior error probabilities.
 
static std::vector< BayesianModelRowpreparePrecursorBM (const std::vector< IPFPrecursorRow > &rows)
 Build precursor-layer Bayesian model rows.
 
static std::vector< PosteriorRowapplyBM (const std::vector< BayesianModelRow > &rows)
 Apply a compact Bayesian model and return posterior probabilities.
 

Detailed Description

OpenSwath inference of peptidoforms (IPF).

This class is file-format agnostic and works only on compact typed rows.

See: Rosenberger, G., Liu, Y., Röst, H. et al. Inference and quantification of peptidoforms in large sample cohorts by SWATH-MS. Nat Biotechnol 35, 781–788 (2017). https://doi.org/10.1038/nbt.3908

Member Function Documentation

◆ applyBM()

static std::vector< PosteriorRow > applyBM ( const std::vector< BayesianModelRow > &  rows)
static

Apply a compact Bayesian model and return posterior probabilities.

Rows are grouped by feature and hypothesis. Within each group, evidence values are multiplied and the smallest prior in the group is retained, matching the PyProphet implementation being ported.

Parameters
rowsBayesian-model rows
Returns
Posterior probabilities per feature/hypothesis pair

◆ computeModelFDR()

static std::vector< double > computeModelFDR ( const std::vector< double > &  pep_values)
static

Compute model FDR/q-values from posterior error probabilities.

This reuses OpenMS multiple-testing utilities and follows the PyProphet IPF convention of computing model FDR from sorted PEP values with maximum-rank tie handling.

Parameters
pep_valuesPosterior error probabilities for one model-FDR family
Returns
Model FDR / q-values in the original input order

◆ infer()

std::vector< IPFResultRow > infer ( const std::vector< IPFPrecursorRow > &  precursor_rows,
const std::vector< IPFTransitionRow > &  transition_rows,
const std::vector< IPFAlignmentRow > &  alignment_rows,
const PeptidoformInferenceConfig config 
) const

Perform complete peptidoform inference.

Parameters
precursor_rowsPeakgroup/precursor evidence
transition_rowsTransition-level evidence
alignment_rowsOptional alignment-group memberships for across-run propagation
configIPF configuration
Returns
Final IPF result rows without the H0 hypothesis

◆ precursorInference()

std::vector< IPFPrecursorProbabilityRow > precursorInference ( const std::vector< IPFPrecursorRow > &  precursor_rows,
const PeptidoformInferenceConfig config 
) const

Perform precursor-layer inference and return precursor peakgroup PEPs.

This step combines peakgroup evidence with optional MS1/MS2 precursor evidence. The returned precursor peakgroup PEP is then used as the prior for the transition/peptidoform layer.

Parameters
precursor_rowsPeakgroup/precursor evidence rows
configIPF configuration
Returns
One precursor peakgroup PEP per retained feature

◆ preparePrecursorBM()

static std::vector< BayesianModelRow > preparePrecursorBM ( const std::vector< IPFPrecursorRow > &  rows)
static

Build precursor-layer Bayesian model rows.

For each feature this emits rows for the true (1) and false (0) precursor hypotheses using the configured MS1/MS2 precursor evidence.

Parameters
rowsPeakgroup and optional precursor-evidence rows
Returns
Bayesian-model rows for precursor inference