Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XTandemInfile Class Reference

XTandem input file. More...

#include <OpenMS/FORMAT/XTandemInfile.h>

Inheritance diagram for XTandemInfile:
XMLFile

Public Types

enum  ErrorUnit { DALTONS = 0, PPM }
 error unit, either Da or ppm More...
 
enum  MassType { MONOISOTOPIC = 0, AVERAGE }
 Mass type of the precursor, either monoisotopic or average. More...
 

Public Member Functions

 XTandemInfile ()
 constructor More...
 
virtual ~XTandemInfile ()
 constructor More...
 
void setFragmentMassTolerance (double tolerance)
 setter for the fragment mass tolerance More...
 
double getFragmentMassTolerance () const
 returns the fragment mass tolerance More...
 
void setPrecursorMassTolerancePlus (double tol)
 sets the precursor mass tolerance (plus only) More...
 
double getPrecursorMassTolerancePlus () const
 returns the precursor mass tolerance (plus only) More...
 
void setPrecursorMassToleranceMinus (double tol)
 set the precursor mass tolerance (minus only) More...
 
double getPrecursorMassToleranceMinus () const
 returns the precursor mass tolerance (minus only) More...
 
void setPrecursorErrorType (MassType mono_isotopic)
 sets the precursor mass type More...
 
MassType getPrecursorErrorType () const
 returns the precursor mass type More...
 
void setFragmentMassErrorUnit (ErrorUnit unit)
 sets the fragment mass error unit (Da, ppm) More...
 
ErrorUnit getFragmentMassErrorUnit () const
 returns the fragment mass error unit (Da, ppm) More...
 
void setPrecursorMassErrorUnit (ErrorUnit unit)
 sets the precursor mass error unit (Da, ppm) More...
 
ErrorUnit getPrecursorMassErrorUnit () const
 returns the precursor mass error unit (Da, ppm) More...
 
void setNumberOfThreads (UInt threads)
 sets the number of threads used during the identifications More...
 
UInt getNumberOfThreads () const
 returns the number of threads More...
 
void setModifications (const ModificationDefinitionsSet &mods)
 sets the modifications using a modification definitions set More...
 
const ModificationDefinitionsSetgetModifications () const
 returns the modifications set, using a modification definitions set More...
 
void setOutputFilename (const String &output)
 sets the output filename More...
 
const StringgetOutputFilename () const
 returns the output filename More...
 
void setInputFilename (const String &input_file)
 sets the input filename More...
 
const StringgetInputFilename () const
 returns the input filename More...
 
void setTaxonomyFilename (const String &filename)
 set the filename of the taxonomy file More...
 
const StringgetTaxonomyFilename () const
 returns the filename of the taxonomy file More...
 
void setDefaultParametersFilename (const String &filename)
 sets the default parameters file More...
 
const StringgetDefaultParametersFilename () const
 returns the default parameters file More...
 
void setTaxon (const String &taxon)
 sets the taxon used in the taxonomy file More...
 
const StringgetTaxon () const
 returns the taxon used in the taxonomy file More...
 
void setMaxPrecursorCharge (Int max_charge)
 sets the max precursor charge More...
 
Int getMaxPrecursorCharge () const
 returns the max precursor charge More...
 
void setNumberOfMissedCleavages (UInt missed_cleavages)
 sets the number of missed cleavages allowed More...
 
UInt getNumberOfMissedCleavages () const
 returns the number of missed cleavages allowed More...
 
void setOutputResults (String result)
 sets the output result type ("all", "valid" or "stochastic") More...
 
String getOutputResults () const
 returns the output result type ("all", "valid" or "stochastic") More...
 
void setMaxValidEValue (double value)
 sets the max valid E-value allowed in the list More...
 
double getMaxValidEValue () const
 returns the max valid E-value allowed in the list More...
 
bool isRefining () const
 get state of refine setting More...
 
void setSemiCleavage (const bool semi_cleavage)
 set state of semi cleavage More...
 
void setAllowIsotopeError (const bool allow_isotope_error)
 set if misassignment of precursor to first and second 13C isotopic peak should also be considered More...
 
void setRefine (const bool refine)
 set state of refine setting More...
 
void setCleavageSite (const String &cleavage_site)
 set the cleavage site with a xtandem conform regex More...
 
