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-2013.
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 setMaxValidEValue(double value);
181 
183  double getMaxValidEValue() const;
184 
186  bool isRefining() const;
187 
189  void setSemiCleavage(const bool semi_cleavage);
190 
192  void setRefine(const bool refine);
193 
200  void write(const String& filename);
201 
209  void load(const String& filename);
210 
211 protected:
212 
213  XTandemInfile(const XTandemInfile& rhs);
214 
215  XTandemInfile& operator=(const XTandemInfile& rhs);
216 
217  void writeTo_(std::ostream& os);
218 
219  void writeNote_(std::ostream& os, const String& type, const String& label, const String& value);
220 
221  void writeNote_(std::ostream& os, const String& type, const String& label, const char* value);
222 
223  void writeNote_(std::ostream& os, const String& type, const String& label, bool value);
224 
231  String convertModificationSet_(const std::set<ModificationDefinition>& mods) const;
232 
234 
236 
238 
240 
242 
244 
246 
248 
250 
252 
254 
256 
258 
260 
262 
264 
266 
268 
270  bool refine_;
271 
274 
276 
277  // scoring
279 
281 
282  // output parameters
284 
289  std::vector<Internal::XTandemInfileNote> notes_;
290  };
291 
292 } // namespace OpenMS
293 
294 #endif // OPENMS_FORMAT_XTANDEMINFILE_H
MassType fragment_mass_type_
Definition: XTandemInfile.h:245
A more convenient string class.
Definition: String.h:56
UInt max_precursor_charge_
Definition: XTandemInfile.h:247
XTandem input file.
Definition: XTandemInfile.h:52
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:58
UInt batch_size_
Definition: XTandemInfile.h:255
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:241
String default_parameters_file_
Definition: XTandemInfile.h:280
UInt number_of_threads_
Definition: XTandemInfile.h:253
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:243
MassType
Mass type of the precursor, either monoisotopic or average.
Definition: XTandemInfile.h:65
String input_filename_
Definition: XTandemInfile.h:259
MassType precursor_mass_type_
Definition: XTandemInfile.h:239
String taxonomy_file_
Definition: XTandemInfile.h:263
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:57
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:278
String output_filename_
Definition: XTandemInfile.h:261
double refine_max_valid_evalue_
Definition: XTandemInfile.h:275
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:235
double fragment_mass_tolerance_
Definition: XTandemInfile.h:233
double precursor_lower_mz_
Definition: XTandemInfile.h:249
String cleavage_site_
Definition: XTandemInfile.h:267
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:51
bool semi_cleavage_
semi cleavage
Definition: XTandemInfile.h:273
String taxon_
Definition: XTandemInfile.h:265
double max_valid_evalue_
Definition: XTandemInfile.h:283
int Int
Signed integer type.
Definition: Types.h:100
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:257
std::vector< Internal::XTandemInfileNote > notes_
Definition: XTandemInfile.h:289
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:237
double fragment_lower_mz_
Definition: XTandemInfile.h:251
bool refine_
Enable/disable xtandem refinement.
Definition: XTandemInfile.h:270

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:23 using doxygen 1.8.5