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-2017.
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 
40 #include <OpenMS/FORMAT/XMLFile.h>
41 
42 namespace OpenMS
43 {
57  class OPENMS_DLLAPI XTandemInfile :
58  public Internal::XMLFile
59  {
60 public:
61 
63  enum ErrorUnit
64  {
65  DALTONS = 0,
66  PPM
67  };
68 
70  enum MassType
71  {
72  MONOISOTOPIC = 0,
73  AVERAGE
74  };
75 
77  XTandemInfile();
78 
80  virtual ~XTandemInfile();
81 
83  void setFragmentMassTolerance(double tolerance);
84 
86  double getFragmentMassTolerance() const;
87 
89  void setPrecursorMassTolerancePlus(double tol);
90 
92  double getPrecursorMassTolerancePlus() const;
93 
95  void setPrecursorMassToleranceMinus(double tol);
96 
98  double getPrecursorMassToleranceMinus() const;
99 
101  void setPrecursorErrorType(MassType mono_isotopic);
102 
104  MassType getPrecursorErrorType() const;
105 
107  void setFragmentMassErrorUnit(ErrorUnit unit);
108 
110  ErrorUnit getFragmentMassErrorUnit() const;
111 
113  void setPrecursorMassErrorUnit(ErrorUnit unit);
114 
116  ErrorUnit getPrecursorMassErrorUnit() const;
117 
119  void setNumberOfThreads(UInt threads);
120 
122  UInt getNumberOfThreads() const;
123 
125  void setModifications(const ModificationDefinitionsSet& mods);
126 
128  const ModificationDefinitionsSet& getModifications() const;
129 
131  void setOutputFilename(const String& output);
132 
134  const String& getOutputFilename() const;
135 
137  void setInputFilename(const String& input_file);
138 
140  const String& getInputFilename() const;
141 
143  void setTaxonomyFilename(const String& filename);
144 
146  const String& getTaxonomyFilename() const;
147 
149  void setDefaultParametersFilename(const String& filename);
150 
152  const String& getDefaultParametersFilename() const;
153 
155  void setTaxon(const String& taxon);
156 
158  const String& getTaxon() const;
159 
161  void setMaxPrecursorCharge(Int max_charge);
162 
164  Int getMaxPrecursorCharge() const;
165 
167  void setNumberOfMissedCleavages(UInt missed_cleavages);
168 
170  UInt getNumberOfMissedCleavages() const;
171 
173  void setOutputResults(String result);
174 
176  String getOutputResults() const;
177 
179  void setMaxValidEValue(double value);
180 
182  double getMaxValidEValue() const;
183 
185  void setSemiCleavage(const bool semi_cleavage);
186 
188  void setAllowIsotopeError(const bool allow_isotope_error);
189 
191  bool getNoiseSuppression() const;
192 
194  void setNoiseSuppression(const bool noise_suppression);
195 
197  void setCleavageSite(const String& cleavage_site);
198 
200  const String& getCleavageSite() const;
201 
213  void write(const String& filename, bool ignore_member_parameters = false,
214  bool force_default_mods = false);
215 
216 protected:
217 
218  XTandemInfile(const XTandemInfile& rhs);
219 
220  XTandemInfile& operator=(const XTandemInfile& rhs);
221 
222  void writeTo_(std::ostream& os, bool ignore_member_parameters);
223 
224  void writeNote_(std::ostream& os, const String& label, const String& value);
225 
226  void writeNote_(std::ostream& os, const String& label, const char* value);
227 
228  void writeNote_(std::ostream& os, const String& label, bool value);
229 
243  String convertModificationSet_(const std::set<ModificationDefinition>& mods, std::map<String, double>& affected_origins) const;
244 
246 
248 
250 
252 
254 
256 
258 
260 
262 
264 
266 
268 
270 
272 
274 
276 
278 
280 
283 
285 
286  // scoring
288 
290 
291  // output parameters
293 
295 
296  // force writing of mods covered by special parameters?
298 
299  };
300 
301 } // namespace OpenMS
302 
303 #endif // OPENMS_FORMAT_XTANDEMINFILE_H
MassType fragment_mass_type_
Definition: XTandemInfile.h:255
bool force_default_mods_
Definition: XTandemInfile.h:297
A more convenient string class.
Definition: String.h:57
UInt max_precursor_charge_
Definition: XTandemInfile.h:259
XTandem input file.
Definition: XTandemInfile.h:57
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:63
UInt batch_size_
Definition: XTandemInfile.h:267
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:253
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
String default_parameters_file_
Definition: XTandemInfile.h:289
bool allow_isotope_error_
Definition: XTandemInfile.h:284
UInt number_of_threads_
Definition: XTandemInfile.h:265
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:251
MassType
Mass type of the precursor, either monoisotopic or average.
Definition: XTandemInfile.h:70
String input_filename_
Definition: XTandemInfile.h:271
MassType precursor_mass_type_
Definition: XTandemInfile.h:257
String taxonomy_file_
Definition: XTandemInfile.h:275
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:59
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:287
String output_filename_
Definition: XTandemInfile.h:273
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:247
double fragment_mass_tolerance_
Definition: XTandemInfile.h:245
String output_results_
Definition: XTandemInfile.h:292
double precursor_lower_mz_
Definition: XTandemInfile.h:261
String cleavage_site_
Definition: XTandemInfile.h:279
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:49
bool semi_cleavage_
semi cleavage
Definition: XTandemInfile.h:282
String taxon_
Definition: XTandemInfile.h:277
double max_valid_evalue_
Definition: XTandemInfile.h:294
int Int
Signed integer type.
Definition: Types.h:103
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:269
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:249
double fragment_lower_mz_
Definition: XTandemInfile.h:263

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:05 using doxygen 1.8.13