const StringgetCleavageSite () const
 returns the cleavage site regex More...
 
void write (const String &filename)
 Writes the XTandemInfile to the given file. More...
 
void load (const String &filename)
 Reads the information from the given filename. More...
 
- Public Member Functions inherited from XMLFile
 XMLFile ()
 Default constructor. More...
 
 XMLFile (const String &schema_location, const String &version)
 Constructor that sets the schema location. More...
 
virtual ~XMLFile ()
 Destructor. More...
 
bool isValid (const String &filename, std::ostream &os)
 Checks if a file validates against the XML schema. More...
 
const StringgetVersion () const
 return the version of the schema More...
 

Protected Member Functions

 XTandemInfile (const XTandemInfile &rhs)
 
XTandemInfileoperator= (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)
 
String convertModificationSet_ (const std::set< ModificationDefinition > &mods) const
 Converts the given set of Modifications into a format compatible to X!Tandem. More...
 
- Protected Member Functions inherited from XMLFile
void parse_ (const String &filename, XMLHandler *handler)
 Parses the XML file given by filename using the handler given by handler. More...
 
void save_ (const String &filename, XMLHandler *handler) const
 Stores the contents of the XML handler given by handler in the file given by filename. More...
 
void enforceEncoding_ (const String &encoding)
 

Protected Attributes

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_
 
bool refine_
 Enable/disable xtandem refinement. More...
 
bool semi_cleavage_
 semi cleavage More...
 
bool allow_isotope_error_
 
double refine_max_valid_evalue_
 
UInt number_of_missed_cleavages_
 
String default_parameters_file_
 
String output_results_
 
double max_valid_evalue_
 
std::vector< Internal::XTandemInfileNotenotes_
 
- Protected Attributes inherited from XMLFile
String schema_location_
 XML schema file location. More...
 
String schema_version_
 Version string. More...
 
String enforced_encoding_
 Encoding string that replaces the encoding (system dependent or specified in the XML). Disabled if empty. Used as a workaround for XTandem output xml. More...
 

Detailed Description

XTandem input file.

This class is able to create a X!Tandem configuration files to be used with Xtandem.

Member Enumeration Documentation

enum ErrorUnit

error unit, either Da or ppm

Enumerator
DALTONS 
PPM 
enum MassType

Mass type of the precursor, either monoisotopic or average.

Enumerator
MONOISOTOPIC 
AVERAGE 

Constructor & Destructor Documentation

constructor

virtual ~XTandemInfile ( )
virtual

constructor

XTandemInfile ( const XTandemInfile rhs)
protected

Member Function Documentation

String convertModificationSet_ ( const std::set< ModificationDefinition > &  mods) const
protected

Converts the given set of Modifications into a format compatible to X!Tandem.

Parameters
modsThe modifications to convert.
Returns
A X!Tandem compatible string representation.
const String& getCleavageSite ( ) const

returns the cleavage site regex

const String& getDefaultParametersFilename ( ) const

returns the default parameters file

ErrorUnit getFragmentMassErrorUnit ( ) const

returns the fragment mass error unit (Da, ppm)

double getFragmentMassTolerance ( ) const

returns the fragment mass tolerance

const String& getInputFilename ( ) const

returns the input filename

Int getMaxPrecursorCharge ( ) const

returns the max precursor charge

double getMaxValidEValue ( ) const

returns the max valid E-value allowed in the list

const ModificationDefinitionsSet& getModifications ( ) const

returns the modifications set, using a modification definitions set

UInt getNumberOfMissedCleavages ( ) const

returns the number of missed cleavages allowed

UInt getNumberOfThreads ( ) const

returns the number of threads

const String& getOutputFilename ( ) const

returns the output filename

String getOutputResults ( ) const

returns the output result type ("all", "valid" or "stochastic")

MassType getPrecursorErrorType ( ) const

returns the precursor mass type

ErrorUnit getPrecursorMassErrorUnit ( ) const

returns the precursor mass error unit (Da, ppm)

double getPrecursorMassToleranceMinus ( ) const

returns the precursor mass tolerance (minus only)

double getPrecursorMassTolerancePlus ( ) const

returns the precursor mass tolerance (plus only)

const String& getTaxon ( ) const

