OpenMS
InspectInfile Class Reference

Inspect input file adapter. More...

#include <OpenMS/FORMAT/InspectInfile.h>

Collaboration diagram for InspectInfile:
[legend]

Public Member Functions

 InspectInfile ()
 default constructor More...
 
 InspectInfile (const InspectInfile &inspect_infile)
 copy constructor More...
 
virtual ~InspectInfile ()
 destructor More...
 
InspectInfileoperator= (const InspectInfile &inspect_infile)
 assignment operator More...
 
bool operator== (const InspectInfile &inspect_infile) const
 equality operator More...
 
void store (const String &filename)
 
void handlePTMs (const String &modification_line, const String &modifications_filename, const bool monoisotopic)
 
const StringgetSpectra () const
 Specifies a spectrum file to search. More...
 
void setSpectra (const String &spectra)
 
const StringgetDb () const
 Specifies the name of a database (.trie file) to search. More...
 
void setDb (const String &db)
 
const StringgetEnzyme () const
 Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values. More...
 
void setEnzyme (const String &enzyme)
 
Int getModificationsPerPeptide () const
 Number of PTMs permitted in a single peptide. More...
 
void setModificationsPerPeptide (Int modifications_per_peptide)
 
UInt getBlind () const
 run Inspect in a blind mode More...
 
void setBlind (UInt blind)
 
float getMaxPTMsize () const
 the maximum modification size (in Da) to consider in a blind search More...
 
void setMaxPTMsize (float maxptmsize)
 
float getPrecursorMassTolerance () const
 Specifies the parent mass tolerance, in Daltons. More...
 
void setPrecursorMassTolerance (float precursor_mass_tolerance)
 
float getPeakMassTolerance () const
 How far b and y peaks can be shifted from their expected masses. More...
 
void setPeakMassTolerance (float peak_mass_tolerance)
 
UInt getMulticharge () const
 If set to true, attempt to guess the precursor charge and mass, and consider multiple charge states if feasible. More...
 
void setMulticharge (UInt multicharge)
 
const StringgetInstrument () const
 If set to QTOF, uses a QTOF-derived fragmentation model, and does not attempt to correct the parent mass. More...
 
void setInstrument (const String &instrument)
 
Int getTagCount () const
 Number of tags to generate. More...
 
void setTagCount (Int TagCount)
 
const std::map< String, std::vector< String > > & getModifications () const
 return the modifications (the modification names map to the affected residues, the mass change and the type) More...
 

Private Attributes

String spectra_
 Specifies a spectrum file to search. More...
 
String db_
 Specifies the name of a database (.trie file) to search. The .trie file contains one or more protein sequences delimited by asterisks, with no whitespace or other data. More...
 
String enzyme_
 Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values. More...
 
Int modifications_per_peptide_
 allowed number of modifications per peptide More...
 
UInt blind_
 
float maxptmsize_
 0 - false, 1 - true, 2 - not set More...
 
float precursor_mass_tolerance_
 Specifies the parent mass tolerance, in Daltons. A candidate's flanking mass can differ from the tag's flanking mass by no more than this amount. <0 is not set. More...
 
float peak_mass_tolerance_
 How far b and y peaks can be shifted from their expected masses. Default is 0.5. Higher values produce a more sensitive but much slower search. <0 is not set. More...
 
UInt multicharge_
 
String instrument_
 0 - false, 1 - true, 2 - not set More...
 
Int tag_count_
 Number of tags to generate. <0 is not set. More...
 
std::map< String, std::vector< String > > PTMname_residues_mass_type_
 the modification names map to the affected residues, the mass change and the type More...
 

Detailed Description

Inspect input file adapter.

Creates a file that can be used for Inspect search from a peak list.

Constructor & Destructor Documentation

◆ InspectInfile() [1/2]

default constructor

◆ InspectInfile() [2/2]

InspectInfile ( const InspectInfile inspect_infile)

copy constructor

◆ ~InspectInfile()

virtual ~InspectInfile ( )
virtual

destructor

Member Function Documentation

◆ getBlind()

UInt getBlind ( ) const

run Inspect in a blind mode

If true, use the MS-Alignment algorithm to perform a blind search (allowing arbitrary modification masses). Running a blind search with one mod per peptide is slower than the normal (tag-based) search; running time is approximately 1 second per spectra per megabyte of database. Running a blind search with two mods is significantly slower. We recommend performing "blind" searches against a small database, containing proteins output by an earlier search.

◆ getDb()

const String& getDb ( ) const

Specifies the name of a database (.trie file) to search.

The .trie file contains one or more protein sequences delimited by asterisks, with no whitespace or other data. Use PrepDB.py (see above) to prepare a .trie file. Most .trie files have a corresponding .index file giving the names of the proteins. You can specify at most one database.

◆ getEnzyme()

const String& getEnzyme ( ) const

Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values.

◆ getInstrument()

const String& getInstrument ( ) const

If set to QTOF, uses a QTOF-derived fragmentation model, and does not attempt to correct the parent mass.

◆ getMaxPTMsize()

float getMaxPTMsize ( ) const

the maximum modification size (in Da) to consider in a blind search

