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-2015.
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: Stephan Aiche $
32 // $Authors: Andreas Bertsch $
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 {
52  class OPENMS_DLLAPI XTandemInfile :
53  public Internal::XMLFile
54  {
55 public:
56 
58  enum ErrorUnit
59  {
60  DALTONS = 0,
61  PPM
62  };
63 
65  enum MassType
66  {
67  MONOISOTOPIC = 0,
68  AVERAGE
69  };
70 
72  XTandemInfile();
73 
75  virtual ~XTandemInfile();
76 
77  //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
78  //<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
79  //<note type="input" label="spectrum, parent monoisotopic mass error plus">100</note>
80  //<note type="input" label="spectrum, parent monoisotopic mass error minus">100</note>
81  //<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
82  //<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
83  //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
84  //<note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
85  //<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
86  //<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
87  //<note>values are monoisotopic|average </note>
88 
90  void setFragmentMassTolerance(double tolerance);
91 
93  double getFragmentMassTolerance() const;
94 
96  void setPrecursorMassTolerancePlus(double tol);
97 
99  double getPrecursorMassTolerancePlus() const;
100 
102  void setPrecursorMassToleranceMinus(double tol);
103 
105  double getPrecursorMassToleranceMinus() const;
106 
108  void setPrecursorErrorType(MassType mono_isotopic);
109 
111  MassType getPrecursorErrorType() const;
112 
114  void setFragmentMassErrorUnit(ErrorUnit unit);
115 
117  ErrorUnit getFragmentMassErrorUnit() const;
118 
120  void setPrecursorMassErrorUnit(ErrorUnit unit);
121 
123  ErrorUnit getPrecursorMassErrorUnit() const;
124 
126  void setNumberOfThreads(UInt threads);
127 
129  UInt getNumberOfThreads() const;
130 
132  void setModifications(const ModificationDefinitionsSet& mods);
133 
135  const ModificationDefinitionsSet& getModifications() const;
136 
138  void setOutputFilename(const String& output);
139 
141  const String& getOutputFilename() const;
142 
144  void setInputFilename(const String& input_file);
145 
147  const String& getInputFilename() const;
148 
150  void setTaxonomyFilename(const String& filename);
151 
153  const String& getTaxonomyFilename() const;
154 
156  void setDefaultParametersFilename(const String& filename);
157 
159  const String& getDefaultParametersFilename() const;
160 
162  void setTaxon(const String& taxon);
163 
165  const String& getTaxon() const;
166 
168  void setMaxPrecursorCharge(Int max_charge);
169 
171  Int getMaxPrecursorCharge() const;
172 
174  void setNumberOfMissedCleavages(UInt missed_cleavages);
175 
177  UInt getNumberOfMissedCleavages() const;
178 
180  void setOutputResults(String result);
181 
183  String getOutputResults() const;
184 
186  void setMaxValidEValue(double value);
187 
189  double getMaxValidEValue() const;
190 
192  bool isRefining() const;
193 
195  void setSemiCleavage(const bool semi_cleavage);
196 
198  void setAllowIsotopeError(const bool allow_isotope_error);
199 
201  void setRefine(const bool refine);
202 
204  void setCleavageSite(const String& cleavage_site);
205 
207  const String& getCleavageSite() const;
208 
215  void write(const String& filename);
216 
224  void load(const String& filename);
225 
226 protected:
227 
228  XTandemInfile(const XTandemInfile& rhs);
229 
230  XTandemInfile& operator=(const XTandemInfile& rhs);
231 
232  void writeTo_(std::ostream& os);
233 
234  void writeNote_(std::ostream& os, const String& type, const String& label, const String& value);
235 
236  void writeNote_(std::ostream& os, const String& type, const String& label, const char* value);
237 
238  void writeNote_(std::ostream& os, const String& type, const String& label, bool value);
239 
246  String convertModificationSet_(const std::set<ModificationDefinition>& mods) const;
247 
249 
251 
253 
255 
257 
259 
261 
263 
265 
267 
269 
271 
273 
275 
277 
279 
281 
283 
285  bool refine_;
286 
289 
291 
293 
294  // scoring
296 
298 
299  // output parameters
301 
303 
308  std::vector<Internal::XTandemInfileNote> notes_;
309  };
310 
311 } // namespace OpenMS
312 
313 #endif // OPENMS_FORMAT_XTANDEMINFILE_H
MassType fragment_mass_type_
Definition: XTandemInfile.h:260
A more convenient string class.
Definition: String.h:57
UInt max_precursor_charge_
Definition: XTandemInfile.h:262
XTandem input file.
Definition: XTandemInfile.h:52
UInt batch_size_
Definition: XTandemInfile.h:270
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:256
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:58
String default_parameters_file_
Definition: XTandemInfile.h:297
bool allow_isotope_error_
Definition: XTandemInfile.h:290
UInt number_of_threads_
Definition: XTandemInfile.h:268
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:258
String input_filename_
Definition: XTandemInfile.h:274
MassType precursor_mass_type_
Definition: XTandemInfile.h:254
String taxonomy_file_
Definition: XTandemInfile.h:278
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:58
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:295
String output_filename_
Definition: XTandemInfile.h:276
double refine_max_valid_evalue_
Definition: XTandemInfile.h:292
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:250
double fragment_mass_tolerance_
Definition: XTandemInfile.h:248
String output_results_
Definition: XTandemInfile.h:300
double precursor_lower_mz_
Definition: XTandemInfile.h:264
String cleavage_site_
Definition: XTandemInfile.h:282
MassType
Mass type of the precursor, either monoisotopic or average.
Definition: XTandemInfile.h:65
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:288
String taxon_
Definition: XTandemInfile.h:280
double max_valid_evalue_
Definition: XTandemInfile.h:302
int Int
Signed integer type.
Definition: Types.h:96
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:272
std::vector< Internal::XTandemInfileNote > notes_
Definition: XTandemInfile.h:308
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:252
double fragment_lower_mz_
Definition: XTandemInfile.h:266
bool refine_
Enable/disable xtandem refinement.
Definition: XTandemInfile.h:285

OpenMS / TOPP release 2.0.0 Documentation generated on Fri May 29 2015 17:20:32 using doxygen 1.8.9.1