Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
XTandemInfile.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2016.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Chris Bielow $
32 // $Authors: Andreas Bertsch, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_FORMAT_XTANDEMINFILE_H
36 #define OPENMS_FORMAT_XTANDEMINFILE_H
37 
41 #include <OpenMS/FORMAT/XMLFile.h>
42 
43 namespace OpenMS
44 {
63  class OPENMS_DLLAPI XTandemInfile :
64  public Internal::XMLFile
65  {
66 public:
67 
69  enum ErrorUnit
70  {
71  DALTONS = 0,
72  PPM
73  };
74 
76  enum MassType
77  {
78  MONOISOTOPIC = 0,
79  AVERAGE
80  };
81 
83  XTandemInfile();
84 
86  virtual ~XTandemInfile();
87 
88  //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
89  //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
90  //<note type="input" label="spectrum, parent monoisotopic mass error plus">100</note>
91  //<note type="input" label="spectrum, parent monoisotopic mass error minus">100</note>
92  //<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
93  //<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
94  //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
95  //<note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
96  //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
97  //<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
98  //<note>values are monoisotopic|average </note>
99 
101  void setFragmentMassTolerance(double tolerance);
102 
104  double getFragmentMassTolerance() const;
105 
107  void setPrecursorMassTolerancePlus(double tol);
108 
110  double getPrecursorMassTolerancePlus() const;
111 
113  void setPrecursorMassToleranceMinus(double tol);
114 
116  double getPrecursorMassToleranceMinus() const;
117 
119  void setPrecursorErrorType(MassType mono_isotopic);
120 
122  MassType getPrecursorErrorType() const;
123 
125  void setFragmentMassErrorUnit(ErrorUnit unit);
126 
128  ErrorUnit getFragmentMassErrorUnit() const;
129 
131  void setPrecursorMassErrorUnit(ErrorUnit unit);
132 
134  ErrorUnit getPrecursorMassErrorUnit() const;
135 
137  void setNumberOfThreads(UInt threads);
138 
140  UInt getNumberOfThreads() const;
141 
143  void setModifications(const ModificationDefinitionsSet& mods);
144 
146  const ModificationDefinitionsSet& getModifications() const;
147 
149  void setOutputFilename(const String& output);
150 
152  const String& getOutputFilename() const;
153 
155  void setInputFilename(const String& input_file);
156 
158  const String& getInputFilename() const;
159 
161  void setTaxonomyFilename(const String& filename);
162 
164  const String& getTaxonomyFilename() const;
165 
167  void setDefaultParametersFilename(const String& filename);
168 
170  const String& getDefaultParametersFilename() const;
171 
173  void setTaxon(const String& taxon);
174 
176  const String& getTaxon() const;
177 
179  void setMaxPrecursorCharge(Int max_charge);
180 
182  Int getMaxPrecursorCharge() const;
183 
185  void setNumberOfMissedCleavages(UInt missed_cleavages);
186 
188  UInt getNumberOfMissedCleavages() const;
189 
191  void setOutputResults(String result);
192 
194  String getOutputResults() const;
195 
197  void setMaxValidEValue(double value);
198 
200  double getMaxValidEValue() const;
201 
203  bool isRefining() const;
204 
206  bool getNoiseSuppression() const;
207 
209  void setSemiCleavage(const bool semi_cleavage);
210 
212  void setAllowIsotopeError(const bool allow_isotope_error);
213 
215  void setRefine(const bool refine);
216 
218  void setNoiseSuppression(const bool noise_suppression);
219 
221  void setCleavageSite(const String& cleavage_site);
222 
224  const String& getCleavageSite() const;
225 
239  void write(const String& filename, bool ignore_member_parameters = false);
240 
248  void load(const String& filename);
249 
256  Size getNoteCount() const;
257 
258 protected:
259 
260  XTandemInfile(const XTandemInfile& rhs);
261 
262  XTandemInfile& operator=(const XTandemInfile& rhs);
263 
264  void writeTo_(std::ostream& os, bool ignore_member_parameters);
265 
266  const String& writeNote_(std::ostream& os, const String& type, const String& label, const String& value);
267 
268  const String& writeNote_(std::ostream& os, const String& type, const String& label, const char* value);
269 
270  const String& writeNote_(std::ostream& os, const String& type, const String& label, bool value);
271 
284  String convertModificationSet_(const std::set<ModificationDefinition>& mods, std::map<String, double>& affected_origins) const;
285 
287 
289 
291 
293 
295 
297 
299 
301 
303 
305 
307 
309 
311 
313 
315 
317 
319 
321 
323  bool refine_;
324 
327 
330 
332 
334 
335  // scoring
337 
339 
340  // output parameters
342 
344 
349  std::vector<Internal::XTandemInfileNote> notes_;
350  };
351 
352 } // namespace OpenMS
353 
354 #endif // OPENMS_FORMAT_XTANDEMINFILE_H
MassType fragment_mass_type_
Definition: XTandemInfile.h:298
A more convenient string class.
Definition: String.h:57
UInt max_precursor_charge_
Definition: XTandemInfile.h:300
XTandem input file.
Definition: XTandemInfile.h:63
UInt batch_size_
Definition: XTandemInfile.h:308
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:294
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:69
String default_parameters_file_
Definition: XTandemInfile.h:338
bool allow_isotope_error_
Definition: XTandemInfile.h:331
UInt number_of_threads_
Definition: XTandemInfile.h:306
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool noise_suppression_
Enable/disable xtandem noise suppression routine.
Definition: XTandemInfile.h:326
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:296
String input_filename_
Definition: XTandemInfile.h:312
MassType precursor_mass_type_
Definition: XTandemInfile.h:292
String taxonomy_file_
Definition: XTandemInfile.h:316
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:58
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:336
String output_filename_
Definition: XTandemInfile.h:314
double refine_max_valid_evalue_
Definition: XTandemInfile.h:333
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:288
double fragment_mass_tolerance_
Definition: XTandemInfile.h:286
String output_results_
Definition: XTandemInfile.h:341
double precursor_lower_mz_
Definition: XTandemInfile.h:302
String cleavage_site_
Definition: XTandemInfile.h:320
MassType
Mass type of the precursor, either monoisotopic or average.
Definition: XTandemInfile.h:76
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:53
bool semi_cleavage_
semi cleavage
Definition: XTandemInfile.h:329
String taxon_
Definition: XTandemInfile.h:318
double max_valid_evalue_
Definition: XTandemInfile.h:343
int Int
Signed integer type.
Definition: Types.h:103
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:310
std::vector< Internal::XTandemInfileNote > notes_
Definition: XTandemInfile.h:349
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:290
double fragment_lower_mz_
Definition: XTandemInfile.h:304
bool refine_
Enable/disable xtandem refinement.
Definition: XTandemInfile.h:323

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:39:56 using doxygen 1.8.8