Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_umod_specificity.hpp
1/*
2##############################################################################
3# file: ms_umod_specificity.hpp #
4# 'msparser' toolkit #
5# Represents 'specificity' object from unimod.xml file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2006 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11 * @(#)$Source: parser/inc/ms_umod_specificity.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_UMOD_SPECIFICITY_HPP
18#define MS_UMOD_SPECIFICITY_HPP
19
20
21#include <string>
22#include <vector>
23
24// forward declarations
25namespace msparser_internal {
26 class ms_umod_xmlloader;
27}
28
29namespace matrix_science {
30
31 class ms_umod_neutralloss; // forward declaration
32 class ms_quant_specificity; // forward declaration
33 class ms_umod_configfile; // forward declaration
34 class ms_xml_schema; // forward declaration
35
42 class MS_MASCOTRESFILE_API ms_umod_specificity
43 {
44 friend class msparser_internal::ms_umod_xmlloader;
45 friend class ms_umod_modification;
46 friend class ms_umod_configfile;
47
48 public:
51
54
57
59 virtual ~ms_umod_specificity();
60
62 void defaultValues();
63
65 void copyFrom(const ms_umod_specificity* right);
66
68 void copyFrom(const ms_quant_specificity* right, const ms_umod_configfile& umodFile);
69
70#ifndef SWIG
72 ms_umod_specificity& operator=(const ms_umod_specificity& right);
73#endif
75 virtual std::string getSchemaType() const;
76
78 virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
79
81 virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
82
83
85 int getNumberOfNeutralLosses() const;
86
88 void clearNeutralLosses();
89
91 void appendNeutralLoss(const ms_umod_neutralloss *nl);
92
94 const ms_umod_neutralloss* getNeutralLoss(const int idx) const;
95
97 bool updateNeutralLoss(const int idx, const ms_umod_neutralloss *nl);
98
100 bool deleteNeutralLoss(const int idx);
101
103 std::string getNeutralLossSchemaType() const;
104
105
107 int getNumberOfPepNeutralLosses() const;
108
110 void clearPepNeutralLosses();
111
113 void appendPepNeutralLoss(const ms_umod_neutralloss *pnl);
114
116 const ms_umod_neutralloss* getPepNeutralLoss(const int idx) const;
117
119 bool updatePepNeutralLoss(const int idx, const ms_umod_neutralloss *pnl);
120
122 bool deletePepNeutralLoss(const int idx);
123
125 std::string getPepNeutralLossSchemaType() const;
126
127
129 bool haveMiscNotes() const;
130
132 std::string getMiscNotes() const;
133
135 void setMiscNotes(const char* value);
136
138 void dropMiscNotes();
139
141 std::string getMiscNotesSchemaType() const;
142
143
145 bool haveHidden() const;
146
148 bool isHidden() const;
149
151 void setHidden(const bool value);
152
154 void dropHidden();
155
157 std::string getHiddenSchemaType() const;
158
159
161 bool haveSite() const;
162
164 std::string getSite() const;
165
167 void setSite(const char* value);
168
170 void dropSite();
171
173 std::string getSiteSchemaType() const;
174
175
177 bool havePosition() const;
178
180 std::string getPosition() const;
181
183 void setPosition(const char* value);
184
186 void dropPosition();
187
189 std::string getPositionSchemaType() const;
190
191
193 bool haveClassification() const;
194
196 std::string getClassification() const;
197
199 void setClassification(const char* value);
200
202 void dropClassification();
203
205 std::string getClassificationSchemaType() const;
206
207
209 bool haveSpecGroup() const;
210
212 int getSpecGroup() const;
213
215 void setSpecGroup(const int value);
216
218 void dropSpecGroup();
219
221 std::string getSpecGroupSchemaType() const;
222
224 bool inShortList() const;
225
226 // ! Sets whether this specificity is in the short list on the Mascot search form.
227 void showInShortList(bool b);
228
230 bool inLongList() const;
231
232 // ! Sets whether this specificity is in the full list on the Mascot search form.
233 void showInLongList(bool b);
234
235 // ! Indicates if this specificity is included in error tolerant searches.
236 bool inErrorTolerant() const;
237
238 // ! Sets if this specificity is included in error tolerant searches.
239 void useInErrorTolerant(bool b);
240
242 bool isSameAs(const ms_umod_specificity& right) const;
243
244 private:
245
246 typedef std::vector< ms_umod_neutralloss* > nl_vector;
247 nl_vector _neutrallosses;
248
249 typedef std::vector< ms_umod_neutralloss* > pnl_vector;
250 pnl_vector _pepneutrallosses;
251
252 std::string _miscNotes;
253 bool _miscNotes_set;
254
255 bool _hidden;
256 bool _hidden_set;
257
258 std::string _site;
259 bool _site_set;
260
261 std::string _position;
262 bool _position_set;
263
264 std::string _classification;
265 bool _classification_set;
266
267 int _specGroup;
268 bool _specGroup_set;
269
270 // Not persistent in unimod xml files
271 bool _show_in_long_list;
272 bool _use_in_error_tolerant;
273
274 }; // class ms_umod_specificity
275 // end of config_group
277
278} // namespace matrix_science
279
280#endif // MS_UMOD_SPECIFICITY_HPP
281
282/*------------------------------- End of File -------------------------------*/
Describes a specificity element in quantitation.xml (Unimod style specificity).
Definition: ms_quant_specificity.hpp:45
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54
Represents a modif object in unimod.xml.
Definition: ms_umod_modification.hpp:47
Represents NeutralLoss and PepNeutralLoss objects in unimod.xml.
Definition: ms_umod_neutralloss.hpp:48
Represents modification specificity objects in unimod.xml.
Definition: ms_umod_specificity.hpp:43