Defaults to 200. Larger values require more time to search.

◆ getModifications()

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

return the modifications (the modification names map to the affected residues, the mass change and the type)

◆ getModificationsPerPeptide()

Int getModificationsPerPeptide ( ) const

Number of PTMs permitted in a single peptide.

◆ getMulticharge()

UInt getMulticharge ( ) const

If set to true, attempt to guess the precursor charge and mass, and consider multiple charge states if feasible.

◆ getPeakMassTolerance()

float getPeakMassTolerance ( ) const

How far b and y peaks can be shifted from their expected masses.

Default is 0.5. Higher values produce a more sensitive but much slower search.

◆ getPrecursorMassTolerance()

float getPrecursorMassTolerance ( ) const

Specifies the parent mass tolerance, in Daltons.

A candidate's flanking mass can differ from the tag's flanking mass by no more than this amount.

◆ getSpectra()

const String& getSpectra ( ) const

Specifies a spectrum file to search.

You can specify the name of a directory to search every file in that directory (non-recursively). Supported spectra file formats are .mzXML, .mzData, .ms2, dta, and .pkl. Multiple spectra in one .dta file are not supported.

◆ getTagCount()

Int getTagCount ( ) const

Number of tags to generate.

◆ handlePTMs()

void handlePTMs ( const String modification_line,
const String modifications_filename,
const bool  monoisotopic 
)

retrieves the name, mass change, affected residues, type and position for all modifications from a string

Parameters
modification_line
modifications_filename
monoisotopicif true, masses are considered to be monoisotopic
Exceptions
FileNotReadableif the modifications_filename could not be read
FileNotFoundif modifications_filename could not be found
ParseErrorif modifications_filename could not be parsed

◆ operator=()

InspectInfile& operator= ( const InspectInfile inspect_infile)

assignment operator

◆ operator==()

bool operator== ( const InspectInfile inspect_infile) const

equality operator

◆ setBlind()

void setBlind ( UInt  blind)

◆ setDb()

void setDb ( const String db)

◆ setEnzyme()

void setEnzyme ( const String enzyme)

◆ setInstrument()

void setInstrument ( const String instrument)

◆ setMaxPTMsize()

void setMaxPTMsize ( float  maxptmsize)

◆ setModificationsPerPeptide()

void setModificationsPerPeptide ( Int  modifications_per_peptide)

◆ setMulticharge()

void setMulticharge ( UInt  multicharge)

◆ setPeakMassTolerance()

void setPeakMassTolerance ( float  peak_mass_tolerance)

◆ setPrecursorMassTolerance()

void setPrecursorMassTolerance ( float  precursor_mass_tolerance)

◆ setSpectra()

void setSpectra ( const String spectra)

◆ setTagCount()

void setTagCount ( Int  TagCount)

◆ store()

void store ( const String filename)

stores the experiment data in an Inspect input file that can be used as input for Inspect shell execution

Parameters
filenameset the given filename
Exceptions
UnableToCreateFileis thrown if the file could not be created

Member Data Documentation

◆ blind_

UInt blind_
private

If true, use the MS-Alignment algorithm to perform a blind search (allowing arbitrary modification masses). Running a blind search with one mod per peptide is slower than the normal (tag-based) search; running time is approximately 1 second per spectra per megabyte of database. Running a blind search with two mods is significantly slower. We recommend performing "blind" searches against a small database, containing proteins output by an earlier search. (The "Summary.py" script can be used to generate a second-pass database from initial search results)

◆ db_

String db_
private

Specifies the name of a database (.trie file) to search. The .trie file contains one or more protein sequences delimited by asterisks, with no whitespace or other data.

◆ enzyme_

String enzyme_
private

Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values.

◆ instrument_

String instrument_
private

0 - false, 1 - true, 2 - not set

If set to QTOF, uses a QTOF-derived fragmentation model, and does not attempt to correct the parent mass.

◆ maxptmsize_

float maxptmsize_
private

0 - false, 1 - true, 2 - not set

For blind search, specifies the maximum modification size (in Da) to consider. Defaults to 200. Larger values require more time to search. <0 is not set

◆ modifications_per_peptide_

Int modifications_per_peptide_
private

allowed number of modifications per peptide

◆ multicharge_

UInt multicharge_
private

If set to true, attempt to guess the precursor charge and mass, and consider multiple charge states if feasible.

◆ peak_mass_tolerance_

float peak_mass_tolerance_
private

How far b and y peaks can be shifted from their expected masses. Default is 0.5. Higher values produce a more sensitive but much slower search. <0 is not set.

◆ precursor_mass_tolerance_

float precursor_mass_tolerance_
private

Specifies the parent mass tolerance, in Daltons. A candidate's flanking mass can differ from the tag's flanking mass by no more than this amount. <0 is not set.

◆ PTMname_residues_mass_type_

std::map<String, std::vector<String> > PTMname_residues_mass_type_
private

the modification names map to the affected residues, the mass change and the type

◆ spectra_

String spectra_
private

Specifies a spectrum file to search.

◆ tag_count_

Int tag_count_
private

Number of tags to generate. <0 is not set.