OpenMS
Loading...
Searching...
No Matches
InspectInfile Class Reference

Inspect input file adapter. More...

#include <OpenMS/FORMAT/InspectInfile.h>

Collaboration diagram for InspectInfile:
[legend]

Public Member Functions

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

Private Attributes

std::string spectra_
 Specifies a spectrum file to search.
 
std::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.
 
std::string enzyme_
 Specifies the name of a enzyme. "Trypsin", "None", and "Chymotrypsin" are the available values.
 
Int modifications_per_peptide_
 allowed number of modifications per peptide
 
UInt blind_
 
float maxptmsize_
 0 - false, 1 - true, 2 - not set
 
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.
 
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.
 
UInt multicharge_
 
std::string instrument_
 0 - false, 1 - true, 2 - not set
 
Int tag_count_
 Number of tags to generate. <0 is not set.
 
std::map< std::string, std::vector< std::string > > PTMname_residues_mass_type_
 the modification names map to the affected residues, the mass change and the type
 

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 std::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 std::string & getEnzyme ( ) const

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

◆ getInstrument()

const std::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< std::string, std::vector< std::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 std::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 std::string &  modification_line,
const std::string &  modifications_filename,
const bool  monoisotopic 
)

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

Parameters
[in]modification_line
[in]modifications_filename
[in]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 std::string &  db)

◆ setEnzyme()

void setEnzyme ( const std::string &  enzyme)

◆ setInstrument()

void setInstrument ( const std::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 std::string &  spectra)

◆ setTagCount()

void setTagCount ( Int  TagCount)

◆ store()

void store ( const std::string &  filename)

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

Parameters
[in]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_

std::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_

std::string enzyme_
private

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

◆ instrument_

std::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<std::string, std::vector<std::string> > PTMname_residues_mass_type_
private

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

◆ spectra_

std::string spectra_
private

Specifies a spectrum file to search.

◆ tag_count_

Int tag_count_
private

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