Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef OPENMS_FORMAT_XTANDEMINFILE_H
00036 #define OPENMS_FORMAT_XTANDEMINFILE_H
00037
00038 #include <OpenMS/DATASTRUCTURES/String.h>
00039 #include <OpenMS/FORMAT/HANDLERS/XTandemInfileXMLHandler.h>
00040 #include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
00041 #include <OpenMS/FORMAT/XMLFile.h>
00042
00043 namespace OpenMS
00044 {
00052 class OPENMS_DLLAPI XTandemInfile :
00053 public Internal::XMLFile
00054 {
00055 public:
00056
00058 enum ErrorUnit
00059 {
00060 DALTONS = 0,
00061 PPM
00062 };
00063
00065 enum MassType
00066 {
00067 MONOISOTOPIC = 0,
00068 AVERAGE
00069 };
00070
00071
00073 XTandemInfile();
00074
00076 virtual ~XTandemInfile();
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00091 void setFragmentMassTolerance(double tolerance);
00092
00094 double getFragmentMassTolerance() const;
00095
00097 void setPrecursorMassTolerancePlus(double tol);
00098
00100 double getPrecursorMassTolerancePlus() const;
00101
00103 void setPrecursorMassToleranceMinus(double tol);
00104
00106 double getPrecursorMassToleranceMinus() const;
00107
00109 void setPrecursorErrorType(MassType mono_isotopic);
00110
00112 MassType getPrecursorErrorType() const;
00113
00115 void setFragmentMassErrorUnit(ErrorUnit unit);
00116
00118 ErrorUnit getFragmentMassErrorUnit() const;
00119
00121 void setPrecursorMassErrorUnit(ErrorUnit unit);
00122
00124 ErrorUnit getPrecursorMassErrorUnit() const;
00125
00127 void setNumberOfThreads(UInt threads);
00128
00130 UInt getNumberOfThreads() const;
00131
00133 void setModifications(const ModificationDefinitionsSet & mods);
00134
00136 const ModificationDefinitionsSet & getModifications() const;
00137
00139 void setOutputFilename(const String & output);
00140
00142 const String & getOutputFilename() const;
00143
00145 void setInputFilename(const String & input_file);
00146
00148 const String & getInputFilename() const;
00149
00151 void setTaxonomyFilename(const String & filename);
00152
00154 const String & getTaxonomyFilename() const;
00155
00157 void setDefaultParametersFilename(const String & filename);
00158
00160 const String & getDefaultParametersFilename() const;
00161
00163 void setTaxon(const String & taxon);
00164
00166 const String & getTaxon() const;
00167
00169 void setMaxPrecursorCharge(Int max_charge);
00170
00172 Int getMaxPrecursorCharge() const;
00173
00175 void setNumberOfMissedCleavages(UInt missed_cleavages);
00176
00178 UInt getNumberOfMissedCleavages() const;
00179
00181 void setMaxValidEValue(double value);
00182
00184 double getMaxValidEValue() const;
00185
00187 bool isRefining() const;
00188
00190 void setSemiCleavage(const bool semi_cleavage);
00191
00193 void setRefine(const bool refine);
00194
00200 void write(const String & filename);
00201
00208 void load(const String & filename);
00209
00210 protected:
00211
00212 XTandemInfile(const XTandemInfile & rhs);
00213
00214 XTandemInfile & operator=(const XTandemInfile & rhs);
00215
00216 void writeTo_(std::ostream & os);
00217
00218 void writeNote_(std::ostream & os, const String & type, const String & label, const String & value);
00219
00220 void writeNote_(std::ostream & os, const String & type, const String & label, const char * value);
00221
00222 void writeNote_(std::ostream & os, const String & type, const String & label, bool value);
00223
00224 double fragment_mass_tolerance_;
00225
00226 double precursor_mass_tolerance_plus_;
00227
00228 double precursor_mass_tolerance_minus_;
00229
00230 MassType precursor_mass_type_;
00231
00232 ErrorUnit precursor_mass_error_unit_;
00233
00234 ErrorUnit fragment_mass_error_unit_;
00235
00236 MassType fragment_mass_type_;
00237
00238 UInt max_precursor_charge_;
00239
00240 double precursor_lower_mz_;
00241
00242 double fragment_lower_mz_;
00243
00244 UInt number_of_threads_;
00245
00246 UInt batch_size_;
00247
00248 ModificationDefinitionsSet modifications_;
00249
00250 String input_filename_;
00251
00252 String output_filename_;
00253
00254 String taxonomy_file_;
00255
00256 String taxon_;
00257
00258 String cleavage_site_;
00259
00260
00261 bool refine_;
00262
00263
00264 bool semi_cleavage_;
00265
00266 double refine_max_valid_evalue_;
00267
00268
00269 UInt number_of_missed_cleavages_;
00270
00271 String default_parameters_file_;
00272
00273
00274 double max_valid_evalue_;
00275
00276
00277 std::vector<Internal::XTandemInfileNote> notes_;
00278 };
00279
00280 }
00281
00282 #endif // OPENMS_FORMAT_XTANDEMINFILE_H