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

Mascot input file adapter. More...

#include <OpenMS/FORMAT/MascotInfile.h>

Inheritance diagram for MascotInfile:
ProgressLogger

Public Member Functions

 MascotInfile ()
 constructor More...
 
virtual ~MascotInfile ()
 constructor More...
 
void store (const String &filename, const PeakSpectrum &spec, double mz, double retention_time, String search_title)
 stores the peak list in a MascotInfile that can be used as input for MASCOT shell execution More...
 
void store (const String &filename, const MSExperiment<> &experiment, String search_title)
 stores the experiment data in a MascotInfile that can be used as input for MASCOT shell execution More...
 
template<typename MapType >
void load (const String &filename, MapType &exp)
 
const StringgetBoundary ()
 returns the boundary used for the MIME format More...
 
void setBoundary (const String &boundary)
 sets the boundary used for the MIME format.
By default a 22 character random string is used More...
 
const StringgetDB ()
 returns the DB to use More...
 
void setDB (const String &db)
 sets the DB to use (default: MSDB). See <mascot path>/config/mascot.dat in "Databases" section for possible settings More...
 
const StringgetSearchType ()
 returns the search type More...
 
void setSearchType (const String &search_type)
 sets the search type (default: MIS). So far only MIS is supported!
Valid types are "MIS" (MS/MS Ion Search), "PMF" (Peptide Mass Fingerprint) , "SQ" (Sequence Query) More...
 
const StringgetHits ()
 returns the number of hits to report back More...
 
void setHits (const String &hits)
 sets the number of hits to report back (default: 20) More...
 
const StringgetCleavage ()
 returns the enzyme used for cleavage More...
 
void setCleavage (const String &cleavage)
 sets the enzyme used for cleavage (default: Trypsin).
See <mascot path>/config/enzymes for possible settings. More...
 
const StringgetMassType ()
 returns the used mass type ("Monoisotopic" or "Average") More...
 
void setMassType (const String &mass_type)
 sets the used mass type "Monoisotopic" or "Average" (default: Monoisotopic) More...
 
const std::vector< String > & getModifications ()
 returns a vector containing the fixed modifications (default: none) More...
 
void setModifications (const std::vector< String > &mods)
 sets the fixed modifications (default: none).
See <mascot path>/config/mod_file for possible settings. More...
 
const std::vector< String > & getVariableModifications ()
 returns a vector containing the variable modifications (default: none) More...
 
void setVariableModifications (const std::vector< String > &mods)
 sets the fixed modifications (default: none).
See <mascot path>/config/mod_file for possible settings. More...
 
const StringgetInstrument ()
 returns the instrument type More...
 
void setInstrument (const String &instrument)
 sets the instrument type (Default: Default).
Possible instruments: ESI-QUAD-TOF, MALDI-TOF-PSD, ESI-TRAP, ESI-QUAD, ESI-FTICR, MALDI-TOF-TOF, ESI-4SECTOR, FTMS-ECD, MALDI-QUAD-TOF, MALDI-QIT-TOF More...
 
UInt getMissedCleavages ()
 returns the number of allowed missed cleavages More...
 
void setMissedCleavages (UInt missed_cleavages)
 sets the number of allowed missed cleavages (default: 1) More...
 
float getPrecursorMassTolerance ()
 returns the precursor mass tolerance More...
 
void setPrecursorMassTolerance (float precursor_mass_tolerance)
 sets the precursor mass tolerance in Da (default: 2.0) More...
 
float getPeakMassTolerance ()
 returns the peak mass tolerance in Da More...
 
void setPeakMassTolerance (float ion_mass_tolerance)
 sets the peak mass tolerance in Da (default: 1.0) More...
 
const StringgetTaxonomy ()
 returns the taxonomy More...
 
void setTaxonomy (const String &taxonomy)
 sets the taxonomy (default: All entries).
See <mascot path>/config/taxonomy for possible settings. More...
 
const StringgetFormVersion ()
 returns the Mascot form version More...
 
void setFormVersion (const String &form_version)
 sets the Mascot form version (default: 1.01) More...
 
const StringgetCharges ()
 returns the charges More...
 
