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  bool getNoiseSuppression() const;
196 
198  void setSemiCleavage(const bool semi_cleavage);
199 
201  void setAllowIsotopeError(const bool allow_isotope_error);
202 
204  void setRefine(const bool refine);
205 
207  void setNoiseSuppression(const bool noise_suppression);
208 
210  void setCleavageSite(const String& cleavage_site);
211 
213  const String& getCleavageSite() const;
214 
221  void write(const String& filename);
222 
230  void load(const String& filename);
231 
232 protected:
233 
234  XTandemInfile(const XTandemInfile& rhs);
235 
236  XTandemInfile& operator=(const XTandemInfile& rhs);
237 
238  void writeTo_(std::ostream& os);
239 
240  void writeNote_(std::ostream& os, const String& type, const String& label, const String& value);
241 
242  void writeNote_(std::ostream& os, const String& type, const String& label, const char* value);
243 
244  void writeNote_(std::ostream& os, const String& type, const String& label, bool value);
245 
252  String convertModificationSet_(const std::set<ModificationDefinition>& mods) const;
253 
255 
257 
259 
261 
263 
265 
267 
269 
271 
273 
275 
277 
279 
281 
283 
285 
287 
289 
291  bool refine_;
292 
295 
298 
300 
302 
303  // scoring
305 
307 
308  // output parameters
310 
312 
317  std::vector<Internal::XTandemInfileNote> notes_;
318  };
319 
320 } // namespace OpenMS
321 
322 #endif // OPENMS_FORMAT_XTANDEMINFILE_H
MassType fragment_mass_type_
Definition: XTandemInfile.h:266
A more convenient string class.
Definition: String.h:57
UInt max_precursor_charge_
Definition: XTandemInfile.h:268
XTandem input file.
Definition: XTandemInfile.h:52
UInt batch_size_
Definition: XTandemInfile.h:276
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:262
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:58
String default_parameters_file_
Definition: XTandemInfile.h:306
bool allow_isotope_error_
Definition: XTandemInfile.h:299
UInt number_of_threads_
Definition: XTandemInfile.h:274
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool noise_suppression_
Enable/disable xtandem noise suppression routine.
Definition: XTandemInfile.h:294
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:264
String input_filename_
Definition: XTandemInfile.h:280
MassType precursor_mass_type_
Definition: XTandemInfile.h:260
String taxonomy_file_
Definition: XTandemInfile.h:284
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:58
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:304
String output_filename_
Definition: XTandemInfile.h:282
double refine_max_valid_evalue_
Definition: XTandemInfile.h:301
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:256
double fragment_mass_tolerance_
Definition: XTandemInfile.h:254
String output_results_
Definition: XTandemInfile.h:309
double precursor_lower_mz_
Definition: XTandemInfile.h:270
String cleavage_site_
Definition: XTandemInfile.h:288
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:297
String taxon_
Definition: XTandemInfile.h:286
double max_valid_evalue_
Definition: XTandemInfile.h:311
int Int
Signed integer type.
Definition: Types.h:96
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:278
std::vector< Internal::XTandemInfileNote > notes_
Definition: XTandemInfile.h:317
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:258
double fragment_lower_mz_
Definition: XTandemInfile.h:272
bool refine_
Enable/disable xtandem refinement.
Definition: XTandemInfile.h:291

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Aug 25 2015 05:53:55 using doxygen 1.8.9.1