returns the taxon used in the taxonomy file

const String& getTaxonomyFilename ( ) const

returns the filename of the taxonomy file

bool isRefining ( ) const

get state of refine setting

void load ( const String filename)

Reads the information from the given filename.

Parameters
filenamethe file which should be read from
Exceptions
FileNotFoundis thrown if the given file could not be found
ParseErroris thrown if the given file could not be parsed
XTandemInfile& operator= ( const XTandemInfile rhs)
protected
void setAllowIsotopeError ( const bool  allow_isotope_error)

set if misassignment of precursor to first and second 13C isotopic peak should also be considered

void setCleavageSite ( const String cleavage_site)

set the cleavage site with a xtandem conform regex

void setDefaultParametersFilename ( const String filename)

sets the default parameters file

void setFragmentMassErrorUnit ( ErrorUnit  unit)

sets the fragment mass error unit (Da, ppm)

void setFragmentMassTolerance ( double  tolerance)

setter for the fragment mass tolerance

void setInputFilename ( const String input_file)

sets the input filename

void setMaxPrecursorCharge ( Int  max_charge)

sets the max precursor charge

void setMaxValidEValue ( double  value)

sets the max valid E-value allowed in the list

void setModifications ( const ModificationDefinitionsSet mods)

sets the modifications using a modification definitions set

void setNumberOfMissedCleavages ( UInt  missed_cleavages)

sets the number of missed cleavages allowed

void setNumberOfThreads ( UInt  threads)

sets the number of threads used during the identifications

void setOutputFilename ( const String output)

sets the output filename

void setOutputResults ( String  result)

sets the output result type ("all", "valid" or "stochastic")

void setPrecursorErrorType ( MassType  mono_isotopic)

sets the precursor mass type

void setPrecursorMassErrorUnit ( ErrorUnit  unit)

sets the precursor mass error unit (Da, ppm)

void setPrecursorMassToleranceMinus ( double  tol)

set the precursor mass tolerance (minus only)

void setPrecursorMassTolerancePlus ( double  tol)

sets the precursor mass tolerance (plus only)

void setRefine ( const bool  refine)

set state of refine setting

void setSemiCleavage ( const bool  semi_cleavage)

set state of semi cleavage

void setTaxon ( const String taxon)

sets the taxon used in the taxonomy file

void setTaxonomyFilename ( const String filename)

set the filename of the taxonomy file

void write ( const String filename)

Writes the XTandemInfile to the given file.

Parameters
filenamethe name of the file which is written
Exceptions
UnableToCreateFileis thrown if the given file could not be created
void writeNote_ ( std::ostream &  os,
const String type,
const String label,
const String value 
)
protected
void writeNote_ ( std::ostream &  os,
const String type,
const String label,
const char *  value 
)
protected
void writeNote_ ( std::ostream &  os,
const String type,
const String label,
bool  value 
)
protected
void writeTo_ ( std::ostream &  os)
protected

Member Data Documentation

bool allow_isotope_error_
protected
UInt batch_size_
protected
String cleavage_site_
protected
String default_parameters_file_
protected
double fragment_lower_mz_
protected
ErrorUnit fragment_mass_error_unit_
protected
double fragment_mass_tolerance_
protected
MassType fragment_mass_type_
protected
String input_filename_
protected
UInt max_precursor_charge_
protected
double max_valid_evalue_
protected
ModificationDefinitionsSet modifications_
protected
std::vector<Internal::XTandemInfileNote> notes_
protected

Holds additional nodes that were not translated to member variables, but are conserved for storing. &ltnote type="input" label="spectrum, fragment monoisotopic mass error">0.4</note>

UInt number_of_missed_cleavages_
protected
UInt number_of_threads_
protected
String output_filename_
protected
String output_results_
protected
double precursor_lower_mz_
protected
ErrorUnit precursor_mass_error_unit_
protected
double precursor_mass_tolerance_minus_
protected
double precursor_mass_tolerance_plus_
protected
MassType precursor_mass_type_
protected
bool refine_
protected

Enable/disable xtandem refinement.

double refine_max_valid_evalue_
protected
bool semi_cleavage_
protected

semi cleavage

String taxon_
protected
String taxonomy_file_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Nov 1 2016 16:34:46 using doxygen 1.8.11