| OpenMS 2.5.0

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-2020.
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 #pragma once
36
37 #include <OpenMS/DATASTRUCTURES/String.h>
38 #include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
39 #include <OpenMS/FORMAT/XMLFile.h>
40
41 namespace OpenMS
42 {
56 class OPENMS_DLLAPI XTandemInfile :
57 public Internal::XMLFile
58 {
59 public:
60
62 enum ErrorUnit
63 {
64 DALTONS = 0,
65 PPM
66 };
67
69 enum MassType
70 {
71 MONOISOTOPIC = 0,
72 AVERAGE
73 };
74
76 XTandemInfile();
77
79 ~XTandemInfile() override;
80
82 void setFragmentMassTolerance(double tolerance);
83
85 double getFragmentMassTolerance() const;
86
88 void setPrecursorMassTolerancePlus(double tol);
89
91 double getPrecursorMassTolerancePlus() const;
92
94 void setPrecursorMassToleranceMinus(double tol);
95
97 double getPrecursorMassToleranceMinus() const;
98
100 void setPrecursorErrorType(MassType mono_isotopic);
101
103 MassType getPrecursorErrorType() const;
104
106 void setFragmentMassErrorUnit(ErrorUnit unit);
107
109 ErrorUnit getFragmentMassErrorUnit() const;
110
112 void setPrecursorMassErrorUnit(ErrorUnit unit);
113
115 ErrorUnit getPrecursorMassErrorUnit() const;
116
118 void setNumberOfThreads(UInt threads);
119
121 UInt getNumberOfThreads() const;
122
124 void setModifications(const ModificationDefinitionsSet& mods);
125
127 const ModificationDefinitionsSet& getModifications() const;
128
130 void setOutputFilename(const String& output);
131
133 const String& getOutputFilename() const;
134
136 void setInputFilename(const String& input_file);
137
139 const String& getInputFilename() const;
140
142 void setTaxonomyFilename(const String& filename);
143
145 const String& getTaxonomyFilename() const;
146
148 void setDefaultParametersFilename(const String& filename);
149
151 const String& getDefaultParametersFilename() const;
152
154 void setTaxon(const String& taxon);
155
157 const String& getTaxon() const;
158
160 void setMaxPrecursorCharge(Int max_charge);
161
163 Int getMaxPrecursorCharge() const;
164
166 void setNumberOfMissedCleavages(UInt missed_cleavages);
167
169 UInt getNumberOfMissedCleavages() const;
170
172 void setOutputResults(String result);
173
175 String getOutputResults() const;
176
178 void setMaxValidEValue(double value);
179
181 double getMaxValidEValue() const;
182
184 void setSemiCleavage(const bool semi_cleavage);
185
187 void setAllowIsotopeError(const bool allow_isotope_error);
188
190 bool getNoiseSuppression() const;
191
193 void setNoiseSuppression(const bool noise_suppression);
194
196 void setCleavageSite(const String& cleavage_site);
197
199 const String& getCleavageSite() const;
200
212 void write(const String& filename, bool ignore_member_parameters = false,
213 bool force_default_mods = false);
214
215 protected:
216
217 XTandemInfile(const XTandemInfile& rhs);
218
219 XTandemInfile& operator=(const XTandemInfile& rhs);
220
221 void writeTo_(std::ostream& os, bool ignore_member_parameters);
222
223 void writeNote_(std::ostream& os, const String& label, const String& value);
224
225 void writeNote_(std::ostream& os, const String& label, const char* value);
226
227 void writeNote_(std::ostream& os, const String& label, bool value);
228
242 String convertModificationSet_(const std::set<ModificationDefinition>& mods, std::map<String, double>& affected_origins) const;
243
244 double fragment_mass_tolerance_;
245
246 double precursor_mass_tolerance_plus_;
247
248 double precursor_mass_tolerance_minus_;
249
250 ErrorUnit fragment_mass_error_unit_;
251
252 ErrorUnit precursor_mass_error_unit_;
253
254 MassType fragment_mass_type_;
255
256 MassType precursor_mass_type_;
257
258 UInt max_precursor_charge_;
259
260 double precursor_lower_mz_;
261
262 double fragment_lower_mz_;
263
264 UInt number_of_threads_;
265
266 UInt batch_size_;
267
268 ModificationDefinitionsSet modifications_;
269
270 String input_filename_;
271
272 String output_filename_;
273
274 String taxonomy_file_;
275
276 String taxon_;
277
278 String cleavage_site_;
279
281 bool semi_cleavage_;
282
283 bool allow_isotope_error_;
284
285 // scoring
286 UInt number_of_missed_cleavages_;
287
288 String default_parameters_file_;
289
290 // output parameters
291 String output_results_;
292
293 double max_valid_evalue_;
294
295 // force writing of mods covered by special parameters?
296 bool force_default_mods_;
297
298 };
299
300 } // namespace OpenMS
301
OpenMS::IdentificationDataInternal::MONOISOTOPIC
Definition: MetaData.h:74
OpenMS::XTandemInfile::modifications_
ModificationDefinitionsSet modifications_
Definition: XTandemInfile.h:268
OpenMS::XTandemInfile::batch_size_
UInt batch_size_
Definition: XTandemInfile.h:266
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::XTandemInfile::max_precursor_charge_
UInt max_precursor_charge_
Definition: XTandemInfile.h:258
XMLFile.h
OpenMS::XTandemInfile::taxon_
String taxon_
Definition: XTandemInfile.h:276
OpenMS::XTandemInfile::output_filename_
String output_filename_
Definition: XTandemInfile.h:272
OpenMS::XTandemInfile::allow_isotope_error_
bool allow_isotope_error_
Definition: XTandemInfile.h:283
OpenMS::XTandemInfile::input_filename_
String input_filename_
Definition: XTandemInfile.h:270
OpenMS::XTandemInfile::semi_cleavage_
bool semi_cleavage_
semi cleavage
Definition: XTandemInfile.h:281
OpenMS::IdentificationDataInternal::AVERAGE
Definition: MetaData.h:75
OpenMS::XTandemInfile::number_of_threads_
UInt number_of_threads_
Definition: XTandemInfile.h:264
OpenMS::XTandemInfile::fragment_mass_tolerance_
double fragment_mass_tolerance_
Definition: XTandemInfile.h:244
OpenMS::XTandemInfile::ErrorUnit
ErrorUnit
error unit, either Da or ppm
Definition: XTandemInfile.h:62
OpenMS::XTandemInfile::taxonomy_file_
String taxonomy_file_
Definition: XTandemInfile.h:274
OpenMS::XTandemInfile::precursor_mass_error_unit_
ErrorUnit precursor_mass_error_unit_
Definition: XTandemInfile.h:252
OpenMS::XTandemInfile::force_default_mods_
bool force_default_mods_
Definition: XTandemInfile.h:296
OpenMS::Internal::XMLFile
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:48
OpenMS::IdentificationDataInternal::MassType
MassType
Definition: MetaData.h:72
OpenMS::XTandemInfile::output_results_
String output_results_
Definition: XTandemInfile.h:291
String.h
ModificationDefinitionsSet.h
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::XTandemInfile
XTandem input file.
Definition: XTandemInfile.h:56
OpenMS::XTandemInfile::max_valid_evalue_
double max_valid_evalue_
Definition: XTandemInfile.h:293
OpenMS::XTandemInfile::precursor_lower_mz_
double precursor_lower_mz_
Definition: XTandemInfile.h:260
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::XTandemInfile::fragment_mass_type_
MassType fragment_mass_type_
Definition: XTandemInfile.h:254
OpenMS::XTandemInfile::number_of_missed_cleavages_
UInt number_of_missed_cleavages_
Definition: XTandemInfile.h:286
OpenMS::XTandemInfile::precursor_mass_tolerance_minus_
double precursor_mass_tolerance_minus_
Definition: XTandemInfile.h:248
OpenMS::ModificationDefinitionsSet
Representation of a set of modification definitions.
Definition: ModificationDefinitionsSet.h:58
int
OpenMS::XTandemInfile::precursor_mass_tolerance_plus_
double precursor_mass_tolerance_plus_
Definition: XTandemInfile.h:246
OpenMS::XTandemInfile::fragment_mass_error_unit_
ErrorUnit fragment_mass_error_unit_
Definition: XTandemInfile.h:250
OpenMS::XTandemInfile::precursor_mass_type_
MassType precursor_mass_type_
Definition: XTandemInfile.h:256
OpenMS::XTandemInfile::cleavage_site_
String cleavage_site_
Definition: XTandemInfile.h:278
OpenMS::XTandemInfile::MassType
MassType
Mass type of the precursor, either monoisotopic or average.
Definition: XTandemInfile.h:69
OpenMS::XTandemInfile::default_parameters_file_
String default_parameters_file_
Definition: XTandemInfile.h:288
OpenMS::XTandemInfile::fragment_lower_mz_
double fragment_lower_mz_
Definition: XTandemInfile.h:262