Matrix Science header

ms_umod_specificity.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_specificity.hpp                                              #
00004 # 'msparser' toolkit                                                         #
00005 # Represents 'specificity' object from unimod.xml file                       #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: parser/inc/ms_umod_specificity.hpp $
00012  * @(#)$Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $
00013  * @(#)$Date: 2018-07-30 16:23:53 +0100 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_SPECIFICITY_HPP
00018 #define MS_UMOD_SPECIFICITY_HPP
00019 
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 // forward declarations
00025 namespace msparser_internal {
00026     class ms_umod_xmlloader;
00027 }
00028 
00029 namespace matrix_science {
00030 
00031     class ms_umod_neutralloss; // forward declaration
00032     class ms_quant_specificity; // forward declaration
00033     class ms_umod_configfile;  // forward declaration
00034     class ms_xml_schema; // forward declaration
00035 
00041 
00042     class MS_MASCOTRESFILE_API ms_umod_specificity
00043     {
00044         friend class msparser_internal::ms_umod_xmlloader;
00045         friend class ms_umod_modification;
00046         friend class ms_umod_configfile;
00047 
00048     public:
00050         ms_umod_specificity();
00051 
00053         ms_umod_specificity(const ms_umod_specificity& src);
00054 
00056         ms_umod_specificity(const ms_quant_specificity& src, const ms_umod_configfile& umodFile);
00057 
00059         virtual ~ms_umod_specificity();
00060 
00062         void defaultValues();
00063 
00065         void copyFrom(const ms_umod_specificity* right);
00066 
00068         void copyFrom(const ms_quant_specificity* right, const ms_umod_configfile& umodFile);
00069 
00070 #ifndef SWIG
00071 
00072         ms_umod_specificity& operator=(const ms_umod_specificity& right);
00073 #endif
00074 
00075         virtual std::string getSchemaType() const;
00076 
00078         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00079 
00081         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00082 
00083 
00085         int getNumberOfNeutralLosses() const;
00086 
00088         void clearNeutralLosses();
00089 
00091         void appendNeutralLoss(const ms_umod_neutralloss *nl);
00092 
00094         const ms_umod_neutralloss* getNeutralLoss(const int idx) const;
00095 
00097         bool updateNeutralLoss(const int idx, const ms_umod_neutralloss *nl);
00098 
00100         bool deleteNeutralLoss(const int idx);
00101 
00103         std::string getNeutralLossSchemaType() const;
00104 
00105 
00107         int getNumberOfPepNeutralLosses() const;
00108 
00110         void clearPepNeutralLosses();
00111 
00113         void appendPepNeutralLoss(const ms_umod_neutralloss *pnl);
00114 
00116         const ms_umod_neutralloss* getPepNeutralLoss(const int idx) const;
00117 
00119         bool updatePepNeutralLoss(const int idx, const ms_umod_neutralloss *pnl);
00120 
00122         bool deletePepNeutralLoss(const int idx);
00123 
00125         std::string getPepNeutralLossSchemaType() const;
00126 
00127 
00129         bool haveMiscNotes() const;
00130 
00132         std::string getMiscNotes() const;
00133 
00135         void setMiscNotes(const char* value);
00136 
00138         void dropMiscNotes();
00139 
00141         std::string getMiscNotesSchemaType() const;
00142 
00143 
00145         bool haveHidden() const;
00146 
00148         bool isHidden() const;
00149 
00151         void setHidden(const bool value);
00152 
00154         void dropHidden();
00155 
00157         std::string getHiddenSchemaType() const;
00158 
00159 
00161         bool haveSite() const;
00162 
00164         std::string getSite() const;
00165 
00167         void setSite(const char* value);
00168 
00170         void dropSite();
00171 
00173         std::string getSiteSchemaType() const;
00174 
00175 
00177         bool havePosition() const;
00178 
00180         std::string getPosition() const;
00181 
00183         void setPosition(const char* value);
00184 
00186         void dropPosition();
00187 
00189         std::string getPositionSchemaType() const;
00190 
00191 
00193         bool haveClassification() const;
00194 
00196         std::string getClassification() const;
00197 
00199         void setClassification(const char* value);
00200 
00202         void dropClassification();
00203 
00205         std::string getClassificationSchemaType() const;
00206 
00207 
00209         bool haveSpecGroup() const;
00210 
00212         int getSpecGroup() const;
00213 
00215         void setSpecGroup(const int value);
00216 
00218         void dropSpecGroup();
00219 
00221         std::string getSpecGroupSchemaType() const;
00222 
00224         bool inShortList() const;
00225 
00226         // ! Sets whether this specificity is in the short list on the Mascot search form.
00227         void showInShortList(bool b);
00228 
00230         bool inLongList() const;
00231 
00232         // ! Sets whether this specificity is in the full list on the Mascot search form.
00233         void showInLongList(bool b);
00234 
00235         // ! Indicates if this specificity is included in error tolerant searches.
00236         bool inErrorTolerant() const;
00237 
00238         // ! Sets if this specificity is included in error tolerant searches.
00239         void useInErrorTolerant(bool b);
00240 
00242         bool isSameAs(const ms_umod_specificity& right) const;
00243 
00244     private:
00245 
00246         typedef std::vector< ms_umod_neutralloss* > nl_vector;
00247         nl_vector _neutrallosses;
00248 
00249         typedef std::vector< ms_umod_neutralloss* > pnl_vector;
00250         pnl_vector _pepneutrallosses;
00251 
00252         std::string _miscNotes;
00253         bool _miscNotes_set;
00254 
00255         bool _hidden;
00256         bool _hidden_set;
00257 
00258         std::string _site;
00259         bool _site_set;
00260 
00261         std::string _position;
00262         bool _position_set;
00263 
00264         std::string _classification;
00265         bool _classification_set;
00266 
00267         int _specGroup;
00268         bool _specGroup_set;
00269 
00270         // Not persistent in unimod xml files
00271         bool _show_in_long_list;
00272         bool _use_in_error_tolerant;
00273 
00274     }; // class ms_umod_specificity
00275  // end of config_group
00277 
00278 } // namespace matrix_science
00279 
00280 #endif // MS_UMOD_SPECIFICITY_HPP
00281 
00282 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30