Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_protein_quant_ratio.hpp
1/*
2##############################################################################
3# file: ms_protein_quant_ratio.hpp #
4# 'msparser' toolkit #
5# Protein ratio for relative quantitation, estimated from peptide ratios #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2013 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Author: villek@matrixscience.com $ #
12# $Date: 2018-07-30 16:23:53 +0100 $ #
13# $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
14# $NoKeywords:: $ #
15##############################################################################
16*/
17
18#ifndef MS_PROTEIN_QUANT_RATIO_HPP
19#define MS_PROTEIN_QUANT_RATIO_HPP
20
21
22// Includes from the standard template library
23#include <string>
24#include <map>
25
26namespace matrix_science {
27 class ms_peptide_quant_key;
28 class ms_peptide_quant_key_vector;
29
36
71 class MS_MASCOTRESFILE_API ms_protein_quant_ratio
72 {
73 friend class ms_quantitation;
74 friend class ms_ms1quantitation;
75 friend class ms_ms2quantitation;
76 friend class ms_customquantitation;
77
78 public:
81 ms_protein_quant_ratio(const std::string &accession, int dbIdx, const std::string &ratioName);
82
85 ms_protein_quant_ratio(const std::string &accession, int dbIdx, const std::string &ratioName, double value, double stdev, double stderror, double hypothesisPvalue, double normalityPvalue, unsigned int sampleSize);
86
89
92
93#ifndef SWIG
95 ms_protein_quant_ratio& operator=(const ms_protein_quant_ratio& right);
96
98 bool operator==(const ms_protein_quant_ratio& right) const;
99
101 bool operator!=(const ms_protein_quant_ratio& right) const;
102#endif
104 void copyFrom(const ms_protein_quant_ratio* src);
105
107 bool isMissing() const;
108
110 std::string getAccession() const;
111
113 int getDB() const;
114
116 std::string getRatioName() const;
117
119 double getValue() const;
120
122 unsigned int getSampleSize() const;
123
125 double getStandardDeviation() const;
126
128 double getStandardDeviation(std::string &whyUnavailable) const;
129
131 double getStandardError() const;
132
134 double getStandardError(std::string &whyUnavailable) const;
135
137 ms_peptide_quant_key_vector getActiveKeys() const;
138
140 ms_peptide_quant_key_vector getSkippedKeys() const;
141
143 ms_peptide_quant_key_vector getOutlierKeys() const;
144
146 ms_peptide_quant_key_vector getExcludedKeys() const;
147
149 double getHypothesisPvalue() const;
150
152 double getHypothesisPvalue(std::string &whyUnavailable) const;
153
155 bool isSignificant(double threshold = 0.05) const;
156
158 double getNormalityPvalue() const;
159
161 double getNormalityPvalue(std::string &whyUnavailable) const;
162
164 bool isLogNormal(double threshold = 0.05) const;
165
167 static ms_protein_quant_ratio fromSerialisedString(const std::string &serialisedStr);
168
170 std::string serialise() const;
171
173 static std::string serialisationFormatVersion();
174
175 private:
176 enum PEPQUANTKEY_STATE {
177 PEPQUANTKEY_SKIPPED = 0x0001,
178 PEPQUANTKEY_OUTLIER = 0x0002,
179 PEPQUANTKEY_EXCLUDED = 0x0004
180 };
181
182 enum REASON_WHY_UNAVAILABLE {
183 REASON_NOT_UNAVAILABLE = 0,
184 REASON_MISSING_RATIO = 1,
185 REASON_TYPE_WEIGHTED = 2
186 };
187
188 static std::string lookupWhyUnavailable(int reason);
189
190//Warning 325: Nested struct not currently supported
191#ifndef SWIG
192 typedef struct { int why; const char *str; } reason_why_t;
193 static const reason_why_t reason_why_db[];
194#endif
197 ms_protein_quant_ratio(const std::string &accession, int dbIdx, const std::string &ratioName, double value, double stdev, double stderror, double hypothesisPvalue, double normalityPvalue, const std::vector<ms_peptide_quant_key> &activeKeys, const std::map<ms_peptide_quant_key, int> &inactiveKeys);
198
199 ms_peptide_quant_key_vector collectKeys(int type) const;
200
201 bool isMissing_;
202
203 std::string accession_;
204 int dbIdx_;
205 std::string ratioName_;
206
207 double value_;
208
209 double stdev_;
210 double stderror_;
211 int whyStdevUnavailable_;
212
213 double hypothesisPvalue_;
214 int whyHypothesisPUnavailable_;
215
216 double normalityPvalue_;
217 int whyNormalityPUnavailable_;
218
219 unsigned int sampleSize_;
220
221 std::vector<ms_peptide_quant_key> activeKeys_;
222 std::map<ms_peptide_quant_key, int> inactiveKeys_;
223 }; // end of quantitation_group
225} // matrix_science namespace
226
227#endif // MS_PROTEIN_QUANT_RATIO_HPP
228
229/*------------------------------- End of File -------------------------------*/
Peptide and protein quantitation using custom peptide ratios and protein-peptide mappings.
Definition: ms_customquantitation.hpp:119
The result of quantitation calculations applied to peptide summary.
Definition: ms_ms1quantitation.hpp:92
Peptide and protein quantitation in a Reporter or Multiplex Mascot results file.
Definition: ms_ms2quantitation.hpp:127
A vector of peptide quant keys.
Definition: ms_peptide_quant_key_vector.hpp:47
Protein abundance in one component relative to another in a quantitation experiment,...
Definition: ms_protein_quant_ratio.hpp:72
Base class for peptide and protein quantitation.
Definition: ms_quantitation.hpp:138