OpenMS
Loading...
Searching...
No Matches
XTandemInfile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Andreas Bertsch, Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
15namespace OpenMS
16{
30 class OPENMS_DLLAPI XTandemInfile :
32 {
33public:
34
37 {
38 DALTONS = 0,
39 PPM
40 };
41
44 {
45 MONOISOTOPIC = 0,
46 AVERAGE
47 };
48
51
53 ~XTandemInfile() override;
54
56 void setFragmentMassTolerance(double tolerance);
57
60
63
66
69
72
74 void setPrecursorErrorType(MassType mono_isotopic);
75
78
81
84
87
90
92 void setNumberOfThreads(UInt threads);
93
96
99
102
104 void setOutputFilename(const std::string& output);
105
107 const std::string& getOutputFilename() const;
108
110 void setInputFilename(const std::string& input_file);
111
113 const std::string& getInputFilename() const;
114
116 void setTaxonomyFilename(const std::string& filename);
117
119 const std::string& getTaxonomyFilename() const;
120
122 void setDefaultParametersFilename(const std::string& filename);
123
125 const std::string& getDefaultParametersFilename() const;
126
128 void setTaxon(const std::string& taxon);
129
131 const std::string& getTaxon() const;
132
134 void setMaxPrecursorCharge(Int max_charge);
135
138
140 void setNumberOfMissedCleavages(UInt missed_cleavages);
141
144
146 void setOutputResults(const std::string& result);
147
149 std::string getOutputResults() const;
150
152 void setMaxValidEValue(double value);
153
155 double getMaxValidEValue() const;
156
158 void setSemiCleavage(const bool semi_cleavage);
159
161 void setAllowIsotopeError(const bool allow_isotope_error);
162
165
167 void setNoiseSuppression(const bool noise_suppression);
168
170 void setCleavageSite(const std::string& cleavage_site);
171
173 const std::string& getCleavageSite() const;
174
186 void write(const std::string& filename, bool ignore_member_parameters = false,
187 bool force_default_mods = false);
188
189protected:
190
192
194
195 void writeTo_(std::ostream& os, bool ignore_member_parameters);
196
197 void writeNote_(std::ostream& os, const std::string& label, const std::string& value);
198
199 void writeNote_(std::ostream& os, const std::string& label, const char* value);
200
201 void writeNote_(std::ostream& os, const std::string& label, bool value);
202
216 std::string convertModificationSet_(const std::set<ModificationDefinition>& mods, std::map<std::string, double>& affected_origins) const;
217
219
221
223
225
227
229
231
233
235
237
239
241
243
244 std::string input_filename_;
245
246 std::string output_filename_;
247
248 std::string taxonomy_file_;
249
250 std::string taxon_;
251
252 std::string cleavage_site_;
253
256
258
259 // scoring
261
263
264 // output parameters
265 std::string output_results_;
266
268
269 // force writing of mods covered by special parameters?
271
272 };
273
274} // namespace OpenMS
275
Base class for loading and storing XML files via Xerces, with optional schema validation and transpar...
Definition XMLFile.h:38
Definition ModificationDefinitionsSet.h:34
XTandem input file.
Definition XTandemInfile.h:32
void setNumberOfThreads(UInt threads)
sets the number of threads used during the identifications
MassType getPrecursorErrorType() const
returns the precursor mass type
const ModificationDefinitionsSet & getModifications() const
returns the modifications set, using a modification definitions set
void setTaxon(const std::string &taxon)
sets the taxon used in the taxonomy file
std::string getOutputResults() const
returns the output result type ("all", "valid" or "stochastic")
ErrorUnit
error unit, either Da or ppm
Definition XTandemInfile.h:37
const std::string & getOutputFilename() const
returns the output filename
bool allow_isotope_error_
Definition XTandemInfile.h:257
std::string convertModificationSet_(const std::set< ModificationDefinition > &mods, std::map< std::string, double > &affected_origins) const
Converts the given set of Modifications into a format compatible to X!Tandem.
const std::string & getCleavageSite() const
returns the cleavage site regex
MassType fragment_mass_type_
Definition XTandemInfile.h:228
void setNoiseSuppression(const bool noise_suppression)
set state of noise suppression
void setInputFilename(const std::string &input_file)
sets the input filename
void writeNote_(std::ostream &os, const std::string &label, bool value)
const std::string & getInputFilename() const
returns the input filename
void setFragmentMassErrorUnit(ErrorUnit unit)
sets the fragment mass error unit (Da, ppm)
ErrorUnit precursor_mass_error_unit_
Definition XTandemInfile.h:226
void setDefaultParametersFilename(const std::string &filename)
sets the default parameters file
UInt getNumberOfMissedCleavages() const
returns the number of missed cleavages allowed
void writeNote_(std::ostream &os, const std::string &label, const std::string &value)
UInt number_of_missed_cleavages_
Definition XTandemInfile.h:260
UInt batch_size_
Definition XTandemInfile.h:240
bool semi_cleavage_
semi cleavage
Definition XTandemInfile.h:255
XTandemInfile()
constructor
double getPrecursorMassToleranceMinus() const
returns the precursor mass tolerance (minus only)
double fragment_lower_mz_
Definition XTandemInfile.h:236
std::string taxonomy_file_
Definition XTandemInfile.h:248
std::string taxon_
Definition XTandemInfile.h:250
std::string output_results_
Definition XTandemInfile.h:265
const std::string & getTaxon() const
returns the taxon used in the taxonomy file
bool force_default_mods_
Definition XTandemInfile.h:270
void setPrecursorMassToleranceMinus(double tol)
set the precursor mass tolerance (minus only)
void setNumberOfMissedCleavages(UInt missed_cleavages)
sets the number of missed cleavages allowed
std::string output_filename_
Definition XTandemInfile.h:246
void write(const std::string &filename, bool ignore_member_parameters=false, bool force_default_mods=false)
Writes the X! Tandem input file to the given filename.
ModificationDefinitionsSet modifications_
Definition XTandemInfile.h:242
std::string input_filename_
Definition XTandemInfile.h:244
double precursor_mass_tolerance_minus_
Definition XTandemInfile.h:222
void setMaxValidEValue(double value)
sets the max valid E-value allowed in the list
void writeTo_(std::ostream &os, bool ignore_member_parameters)
void writeNote_(std::ostream &os, const std::string &label, const char *value)
UInt getNumberOfThreads() const
returns the number of threads
double getMaxValidEValue() const
returns the max valid E-value allowed in the list
bool getNoiseSuppression() const
get state of noise suppression
Int getMaxPrecursorCharge() const
returns the max precursor charge
double getFragmentMassTolerance() const
returns the fragment mass tolerance
void setTaxonomyFilename(const std::string &filename)
set the filename of the taxonomy file
void setPrecursorErrorType(MassType mono_isotopic)
sets the precursor mass type
void setPrecursorMassErrorUnit(ErrorUnit unit)
sets the precursor mass error unit (Da, ppm)
void setAllowIsotopeError(const bool allow_isotope_error)
set if misassignment of precursor to first and second 13C isotopic peak should also be considered
const std::string & getDefaultParametersFilename() const
returns the default parameters file
XTandemInfile & operator=(const XTandemInfile &rhs)
std::string default_parameters_file_
Definition XTandemInfile.h:262
double getPrecursorMassTolerancePlus() const
returns the precursor mass tolerance (plus only)
const std::string & getTaxonomyFilename() const
returns the filename of the taxonomy file
void setModifications(const ModificationDefinitionsSet &mods)
sets the modifications using a modification definitions set
void setFragmentMassTolerance(double tolerance)
setter for the fragment mass tolerance
double precursor_mass_tolerance_plus_
Definition XTandemInfile.h:220
MassType
Mass type of the precursor, either monoisotopic or average.
Definition XTandemInfile.h:44
void setSemiCleavage(const bool semi_cleavage)
set state of semi cleavage
double fragment_mass_tolerance_
Definition XTandemInfile.h:218
void setMaxPrecursorCharge(Int max_charge)
sets the max precursor charge
void setOutputResults(const std::string &result)
sets the output result type ("all", "valid" or "stochastic")
UInt max_precursor_charge_
Definition XTandemInfile.h:232
~XTandemInfile() override
constructor
std::string cleavage_site_
Definition XTandemInfile.h:252
ErrorUnit fragment_mass_error_unit_
Definition XTandemInfile.h:224
UInt number_of_threads_
Definition XTandemInfile.h:238
void setOutputFilename(const std::string &output)
sets the output filename
MassType precursor_mass_type_
Definition XTandemInfile.h:230
void setPrecursorMassTolerancePlus(double tol)
sets the precursor mass tolerance (plus only)
ErrorUnit getPrecursorMassErrorUnit() const
returns the precursor mass error unit (Da, ppm)
void setCleavageSite(const std::string &cleavage_site)
set the cleavage site with a X! Tandem conform regex
ErrorUnit getFragmentMassErrorUnit() const
returns the fragment mass error unit (Da, ppm)
double precursor_lower_mz_
Definition XTandemInfile.h:234
XTandemInfile(const XTandemInfile &rhs)
double max_valid_evalue_
Definition XTandemInfile.h:267
@ PPM
Mass delta in parts per million.
int Int
Signed integer type.
Definition Types.h:72
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19