OpenMS
Loading...
Searching...
No Matches
OpenSwathInferenceData.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 <optional>
16#include <vector>
17
18namespace OpenMS
19{
29 enum class InferenceLevel
30 {
32 Peptide,
33 Protein,
34 Gene
35 };
36
43 {
44 Global,
47 };
48
50 inline std::string toString(const InferenceLevel level)
51 {
52 switch (level)
53 {
54 case InferenceLevel::Peptidoform: return "peptidoform";
55 case InferenceLevel::Peptide: return "peptide";
56 case InferenceLevel::Protein: return "protein";
57 case InferenceLevel::Gene: return "gene";
58 }
59 return "";
60 }
61
63 inline std::string toString(const InferenceContext context)
64 {
65 switch (context)
66 {
67 case InferenceContext::Global: return "global";
68 case InferenceContext::ExperimentWide: return "experiment-wide";
69 case InferenceContext::RunSpecific: return "run-specific";
70 }
71 return "";
72 }
73
79 struct OPENMS_DLLAPI IPFPrecursorRow
80 {
81 Int64 feature_id = -1;
82 double ms2_peakgroup_pep = 1.0;
83 std::optional<double> ms1_precursor_pep;
84 std::optional<double> ms2_precursor_pep;
85 };
86
92 struct OPENMS_DLLAPI IPFPrecursorProbabilityRow
93 {
94 Int64 feature_id = -1;
95 double precursor_peakgroup_pep = 1.0;
96 };
97
103 struct OPENMS_DLLAPI IPFTransitionRow
104 {
105 Int64 feature_id = -1;
106 Int64 transition_id = -1;
107 Int64 peptide_id = -1;
108 double pep = 1.0;
109 Int32 bmask = 0;
110 Int32 num_peptidoforms = 0;
111 std::optional<Int64> alignment_group_id;
112 };
113
119 struct OPENMS_DLLAPI IPFAlignmentRow
120 {
121 Int64 alignment_group_id = -1;
122 Int64 feature_id = -1;
123 };
124
130 struct OPENMS_DLLAPI IPFResultRow
131 {
132 Int64 feature_id = -1;
133 Int64 peptide_id = -1;
134 double precursor_peakgroup_pep = 1.0;
135 double qvalue = 1.0;
136 double pep = 1.0;
137 };
138
144 struct OPENMS_DLLAPI LevelContextInputRow
145 {
146 std::optional<Int64> run_id;
147 std::string group_id;
148 Int64 entity_id = -1;
149 bool decoy = false;
150 double score = 0.0;
151 InferenceContext context = InferenceContext::RunSpecific;
152 };
153
159 struct OPENMS_DLLAPI LevelContextResultRow
160 {
161 std::optional<Int64> run_id;
162 Int64 entity_id = -1;
163 InferenceContext context = InferenceContext::RunSpecific;
164 double score = 0.0;
165 double pvalue = 1.0;
166 double qvalue = 1.0;
167 double pep = 1.0;
168 };
169} // namespace OpenMS
int32_t Int32
Signed integer type (32bit)
Definition Types.h:26
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
std::string group_id
Definition OpenSwathInferenceData.h:147
std::optional< Int64 > run_id
Definition OpenSwathInferenceData.h:146
std::optional< double > ms2_precursor_pep
Definition OpenSwathInferenceData.h:84
std::optional< Int64 > alignment_group_id
Definition OpenSwathInferenceData.h:111
std::optional< double > ms1_precursor_pep
Definition OpenSwathInferenceData.h:83
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
@ Peptidoform
Report results on peptidoform-level.
Alignment-group membership for cross-run IPF signal propagation.
Definition OpenSwathInferenceData.h:120
Precursor-layer posterior error probability used by IPF.
Definition OpenSwathInferenceData.h:93
Peak-group and precursor evidence for peptidoform inference.
Definition OpenSwathInferenceData.h:80
Final peptidoform inference result row.
Definition OpenSwathInferenceData.h:131
Transition-layer evidence for peptidoform inference.
Definition OpenSwathInferenceData.h:104
Compact level-context input row independent of file format.
Definition OpenSwathInferenceData.h:145
Final level-context result row.
Definition OpenSwathInferenceData.h:160
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::string toString(const OpenSwathExportFileFormat format)
Definition OpenSwathExportData.h:71