OpenMS
PrecursorIonSelectionPreprocessing Class Reference

This class implements the database preprocessing needing for precursor ion selection. More...

#include <OpenMS/ANALYSIS/TARGETED/PrecursorIonSelectionPreprocessing.h>

Inheritance diagram for PrecursorIonSelectionPreprocessing:
[legend]
Collaboration diagram for PrecursorIonSelectionPreprocessing:
[legend]

Public Member Functions

 PrecursorIonSelectionPreprocessing ()
 
 PrecursorIonSelectionPreprocessing (const PrecursorIonSelectionPreprocessing &source)
 
 ~PrecursorIonSelectionPreprocessing () override
 
PrecursorIonSelectionPreprocessingoperator= (const PrecursorIonSelectionPreprocessing &source)
 
const std::map< String, std::vector< double > > & getProtMasses () const
 
const std::vector< double > & getMasses (const String &acc) const
 
const std::map< String, std::vector< double > > & getProteinRTMap () const
 
const std::map< String, std::vector< double > > & getProteinPTMap () const
 
const std::map< String, std::vector< String > > & getProteinPeptideSequenceMap () const
 
void dbPreprocessing (const String &db_path, bool save=true)
 Calculates tryptic peptide masses of a given database and stores masses and peptide sequences. More...
 
void dbPreprocessing (const String &db_path, const String &rt_model_path, const String &dt_model_path, bool save=true)
 Calculates tryptic peptide masses of a given database and stores masses and peptide sequences. More...
 
void loadPreprocessing ()
 Loads tryptic peptide masses of a given database. More...
 
double getWeight (double mass)
 get the weighted frequency of a mass More...
 
double getRT (const String &prot_id, Size peptide_index)
 
double getPT (const String &prot_id, Size peptide_index)
 
void setFixedModifications (StringList &modifications)
 
const std::map< char, std::vector< String > > & getFixedModifications ()
 
void setGaussianParameters (double mu, double sigma)
 
double getGaussMu () const
 
double getGaussSigma () const
 
double getRTProbability (const String &prot_id, Size peptide_index, Feature &feature)
 
double getRTProbability (double pred_rt, Feature &feature)
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Protected Member Functions

void savePreprocessedDB_ (const String &db_path, const String &path)
 saves the preprocessed db More...
 
void savePreprocessedDBWithRT_ (const String &db_path, const String &path)
 
void loadPreprocessedDB_ (const String &path)
 loads the preprocessed db More...
 
void filterTaxonomyIdentifier_ (FASTAFile::FASTAEntry &entry)
 pre-process fasta identifier More...
 
Int getScanNumber_ (double rt)
 
double getRTProbability_ (double min_obs_rt, double max_obs_rt, double pred_rt)
 
void updateMembers_ () override
 update members method from DefaultParamHandler to update the members More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

std::vector< double > masses_
 all tryptic masses of the distinct peptides in the database More...
 
std::set< AASequencesequences_
 the sequences of the tryptic peptides More...
 
std::map< String, std::vector< double > > prot_masses_
 stores masses of tryptic peptides for proteins, key is the accession number More...
 
std::vector< double > bin_masses_
 the masses of the bins used for preprocessing (only used if bins are not equidistant, i.e. with ppm) More...
 
std::vector< UIntcounter_
 counter for the bins More...
 
UInt f_max_
 maximal relative frequency of a mass More...
 
bool fixed_mods_
 
std::map< String, std::vector< double > > rt_prot_map_
 
std::map< String, std::vector< double > > pt_prot_map_
 
std::map< String, std::vector< String > > prot_peptide_seq_map_
 
std::map< char, std::vector< String > > fixed_modifications_
 
double sigma_
 
double mu_
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values. More...
 

Detailed Description

This class implements the database preprocessing needing for precursor ion selection.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
precursor_mass_tolerance float10.0 min: 0.0Precursor mass tolerance which is used to query the peptide database for peptides
precursor_mass_tolerance_unit stringppm ppm, DaPrecursor mass tolerance unit.
preprocessed_db_path string  Path where the preprocessed database should be stored
preprocessed_db_pred_rt_path string  Path where the predicted rts of the preprocessed database should be stored
preprocessed_db_pred_dt_path string  Path where the predicted rts of the preprocessed database should be stored
max_peptides_per_run int100000 min: 1Number of peptides for that the pt and rt are parallelly predicted.
missed_cleavages int1 min: 0Number of allowed missed cleavages.
taxonomy string  Taxonomy
tmp_dir string  Absolute path to tmp data directory used to store files needed for rt and dt prediction.
store_peptide_sequences stringfalse true, falseFlag if peptide sequences should be stored.
rt_settings:min_rt float960.0 min: 1.0Minimal RT in the experiment (in seconds)
rt_settings:max_rt float3840.0  Maximal RT in the experiment (in seconds)
rt_settings:rt_step_size float30.0  Time between two consecutive spectra (in seconds)
rt_settings:gauss_mean float-1.0  mean of the gauss curve
rt_settings:gauss_sigma float3.0  std of the gauss curve

