OpenMS
Loading...
Searching...
No Matches
OpenSwathPeptidoformInference.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 $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13#include <OpenMS/config.h>
14
15#include <vector>
16
17namespace OpenMS
18{
29 {
30 public:
43 {
44 Int64 feature_id = -1;
45 Int64 hypothesis = -1;
46 double prior = 0.0;
47 double evidence = 0.0;
48 };
49
59 {
60 Int64 feature_id = -1;
61 Int64 hypothesis = -1;
62 double posterior = 0.0;
63 };
64
75 static std::vector<double> computeModelFDR(const std::vector<double>& pep_values);
76
86 static std::vector<BayesianModelRow> preparePrecursorBM(const std::vector<IPFPrecursorRow>& rows);
87
98 static std::vector<PosteriorRow> applyBM(const std::vector<BayesianModelRow>& rows);
99
111 std::vector<IPFPrecursorProbabilityRow> precursorInference(const std::vector<IPFPrecursorRow>& precursor_rows,
112 const PeptidoformInferenceConfig& config) const;
113
124 std::vector<IPFResultRow> infer(const std::vector<IPFPrecursorRow>& precursor_rows,
125 const std::vector<IPFTransitionRow>& transition_rows,
126 const std::vector<IPFAlignmentRow>& alignment_rows,
127 const PeptidoformInferenceConfig& config) const;
128 };
129} // namespace OpenMS
OpenSwath inference of peptidoforms (IPF).
Definition OpenSwathPeptidoformInference.h:29
static std::vector< PosteriorRow > applyBM(const std::vector< BayesianModelRow > &rows)
Apply a compact Bayesian model and return posterior probabilities.
std::vector< IPFPrecursorProbabilityRow > precursorInference(const std::vector< IPFPrecursorRow > &precursor_rows, const PeptidoformInferenceConfig &config) const
Perform precursor-layer inference and return precursor peakgroup PEPs.
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.
static std::vector< double > computeModelFDR(const std::vector< double > &pep_values)
Compute model FDR/q-values from posterior error probabilities.
static std::vector< BayesianModelRow > preparePrecursorBM(const std::vector< IPFPrecursorRow > &rows)
Build precursor-layer Bayesian model rows.
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
Compact Bayesian model row used by the public helper methods.
Definition OpenSwathPeptidoformInference.h:43
Posterior probability row returned by applyBM.
Definition OpenSwathPeptidoformInference.h:59
Configuration for peptidoform inference.
Definition OpenSwathInferenceConfig.h:60
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19