void setCharges (std::vector< Int > &charges)
 sets the charges (default: 1+, 2+ and 3+) More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

Protected Member Functions

void writeParameterHeader_ (const String &name, FILE *fp, bool line_break=true)
 writes a parameter header More...
 
void writeHeader_ (FILE *fp)
 writes the full header More...
 
void writeSpectrum_ (FILE *fp, const String &filename, const PeakSpectrum &peaks)
 writes the spectrum More...
 
void writeMSExperiment_ (FILE *fp, const String &filename, const MSExperiment<> &experiment)
 writes the MSExperiment More...
 
bool getNextSpectrum_ (std::istream &is, std::vector< std::pair< double, double > > &spectrum, UInt &charge, double &precursor_mz, double &precursor_int, double &rt, String &title)
 

Protected Attributes

double mz_
 parent mass More...
 
String charges_
 charge states to use More...
 
String search_title_
 the search title of the mascot search More...
 
String db_
 the DB to search in More...
 
String search_type_
 search type: MIS, SQ or PMF More...
 
String hits_
 number of hits to report More...
 
String cleavage_
 Enzyme used for cleavage. More...
 
String mass_type_
 Monoisotopic/average mass. More...
 
std::vector< Stringmods_
 fixed Modifications More...
 
std::vector< Stringvariable_mods_
 variable Modifications More...
 
String instrument_
 the used instrument More...
 
UInt missed_cleavages_
 number of missed cleavages More...
 
float precursor_mass_tolerance_
 precursor mass tolerance in Da More...
 
float ion_mass_tolerance_
 m/z tolerance of ions in Da More...
 
String taxonomy_
 taxonomy More...
 
String form_version_
 form version More...
 
String boundary_
 the boundary used for the MIME format More...
 
double retention_time_
 the retention time More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 
- Static Protected Member Functions inherited from ProgressLogger
static String logTypeToFactoryName_ (LogType type)
 Return the name of the factory product used for this log type. More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Mascot input file adapter.

