Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_quant_method.hpp
1/*
2##############################################################################
3# file: ms_quant_method.hpp #
4# 'msparser' toolkit #
5# Encapsulates method-element from "quantitation.xml"-file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2006 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_quant_method.hpp $
12 * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $
13 * @(#)$Date: 2018-07-30 16:23:53 +0100 $
14##############################################################################
15 */
16
17#ifndef MS_QUANT_METHOD_HPP
18#define MS_QUANT_METHOD_HPP
19
20
21#include <string>
22#include <vector>
23
24// forward declarations
25namespace msparser_internal {
26 class ms_quant_xmlloader;
27 class ms_quant_method_impl;
28 class ms_quant_configfile_impl;
29}
30
31namespace matrix_science {
32
33 class ms_quant_modgroup; // forward declaration
34 class ms_quant_component; // forward declaration
35 class ms_quant_quality; // forward declaration
36 class ms_quant_integration; // forward delcaration
37 class ms_quant_outliers; // forward declaration
38 class ms_quant_normalisation; // forward declaration
39 class ms_quant_protocol; // forward declaration
40 class ms_quant_ratio; // forward declaration
41 class ms_xml_schema; // forward declaration
42 class ms_quant_localdef; // forward declaration
43
50 class MS_MASCOTRESFILE_API ms_quant_method: public ms_xml_IValidatable
51 {
52 friend class msparser_internal::ms_quant_xmlloader;
53 friend class msparser_internal::ms_quant_configfile_impl;
54
55 public:
57
77 COMPATIBLE_DIFF_NUM_ISOTOPES
78 };
79
82
85
87 virtual ~ms_quant_method();
88
90 void defaultValues();
91
93 void copyFrom(const ms_quant_method* right);
94
95#ifndef SWIG
97 ms_quant_method& operator=(const ms_quant_method& right);
98#endif
100 virtual std::string getSchemaType() const;
101
103 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
104
106 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
107
108
110 int getNumberOfModificationGroups() const;
111
113 void clearModificationGroups();
114
116 void appendModificationGroup(const ms_quant_modgroup *item);
117
119 const ms_quant_modgroup * getModificationGroupByNumber(const int idx) const;
120
122 const ms_quant_modgroup * getModificationGroupByName(const char *name) const;
123
125 bool updateModificationGroupByNumber(const int idx, const ms_quant_modgroup* modgroup);
126
128 bool updateModificationGroupByName(const char *name, const ms_quant_modgroup* modgroup);
129
131 bool deleteModificationGroupByNumber(const int idx);
132
134 bool deleteModificationGroupByName(const char *name);
135
137 std::string getModificationGroupSchemaType() const;
138
140 void getLocalModifications(std::vector<const ms_quant_localdef *> &localDefVector);
141
143 int getNumberOfComponents() const;
144
146 void clearComponents();
147
149 void appendComponent(const ms_quant_component *item);
150
152 const ms_quant_component * getComponentByNumber(const int idx) const;
153
155 const ms_quant_component * getComponentByName(const char *name) const;
156
158 bool updateComponentByNumber(const int idx, const ms_quant_component* comp);
159
161 bool updateComponentByName(const char *name, const ms_quant_component* comp);
162
164 bool deleteComponentByNumber(const int idx);
165
167 bool deleteComponentByName(const char *name);
168
170 std::string getComponentSchemaType() const;
171
172
174 int getNumberOfReportRatios() const;
175
177 void clearReportRatios();
178
180 void appendReportRatio(const ms_quant_ratio *ratio);
181
183 const ms_quant_ratio * getReportRatioByNumber(const int idx) const;
184
186 const ms_quant_ratio * getReportRatioByName(const char *name) const;
187
189 bool updateReportRatioByNumber(const int idx, const ms_quant_ratio* ratio);
190
192 bool updateReportRatioByName(const char *name, const ms_quant_ratio* ratio);
193
195 bool deleteReportRatioByNumber(const int idx);
196
198 bool deleteReportRatioByName(const char *name);
199
201 std::string getReportRatioSchemaType() const;
202
203
205 int getNumberOfExclusions() const;
206
208 void clearExclusions();
209
211 void appendExclusion(const char* exclusion);
212
214 std::string getExclusion(const int idx) const;
215
217 bool updateExclusion(const int idx, const char* exclusion);
218
220 bool deleteExclusion(const int idx);
221
223 std::string getExclusionSchemaType() const;
224
225
227 int getNumberOfSeqs() const;
228
230 void clearSeqs();
231
233 void appendSeq(const char* seq);
234
236 std::string getSeq(const int idx) const;
237
239 bool updateSeq(const int idx, const char* seq);
240
242 bool deleteSeq(const int idx);
243
245 std::string getSeqSchemaType() const;
246
247
249 bool haveComp() const;
250
252 std::string getComp() const;
253
255 void setComp(const char* value);
256
258 void dropComp();
259
261 std::string getCompSchemaType() const;
262
263
265 bool haveQuality() const;
266
268 const ms_quant_quality* getQuality() const;
269
271 void setQuality(const ms_quant_quality* quality);
272
274 void dropQuality();
275
277 std::string getQualitySchemaType() const;
278
279
281 bool haveIntegration() const;
282
284 const ms_quant_integration* getIntegration() const;
285
287 void setIntegration(const ms_quant_integration* integration);
288
290 void dropIntegration();
291
293 std::string getIntegrationSchemaType() const;
294
295
297 bool haveOutliers() const;
298
300 const ms_quant_outliers* getOutliers() const;
301
303 void setOutliers(const ms_quant_outliers* outliers);
304
306 void dropOutliers();
307
309 std::string getOutliersSchemaType() const;
310
311
313 bool haveNormalisation() const;
314
316 const ms_quant_normalisation* getNormalisation() const;
317
319 void setNormalisation(const ms_quant_normalisation* normalisation);
320
322 void dropNormalisation();
323
325 std::string getNormalisationSchemaType() const;
326
327
329 bool haveProtocol() const;
330
332 const ms_quant_protocol* getProtocol() const;
333
335 void setProtocol(const ms_quant_protocol* protocol);
336
338 void dropProtocol();
339
341 std::string getProtocolSchemaType() const;
342
343
345 bool haveName() const;
346
348 std::string getName() const;
349
351 void setName(const char* value);
352
354 void dropName();
355
357 std::string getNameSchemaType() const;
358
359
361 bool haveDescription() const;
362
364 std::string getDescription() const;
365
367 void setDescription(const char* value);
368
370 void dropDescription();
371
373 std::string getDescriptionSchemaType() const;
374
375
377 bool haveConstrainSearch() const;
378
380 bool isConstrainSearch() const;
381
383 void setConstrainSearch(const bool value);
384
386 void dropConstrainSearch();
387
389 std::string getConstrainSearchSchemaType() const;
390
391
393 bool haveProteinRatioType() const;
394
396 std::string getProteinRatioType() const;
397
399 void setProteinRatioType(const char* value);
400
402 void dropProteinRatioType();
403
405 std::string getProteinRatioTypeSchemaType() const;
406
407
409 bool haveReportDetail() const;
410
412 bool isReportDetail() const;
413
415 void setReportDetail(const bool value);
416
418 void dropReportDetail();
419
421 std::string getReportDetailSchemaType() const;
422
423
425 bool haveMinNumPeptides() const;
426
428 int getMinNumPeptides() const;
429
431 void setMinNumPeptides(const int value);
432
434 void dropMinNumPeptides();
435
437 std::string getMinNumPeptidesSchemaType() const;
438
439
441 bool haveProtScoreType() const;
442
444 std::string getProtScoreType() const;
445
447 void setProtScoreType(const char* value);
448
450 void dropProtScoreType();
451
453 std::string getProtScoreTypeSchemaType() const;
454
455
457 bool haveSigThresholdValue() const;
458
460 std::string getSigThresholdValue() const;
461
463 void setSigThresholdValue(const char* value);
464
466 void dropSigThresholdValue();
467
469 std::string getSigThresholdValueSchemaType() const;
470
471
473 bool haveShowSubSets() const;
474
476 std::string getShowSubSets() const;
477
479 void setShowSubSets(const char* value);
480
482 void dropShowSubSets();
483
485 std::string getShowSubSetsSchemaType() const;
486
487
489 bool haveRequireBoldRed() const;
490
492 bool isRequireBoldRed() const;
493
495 void setRequireBoldRed(const bool value);
496
498 void dropRequireBoldRed();
499
501 std::string getRequireBoldRedSchemaType() const;
502#ifndef SWIG
504 int isMethodCompatible(const ms_quant_method &other, std::string & reasonStrRef) const;
505#else // SWIG Multiple return values
506 int isMethodCompatible(const ms_quant_method &other, std::string & OUTPUT) const;
507#endif
508 private:
509 msparser_internal::ms_quant_method_impl * m_pImpl;
510 }; // class ms_quant_method
511 // end of config_group
513
514} // namespace matrix_science
515
516#endif // MS_QUANT_METHOD_HPP
517
518/*------------------------------- End of File -------------------------------*/
519
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
An object of this class represent a single integration element in quantitation.xml.
Definition: ms_quant_integration.hpp:46
An object of this class represent a single quantitation method from quantitation.xml.
Definition: ms_quant_method.hpp:51
METHOD_COMPATIBLE
Enum used by isMethodCompatible()
Definition: ms_quant_method.hpp:63
@ COMPATIBLE_DIFF_NUM_LOCAL_MODS
Methods 'x' and 'y' are incompatible: Different number of local modification definitions ('mg1' and '...
Definition: ms_quant_method.hpp:70
@ COMPATIBLE_MISSING_INTEGRATION
Methods 'x' and 'y' are incompatible: One method has integration parameters and the other has none.
Definition: ms_quant_method.hpp:74
@ COMPATIBLE_MISSING_INTEGRATION_PARAM
Methods 'x' and 'y' are incompatible: "Method 'x' has integration parameter 'p' but method 'y' does n...
Definition: ms_quant_method.hpp:75
@ COMPATIBLE_DIFF_NUM_COMPONENTS
Methods 'x' and 'y' are incompatible: Different number of components ('c1' and 'c2').
Definition: ms_quant_method.hpp:66
@ COMPATIBLE_MISSING_MOD
Methods 'x' and 'y' are incompatible: Modification 'mod' is missing from modification group 'mg'.
Definition: ms_quant_method.hpp:73
@ COMPATIBLE_MISSING_COMPONENT
Methods 'x' and 'y' are incompatible: Component 'c1' is missing from method 'y'.
Definition: ms_quant_method.hpp:67
@ COMPATIBLE_DIFF_NUM_MODS
Methods 'x' and 'y' are incompatible: Different number of modifications ('mg1' and 'mg2') for modific...
Definition: ms_quant_method.hpp:72
@ COMPATIBLE_DIFF_PROTOCOL
Methods 'x' and 'y' are incompatible: Different protocols ('p1' and 'p2') for the methods.
Definition: ms_quant_method.hpp:65
@ COMPATIBLE
Methods are compatible.
Definition: ms_quant_method.hpp:64
@ COMPATIBLE_DIFF_LOCAL_MOD
Methods 'x' and 'y' are incompatible: Local modification 'lm' definition differs.
Definition: ms_quant_method.hpp:71
@ COMPATIBLE_DIFF_NUM_MOD_GROUPS
Methods 'x' and 'y' are incompatible: Different number of modification groups ('mg1' and 'mg2') for c...
Definition: ms_quant_method.hpp:68
@ COMPATIBLE_MISSING_MOD_GROUP
Methods 'x' and 'y' are incompatible: Modification group mg is missing from component 'c'.
Definition: ms_quant_method.hpp:69
@ COMPATIBLE_DIFF_INTEGRATION_PARAM
Methods 'x' and 'y' are incompatible: Method 'x' has integration parameter 'p1'='v1' but method 'y' h...
Definition: ms_quant_method.hpp:76
An object of this class represent a single modification group element in quantitation....
Definition: ms_quant_modgroup.hpp:46
An object of this class represent a single normalisation element in quantitation.xml.
Definition: ms_quant_normalisation.hpp:42
An object of this class represent a single OUTLIERS element in quantitation.xml.
Definition: ms_quant_outliers.hpp:44
An object of this class represent a protocol element in quantitation.xml.
Definition: ms_quant_protocol.hpp:55
An object of this class represent a single quality element in quantitation.xml.
Definition: ms_quant_quality.hpp:40
Represents the ratioType type for the report_ratio element in quantitation.xml.
Definition: ms_quant_ratio.hpp:41