OpenMS
2.7.0
|
This class implements the database preprocessing needing for precursor ion selection. More...
#include <OpenMS/ANALYSIS/TARGETED/PrecursorIonSelectionPreprocessing.h>
Public Member Functions | |
PrecursorIonSelectionPreprocessing () | |
PrecursorIonSelectionPreprocessing (const PrecursorIonSelectionPreprocessing &source) | |
~PrecursorIonSelectionPreprocessing () override | |
PrecursorIonSelectionPreprocessing & | operator= (const PrecursorIonSelectionPreprocessing &source) |
const std::map< String, std::vector< double > > & | getProtMasses () const |
const std::vector< double > & | getMasses (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 (String db_path, bool save=true) |
Calculates tryptic peptide masses of a given database and stores masses and peptide sequences. More... | |
void | dbPreprocessing (String db_path, String rt_model_path, 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 (String prot_id, Size peptide_index) |
double | getPT (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 () |
double | getGaussSigma () |
double | getRTProbability (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... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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_ (String db_path, String path) |
saves the preprocessed db More... | |
void | savePreprocessedDBWithRT_ (String db_path, String path) |
void | loadPreprocessedDB_ (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< AASequence > | sequences_ |
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< UInt > | counter_ |
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< String > | subsections_ |
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 &prefix="") |
Writes all parameters to meta values. More... | |
This class implements the database preprocessing needing for precursor ion selection.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
precursor_mass_tolerance | float | 10.0 | min: 0.0 | Precursor mass tolerance which is used to query the peptide database for peptides |
precursor_mass_tolerance_unit | string | ppm | ppm, Da | Precursor 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 | int | 100000 | min: 1 | Number of peptides for that the pt and rt are parallelly predicted. |
missed_cleavages | int | 1 | min: 0 | Number 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 | string | false | Flag if peptide sequences should be stored. | |
rt_settings:min_rt | float | 960.0 | min: 1.0 | Minimal RT in the experiment (in seconds) |
rt_settings:max_rt | float | 3840.0 | Maximal RT in the experiment (in seconds) | |
rt_settings:rt_step_size | float | 30.0 | Time between two consecutive spectra (in seconds) | |
rt_settings:gauss_mean | float | -1.0 | mean of the gauss curve | |
rt_settings:gauss_sigma | float | 3.0 | std of the gauss curve |
PrecursorIonSelectionPreprocessing | ( | const PrecursorIonSelectionPreprocessing & | source | ) |
|
override |
void dbPreprocessing | ( | String | db_path, |
bool | save = true |
||
) |
Calculates tryptic peptide masses of a given database and stores masses and peptide sequences.
db_path | Path to database file (fasta) |
save | Flag if preprocessing should be stored. |
Exception::FileNotFound | if file with preprocessing or db can't be found |
Exception::UnableToCreateFile | if preprocessing file can't be written |
void dbPreprocessing | ( | String | db_path, |
String | rt_model_path, | ||
String | dt_model_path, | ||
bool | save = true |
||
) |
Calculates tryptic peptide masses of a given database and stores masses and peptide sequences.
db_path | Path to database file (fasta) |
rt_model_path | |
dt_model_path | |
save | Flag if preprocessing should be stored. |
Exception::FileNotFound | if file with preprocessing or db can't be found |
Exception::UnableToCreateFile | if preprocessing file can't be written |
|
protected |
pre-process fasta identifier
|
inline |
|
inline |
|
inline |
const std::vector<double>& getMasses | ( | String | acc | ) | const |
const std::map<String, std::vector<double> >& getProteinPTMap | ( | ) | const |
const std::map<String, std::vector<double> >& getProteinRTMap | ( | ) | const |
const std::map<String, std::vector<double> >& getProtMasses | ( | ) | const |
double getRTProbability | ( | double | pred_rt, |
Feature & | feature | ||
) |
|
protected |
|
protected |
double getWeight | ( | double | mass | ) |
get the weighted frequency of a mass
|
protected |
loads the preprocessed db
void loadPreprocessing | ( | ) |
Loads tryptic peptide masses of a given database.
Exception::FileNotFound | if file with preprocessing can't be found |
Exception::InvalidParameter | if precursor_mass_tolerance_unit is ppm and file containing bin borders can't be found |
PrecursorIonSelectionPreprocessing& operator= | ( | const PrecursorIonSelectionPreprocessing & | source | ) |
void setFixedModifications | ( | StringList & | modifications | ) |
void setGaussianParameters | ( | double | mu, |
double | sigma | ||
) |
|
overrideprotectedvirtual |
update members method from DefaultParamHandler to update the members
Reimplemented from DefaultParamHandler.
|
protected |
the masses of the bins used for preprocessing (only used if bins are not equidistant, i.e. with ppm)
|
protected |
counter for the bins
|
protected |
maximal relative frequency of a mass
|
protected |
|
protected |
|
protected |
all tryptic masses of the distinct peptides in the database
|
protected |
|
protected |
stores masses of tryptic peptides for proteins, key is the accession number
|
protected |
|
protected |
|
protected |
the sequences of the tryptic peptides
|
protected |