Matrix Science header

ms_quant_method.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_method.hpp                                                  #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates method-element from "quantitation.xml"-file                 #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: /vol/cvsroot/parser/inc/ms_quant_method.hpp,v $
00012  * @(#)$Revision: 1.16 $
00013  * @(#)$Date: 2015/07/31 15:48:07 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_QUANT_METHOD_HPP
00018 #define MS_QUANT_METHOD_HPP
00019 
00020 #ifdef _WIN32
00021 #pragma warning(disable:4251)   // Don't want all classes to be exported
00022 #pragma warning(disable:4786)   // Debug symbols too long
00023 #   ifndef _MATRIX_USE_STATIC_LIB
00024 #       ifdef MS_MASCOTRESFILE_EXPORTS
00025 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00026 #       else
00027 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00028 #       endif
00029 #   else
00030 #       define MS_MASCOTRESFILE_API
00031 #   endif
00032 #else
00033 #   define MS_MASCOTRESFILE_API
00034 #endif
00035 
00036 #include <string>
00037 #include <vector>
00038 
00039 // forward declarations
00040 namespace msparser_internal {
00041     class ms_quant_xmlloader;
00042     class ms_quant_method_impl;
00043     class ms_quant_configfile_impl;
00044 }
00045 
00046 namespace matrix_science {
00047 
00048     class ms_quant_modgroup; // forward declaration
00049     class ms_quant_component; // forward declaration
00050     class ms_quant_quality; // forward declaration
00051     class ms_quant_integration; // forward delcaration
00052     class ms_quant_outliers; // forward declaration
00053     class ms_quant_normalisation; // forward declaration
00054     class ms_quant_protocol; // forward declaration
00055     class ms_quant_ratio; // forward declaration
00056     class ms_xml_schema; // forward declaration
00057     class ms_quant_localdef; // forward declaration
00058 
00064 
00065     class MS_MASCOTRESFILE_API ms_quant_method: public ms_xml_IValidatable
00066     {
00067         friend class msparser_internal::ms_quant_xmlloader;
00068         friend class msparser_internal::ms_quant_configfile_impl;
00069 
00070     public:
00072 
00078         enum METHOD_COMPATIBLE{
00079             COMPATIBLE,                             
00080             COMPATIBLE_DIFF_PROTOCOL,               
00081             COMPATIBLE_DIFF_NUM_COMPONENTS,         
00082             COMPATIBLE_MISSING_COMPONENT,           
00083             COMPATIBLE_DIFF_NUM_MOD_GROUPS,         
00084             COMPATIBLE_MISSING_MOD_GROUP,           
00085             COMPATIBLE_DIFF_NUM_LOCAL_MODS,         
00086             COMPATIBLE_DIFF_LOCAL_MOD,              
00087             COMPATIBLE_DIFF_NUM_MODS,               
00088             COMPATIBLE_MISSING_MOD,                 
00089             COMPATIBLE_MISSING_INTEGRATION,         
00090             COMPATIBLE_MISSING_INTEGRATION_PARAM,   
00091             COMPATIBLE_DIFF_INTEGRATION_PARAM,      
00092             COMPATIBLE_DIFF_NUM_ISOTOPES            
00093         };
00094 
00096         ms_quant_method();
00097 
00099         ms_quant_method(const ms_quant_method& src);
00100 
00102         virtual ~ms_quant_method();
00103 
00105         void defaultValues();
00106 
00108         void copyFrom(const ms_quant_method* right);
00109 
00110 #ifndef SWIG
00111 
00112         ms_quant_method& operator=(const ms_quant_method& right);
00113 #endif
00114 
00115         virtual std::string getSchemaType() const;
00116 
00118         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00119 
00121         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00122 
00123 
00125         int getNumberOfModificationGroups() const;
00126 
00128         void clearModificationGroups();
00129 
00131         void appendModificationGroup(const ms_quant_modgroup *item);
00132 
00134         const ms_quant_modgroup * getModificationGroupByNumber(const int idx) const;
00135 
00137         const ms_quant_modgroup * getModificationGroupByName(const char *name) const;
00138 
00140         bool updateModificationGroupByNumber(const int idx, const ms_quant_modgroup* modgroup);
00141 
00143         bool updateModificationGroupByName(const char *name, const ms_quant_modgroup* modgroup);
00144 
00146         bool deleteModificationGroupByNumber(const int idx);
00147 
00149         bool deleteModificationGroupByName(const char *name);
00150 
00152         std::string getModificationGroupSchemaType() const;
00153 
00155         void getLocalModifications(std::vector<const ms_quant_localdef *> &localDefVector);
00156 
00158         int getNumberOfComponents() const;
00159 
00161         void clearComponents();
00162 
00164         void appendComponent(const ms_quant_component *item);
00165 
00167         const ms_quant_component * getComponentByNumber(const int idx) const;
00168 
00170         const ms_quant_component * getComponentByName(const char *name) const;
00171 
00173         bool updateComponentByNumber(const int idx, const ms_quant_component* comp);
00174 
00176         bool updateComponentByName(const char *name, const ms_quant_component* comp);
00177 
00179         bool deleteComponentByNumber(const int idx);
00180 
00182         bool deleteComponentByName(const char *name);
00183 
00185         std::string getComponentSchemaType() const;
00186 
00187 
00189         int getNumberOfReportRatios() const;
00190 
00192         void clearReportRatios();
00193 
00195         void appendReportRatio(const ms_quant_ratio *ratio);
00196 
00198         const ms_quant_ratio * getReportRatioByNumber(const int idx) const;
00199 
00201         const ms_quant_ratio * getReportRatioByName(const char *name) const;
00202 
00204         bool updateReportRatioByNumber(const int idx, const ms_quant_ratio* ratio);
00205 
00207         bool updateReportRatioByName(const char *name, const ms_quant_ratio* ratio);
00208 
00210         bool deleteReportRatioByNumber(const int idx);
00211 
00213         bool deleteReportRatioByName(const char *name);
00214 
00216         std::string getReportRatioSchemaType() const;
00217 
00218 
00220         int getNumberOfExclusions() const;
00221 
00223         void clearExclusions();
00224 
00226         void appendExclusion(const char* exclusion);
00227 
00229         std::string getExclusion(const int idx) const;
00230 
00232         bool updateExclusion(const int idx, const char* exclusion);
00233 
00235         bool deleteExclusion(const int idx);
00236 
00238         std::string getExclusionSchemaType() const;
00239 
00240 
00242         int getNumberOfSeqs() const;
00243 
00245         void clearSeqs();
00246 
00248         void appendSeq(const char* seq);
00249 
00251         std::string getSeq(const int idx) const;
00252 
00254         bool updateSeq(const int idx, const char* seq);
00255 
00257         bool deleteSeq(const int idx);
00258 
00260         std::string getSeqSchemaType() const;
00261 
00262 
00264         bool haveComp() const;
00265 
00267         std::string getComp() const;
00268 
00270         void setComp(const char* value);
00271 
00273         void dropComp();
00274 
00276         std::string getCompSchemaType() const;
00277 
00278 
00280         bool haveQuality() const;
00281 
00283         const ms_quant_quality* getQuality() const;
00284 
00286         void setQuality(const ms_quant_quality* quality);
00287 
00289         void dropQuality();
00290 
00292         std::string getQualitySchemaType() const;
00293 
00294 
00296         bool haveIntegration() const;
00297 
00299         const ms_quant_integration* getIntegration() const;
00300 
00302         void setIntegration(const ms_quant_integration* integration);
00303 
00305         void dropIntegration();
00306 
00308         std::string getIntegrationSchemaType() const;
00309 
00310 
00312         bool haveOutliers() const;
00313 
00315         const ms_quant_outliers* getOutliers() const;
00316 
00318         void setOutliers(const ms_quant_outliers* outliers);
00319 
00321         void dropOutliers();
00322 
00324         std::string getOutliersSchemaType() const;
00325 
00326 
00328         bool haveNormalisation() const;
00329 
00331         const ms_quant_normalisation* getNormalisation() const;
00332 
00334         void setNormalisation(const ms_quant_normalisation* normalisation);
00335 
00337         void dropNormalisation();
00338 
00340         std::string getNormalisationSchemaType() const;
00341 
00342 
00344         bool haveProtocol() const;
00345 
00347         const ms_quant_protocol* getProtocol() const;
00348 
00350         void setProtocol(const ms_quant_protocol* protocol);
00351 
00353         void dropProtocol();
00354 
00356         std::string getProtocolSchemaType() const;
00357 
00358 
00360         bool haveName() const;
00361 
00363         std::string getName() const;
00364 
00366         void setName(const char* value);
00367 
00369         void dropName();
00370 
00372         std::string getNameSchemaType() const;
00373 
00374 
00376         bool haveDescription() const;
00377 
00379         std::string getDescription() const;
00380 
00382         void setDescription(const char* value);
00383 
00385         void dropDescription();
00386 
00388         std::string getDescriptionSchemaType() const;
00389 
00390 
00392         bool haveConstrainSearch() const;
00393 
00395         bool isConstrainSearch() const;
00396 
00398         void setConstrainSearch(const bool value);
00399 
00401         void dropConstrainSearch();
00402 
00404         std::string getConstrainSearchSchemaType() const;
00405 
00406 
00408         bool haveProteinRatioType() const;
00409 
00411         std::string getProteinRatioType() const;
00412 
00414         void setProteinRatioType(const char* value);
00415 
00417         void dropProteinRatioType();
00418 
00420         std::string getProteinRatioTypeSchemaType() const;
00421 
00422 
00424         bool haveReportDetail() const;
00425 
00427         bool isReportDetail() const;
00428 
00430         void setReportDetail(const bool value);
00431 
00433         void dropReportDetail();
00434 
00436         std::string getReportDetailSchemaType() const;
00437 
00438 
00440         bool haveMinNumPeptides() const;
00441 
00443         int getMinNumPeptides() const;
00444 
00446         void setMinNumPeptides(const int value);
00447 
00449         void dropMinNumPeptides();
00450 
00452         std::string getMinNumPeptidesSchemaType() const;
00453 
00454 
00456         bool haveProtScoreType() const;
00457 
00459         std::string getProtScoreType() const;
00460 
00462         void setProtScoreType(const char* value);
00463 
00465         void dropProtScoreType();
00466 
00468         std::string getProtScoreTypeSchemaType() const;
00469 
00470 
00472         bool haveSigThresholdValue() const;
00473 
00475         std::string getSigThresholdValue() const;
00476 
00478         void setSigThresholdValue(const char* value);
00479 
00481         void dropSigThresholdValue();
00482 
00484         std::string getSigThresholdValueSchemaType() const;
00485 
00486 
00488         bool haveShowSubSets() const;
00489 
00491         std::string getShowSubSets() const;
00492 
00494         void setShowSubSets(const char* value);
00495 
00497         void dropShowSubSets();
00498 
00500         std::string getShowSubSetsSchemaType() const;
00501 
00502 
00504         bool haveRequireBoldRed() const;
00505 
00507         bool isRequireBoldRed() const;
00508 
00510         void setRequireBoldRed(const bool value);
00511 
00513         void dropRequireBoldRed();
00514 
00516         std::string getRequireBoldRedSchemaType() const;
00517 
00519         int isMethodCompatible(const ms_quant_method &other, std::string & reasonStrRef) const;
00520 
00521     private:
00522         msparser_internal::ms_quant_method_impl * m_pImpl;
00523     }; // class ms_quant_method
00524  // end of config_group
00526 
00527 } // namespace matrix_science
00528 
00529 #endif // MS_QUANT_METHOD_HPP
00530 
00531 /*------------------------------- End of File -------------------------------*/
00532 
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51