Note:
  • If a section name is documented, the documentation is displayed as tooltip.
  • Advanced parameter names are italic.

Constructor & Destructor Documentation

◆ PrecursorIonSelectionPreprocessing() [1/2]

◆ PrecursorIonSelectionPreprocessing() [2/2]

◆ ~PrecursorIonSelectionPreprocessing()

Member Function Documentation

◆ dbPreprocessing() [1/2]

void dbPreprocessing ( const String db_path,
bool  save = true 
)

Calculates tryptic peptide masses of a given database and stores masses and peptide sequences.

Parameters
db_pathPath to database file (fasta)
saveFlag if preprocessing should be stored.
Exceptions
Exception::FileNotFoundif file with preprocessing or db can't be found
Exception::UnableToCreateFileif preprocessing file can't be written

◆ dbPreprocessing() [2/2]

void dbPreprocessing ( const String db_path,
const String rt_model_path,
const String dt_model_path,
bool  save = true 
)

Calculates tryptic peptide masses of a given database and stores masses and peptide sequences.

Parameters
db_pathPath to database file (fasta)
rt_model_path
dt_model_path
saveFlag if preprocessing should be stored.
Exceptions
Exception::FileNotFoundif file with preprocessing or db can't be found
Exception::UnableToCreateFileif preprocessing file can't be written

◆ filterTaxonomyIdentifier_()

void filterTaxonomyIdentifier_ ( FASTAFile::FASTAEntry entry)
protected

pre-process fasta identifier

◆ getFixedModifications()

const std::map<char, std::vector<String> >& getFixedModifications ( )
inline

◆ getGaussMu()

double getGaussMu ( ) const
inline

◆ getGaussSigma()

double getGaussSigma ( ) const
inline

◆ getMasses()

const std::vector<double>& getMasses ( const String acc) const

◆ getProteinPeptideSequenceMap()

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

◆ getProteinPTMap()

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

◆ getProteinRTMap()

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

◆ getProtMasses()

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

◆ getPT()

double getPT ( const String prot_id,
Size  peptide_index 
)

◆ getRT()

double getRT ( const String prot_id,
Size  peptide_index 
)

◆ getRTProbability() [1/2]

double getRTProbability ( const String prot_id,
Size  peptide_index,
Feature feature 
)

◆ getRTProbability() [2/2]

double getRTProbability ( double  pred_rt,
Feature feature 
)

◆ getRTProbability_()

double getRTProbability_ ( double  min_obs_rt,
double  max_obs_rt,
double  pred_rt 
)
protected

◆ getScanNumber_()

Int getScanNumber_ ( double  rt)
protected

◆ getWeight()

double getWeight ( double  mass)

get the weighted frequency of a mass

◆ loadPreprocessedDB_()

void loadPreprocessedDB_ ( const String path)
protected

loads the preprocessed db

◆ loadPreprocessing()

void loadPreprocessing ( )

Loads tryptic peptide masses of a given database.

Exceptions
Exception::FileNotFoundif file with preprocessing can't be found
Exception::InvalidParameterif precursor_mass_tolerance_unit is ppm and file containing bin borders can't be found

◆ operator=()

◆ savePreprocessedDB_()

void savePreprocessedDB_ ( const String db_path,
const String path 
)
protected

saves the preprocessed db

◆ savePreprocessedDBWithRT_()

void savePreprocessedDBWithRT_ ( const String db_path,
const String path 
)
protected

◆ setFixedModifications()

void setFixedModifications ( StringList modifications)

◆ setGaussianParameters()

void setGaussianParameters ( double  mu,
double  sigma 
)

◆ updateMembers_()

void updateMembers_ ( )
overrideprotectedvirtual

update members method from DefaultParamHandler to update the members

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ bin_masses_

std::vector<double> bin_masses_
protected

the masses of the bins used for preprocessing (only used if bins are not equidistant, i.e. with ppm)

◆ counter_

std::vector<UInt> counter_
protected

counter for the bins

◆ f_max_

UInt f_max_
protected

maximal relative frequency of a mass

◆ fixed_modifications_

std::map<char, std::vector<String> > fixed_modifications_
protected

◆ fixed_mods_

bool fixed_mods_
protected

◆ masses_

std::vector<double> masses_
protected

all tryptic masses of the distinct peptides in the database

◆ mu_

double mu_
protected

◆ prot_masses_

std::map<String, std::vector<double> > prot_masses_
protected

stores masses of tryptic peptides for proteins, key is the accession number

◆ prot_peptide_seq_map_

std::map<String, std::vector<String> > prot_peptide_seq_map_
protected

◆ pt_prot_map_

std::map<String, std::vector<double> > pt_prot_map_
protected

◆ rt_prot_map_

std::map<String, std::vector<double> > rt_prot_map_
protected

◆ sequences_

std::set<AASequence> sequences_
protected

the sequences of the tryptic peptides

◆ sigma_

double sigma_
protected