Deprecated:
Use MascotGenericFile.h instead, which uses DefaultParamHandler, is more up to date and avoids weird behaviors of this class (especially in terms of MIME boundaries when writing MGF....

Creates a file that can be used for Mascot search from a peak list or a whole experiment.

Constructor & Destructor Documentation

constructor

virtual ~MascotInfile ( )
virtual

constructor

Member Function Documentation

const String& getBoundary ( )

returns the boundary used for the MIME format

const String& getCharges ( )

returns the charges

const String& getCleavage ( )

returns the enzyme used for cleavage

const String& getDB ( )

returns the DB to use

const String& getFormVersion ( )

returns the Mascot form version

const String& getHits ( )

returns the number of hits to report back

const String& getInstrument ( )

returns the instrument type

const String& getMassType ( )

returns the used mass type ("Monoisotopic" or "Average")

UInt getMissedCleavages ( )

returns the number of allowed missed cleavages

const std::vector<String>& getModifications ( )

returns a vector containing the fixed modifications (default: none)

bool getNextSpectrum_ ( std::istream &  is,
std::vector< std::pair< double, double > > &  spectrum,
UInt charge,
double precursor_mz,
double precursor_int,
double rt,
String title 
)
protected
float getPeakMassTolerance ( )

returns the peak mass tolerance in Da

float getPrecursorMassTolerance ( )

returns the precursor mass tolerance

const String& getSearchType ( )

returns the search type

const String& getTaxonomy ( )

returns the taxonomy

const std::vector<String>& getVariableModifications ( )

returns a vector containing the variable modifications (default: none)

void load ( const String filename,
MapType exp 
)
inline

loads a Mascot Generic File into a PeakMap

Parameters
filenamefile name which the map should be read from
expthe map which is filled with the data from the given file
Exceptions
FileNotFoundis thrown if the given file could not be found

References MSExperiment< PeakT, ChromatogramPeakT >::addSpectrum(), File::exists(), SpectrumSettings::getPrecursors(), MSExperiment< PeakT, ChromatogramPeakT >::reset(), Peak1D::setIntensity(), MetaInfoInterface::setMetaValue(), MSSpectrum< PeakT >::setMSLevel(), Peak1D::setPosition(), and MSSpectrum< PeakT >::setRT().

void setBoundary ( const String boundary)

sets the boundary used for the MIME format.
By default a 22 character random string is used

void setCharges ( std::vector< Int > &  charges)

sets the charges (default: 1+, 2+ and 3+)

void setCleavage ( const String cleavage)

sets the enzyme used for cleavage (default: Trypsin).
See <mascot path>/config/enzymes for possible settings.

void setDB ( const String db)

sets the DB to use (default: MSDB). See <mascot path>/config/mascot.dat in "Databases" section for possible settings

void setFormVersion ( const String form_version)

sets the Mascot form version (default: 1.01)

void setHits ( const String hits)

sets the number of hits to report back (default: 20)

void setInstrument ( const String instrument)

sets the instrument type (Default: Default).
Possible instruments: ESI-QUAD-TOF, MALDI-TOF-PSD, ESI-TRAP, ESI-QUAD, ESI-FTICR, MALDI-TOF-TOF, ESI-4SECTOR, FTMS-ECD, MALDI-QUAD-TOF, MALDI-QIT-TOF

void setMassType ( const String mass_type)

sets the used mass type "Monoisotopic" or "Average" (default: Monoisotopic)

void setMissedCleavages ( UInt  missed_cleavages)

sets the number of allowed missed cleavages (default: 1)

void setModifications ( const std::vector< String > &  mods)

sets the fixed modifications (default: none).
See <mascot path>/config/mod_file for possible settings.

void setPeakMassTolerance ( float  ion_mass_tolerance)

sets the peak mass tolerance in Da (default: 1.0)

void setPrecursorMassTolerance ( float  precursor_mass_tolerance)

sets the precursor mass tolerance in Da (default: 2.0)

void setSearchType ( const String search_type)

sets the search type (default: MIS). So far only MIS is supported!
Valid types are "MIS" (MS/MS Ion Search), "PMF" (Peptide Mass Fingerprint) , "SQ" (Sequence Query)

void setTaxonomy ( const String taxonomy)

sets the taxonomy (default: All entries).
See <mascot path>/config/taxonomy for possible settings.

void setVariableModifications ( const std::vector< String > &  mods)

sets the fixed modifications (default: none).
See <mascot path>/config/mod_file for possible settings.

void store ( const String filename,
const PeakSpectrum spec,
double  mz,
double  retention_time,
String  search_title 
)

stores the peak list in a MascotInfile that can be used as input for MASCOT shell execution

void store ( const String filename,
const MSExperiment<> &  experiment,
String  search_title 
)

stores the experiment data in a MascotInfile that can be used as input for MASCOT shell execution

void writeHeader_ ( FILE *  fp)
protected

writes the full header

void writeMSExperiment_ ( FILE *  fp,
const String filename,
const MSExperiment<> &  experiment 
)
protected

writes the MSExperiment

void writeParameterHeader_ ( const String name,
FILE *  fp,
bool  line_break = true 
)
protected

writes a parameter header

void writeSpectrum_ ( FILE *  fp,
const String filename,
const PeakSpectrum peaks 
)
protected

writes the spectrum

Member Data Documentation

String boundary_
protected

the boundary used for the MIME format

String charges_
protected

charge states to use

String cleavage_
protected

Enzyme used for cleavage.

String db_
protected

the DB to search in

String form_version_
protected

form version

String hits_
protected

number of hits to report

String instrument_
protected

the used instrument

float ion_mass_tolerance_
protected

m/z tolerance of ions in Da

String mass_type_
protected

Monoisotopic/average mass.

UInt missed_cleavages_
protected

number of missed cleavages

std::vector<String> mods_
protected

fixed Modifications

double mz_
protected

parent mass

float precursor_mass_tolerance_
protected

precursor mass tolerance in Da

double retention_time_
protected

the retention time

String search_title_
protected

the search title of the mascot search

String search_type_
protected

search type: MIS, SQ or PMF

String taxonomy_
protected

taxonomy

std::vector<String> variable_mods_
protected

variable Modifications


OpenMS / TOPP release 2.0.0 Documentation generated on Thu Aug 20 2015 01:44:36 using doxygen 1.8.9.1