/usr/include/OpenMS/FORMAT/XTandemInfile.h is in libopenms-dev 1.11.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universitaet Berlin 2002-2013.
//
// This software is released under a three-clause BSD license:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of any author or any participating institution
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
// For a full list of authors, refer to the file AUTHORS.
// --------------------------------------------------------------------------
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
// INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// --------------------------------------------------------------------------
// $Maintainer: Stephan Aiche $
// $Authors: Andreas Bertsch $
// --------------------------------------------------------------------------
#ifndef OPENMS_FORMAT_XTANDEMINFILE_H
#define OPENMS_FORMAT_XTANDEMINFILE_H
#include <OpenMS/DATASTRUCTURES/String.h>
#include <OpenMS/FORMAT/HANDLERS/XTandemInfileXMLHandler.h>
#include <OpenMS/CHEMISTRY/ModificationDefinitionsSet.h>
#include <OpenMS/FORMAT/XMLFile.h>
namespace OpenMS
{
/**
@brief XTandem input file.
This class is able to create a X!Tandem configuration files to be used with Xtandem.
@ingroup FileIO
*/
class OPENMS_DLLAPI XTandemInfile :
public Internal::XMLFile
{
public:
/// error unit, either Da or ppm
enum ErrorUnit
{
DALTONS = 0,
PPM
};
/// Mass type of the precursor, either monoisotopic or average
enum MassType
{
MONOISOTOPIC = 0,
AVERAGE
};
/// constructor
XTandemInfile();
/// constructor
virtual ~XTandemInfile();
//<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
//<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
//<note type="input" label="spectrum, parent monoisotopic mass error plus">100</note>
//<note type="input" label="spectrum, parent monoisotopic mass error minus">100</note>
//<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
//<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
//<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
//<note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
//<note>The value for this parameter may be 'Daltons' or 'ppm': all other values are ignored</note>
//<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
//<note>values are monoisotopic|average </note>
/// setter for the fragment mass tolerance
void setFragmentMassTolerance(double tolerance);
/// returns the fragment mass tolerance
double getFragmentMassTolerance() const;
/// sets the precursor mass tolerance (plus only)
void setPrecursorMassTolerancePlus(double tol);
/// returns the precursor mass tolerance (plus only)
double getPrecursorMassTolerancePlus() const;
/// set the precursor mass tolerance (minus only)
void setPrecursorMassToleranceMinus(double tol);
/// returns the precursor mass tolerance (minus only)
double getPrecursorMassToleranceMinus() const;
/// sets the precursor mass type
void setPrecursorErrorType(MassType mono_isotopic);
/// returns the precursor mass type
MassType getPrecursorErrorType() const;
/// sets the fragment mass error unit (Da, ppm)
void setFragmentMassErrorUnit(ErrorUnit unit);
/// returns the fragment mass error unit (Da, ppm)
ErrorUnit getFragmentMassErrorUnit() const;
/// sets the precursor mass error unit (Da, ppm)
void setPrecursorMassErrorUnit(ErrorUnit unit);
/// returns the precursor mass error unit (Da, ppm)
ErrorUnit getPrecursorMassErrorUnit() const;
/// sets the number of threads used during the identifications
void setNumberOfThreads(UInt threads);
/// returns the number of threads
UInt getNumberOfThreads() const;
/// sets the modifications using a modification definitions set
void setModifications(const ModificationDefinitionsSet& mods);
/// returns the modifications set, using a modification definitions set
const ModificationDefinitionsSet& getModifications() const;
/// sets the output filename
void setOutputFilename(const String& output);
/// returns the output filename
const String& getOutputFilename() const;
/// sets the input filename
void setInputFilename(const String& input_file);
/// returns the input filename
const String& getInputFilename() const;
/// set the filename of the taxonomy file
void setTaxonomyFilename(const String& filename);
/// returns the filename of the taxonomy file
const String& getTaxonomyFilename() const;
/// sets the default paramters file
void setDefaultParametersFilename(const String& filename);
/// returns the default parameters file
const String& getDefaultParametersFilename() const;
/// sets the taxon used in the taxonomy file
void setTaxon(const String& taxon);
/// returns the taxon used in the taxonomy file
const String& getTaxon() const;
/// sets the max precursor charge
void setMaxPrecursorCharge(Int max_charge);
/// returns the max precursor charge
Int getMaxPrecursorCharge() const;
/// sets the number of missed cleavages allowed
void setNumberOfMissedCleavages(UInt missed_cleavages);
/// returns the number of missed cleavages allowed
UInt getNumberOfMissedCleavages() const;
/// sets the max valid E-value allowed in the list
void setMaxValidEValue(double value);
/// returns the max valid E-value allowed in the list
double getMaxValidEValue() const;
/// get state of refine setting
bool isRefining() const;
/// set state of semi cleavage
void setSemiCleavage(const bool semi_cleavage);
/// set state of refine setting
void setRefine(const bool refine);
/**
@brief Writes the XTandemInfile to the given file
@param filename the name of the file which is written
@throw UnableToCreateFile is thrown if the given file could not be created
*/
void write(const String& filename);
/**
@brief Reads the information from the given filename
@param filename the file which should be read from
@throw FileNotFound is thrown if the given file could not be found
@throw ParseError is thrown if the given file could not be parsed
*/
void load(const String& filename);
protected:
XTandemInfile(const XTandemInfile& rhs);
XTandemInfile& operator=(const XTandemInfile& rhs);
void writeTo_(std::ostream& os);
void writeNote_(std::ostream& os, const String& type, const String& label, const String& value);
void writeNote_(std::ostream& os, const String& type, const String& label, const char* value);
void writeNote_(std::ostream& os, const String& type, const String& label, bool value);
/**
@brief Converts the given set of Modifications into a format compatible to X!Tandem.
@param mods The modifications to convert.
@return A X!Tandem compatible string representation.
*/
String convertModificationSet_(const std::set<ModificationDefinition>& mods) const;
double fragment_mass_tolerance_;
double precursor_mass_tolerance_plus_;
double precursor_mass_tolerance_minus_;
MassType precursor_mass_type_;
ErrorUnit precursor_mass_error_unit_;
ErrorUnit fragment_mass_error_unit_;
MassType fragment_mass_type_;
UInt max_precursor_charge_;
double precursor_lower_mz_;
double fragment_lower_mz_;
UInt number_of_threads_;
UInt batch_size_;
ModificationDefinitionsSet modifications_;
String input_filename_;
String output_filename_;
String taxonomy_file_;
String taxon_;
String cleavage_site_;
/// Enable/disable xtandem refinement
bool refine_;
/// semi cleavage
bool semi_cleavage_;
double refine_max_valid_evalue_;
// scoring
UInt number_of_missed_cleavages_;
String default_parameters_file_;
// output parameters
double max_valid_evalue_;
/**
Holds additional nodes that were not translated to member variables, but are conserved for storing.
<note type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>
*/
std::vector<Internal::XTandemInfileNote> notes_;
};
} // namespace OpenMS
#endif // OPENMS_FORMAT_XTANDEMINFILE_H
|