OpenMS
2.7.0
|
Implementation of the Ascore For a given peptide sequence and its MS/MS spectrum it identifies the most probable phosphorylation-site(s). For each phosphorylation site a probability score is calculated. The algorithm is implemented according to Beausoleil et al. (Nat. Biotechnol. 2006). More...
#include <OpenMS/ANALYSIS/ID/AScore.h>
Public Member Functions | |
AScore () | |
Default constructor. More... | |
~AScore () override | |
Destructor. More... | |
PeptideHit | compute (const PeptideHit &hit, PeakSpectrum &real_spectrum) |
Computes the AScore and returns all computed phospho-sites. The saved sequences contain only phospho information. All other modifications are dropped due to simplicity. More... | |
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 | |
int | compareMZ_ (double mz1, double mz2) const |
template<class InputIterator1 , class InputIterator2 , class OutputIterator > | |
OutputIterator | getSpectrumDifference_ (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) const |
void | computeSiteDeterminingIons_ (const std::vector< PeakSpectrum > &th_spectra, const ProbablePhosphoSites &candidates, std::vector< PeakSpectrum > &site_determining_ions) const |
Computes the site determining_ions for the given AS and sequences in candidates. More... | |
std::vector< Size > | getSites_ (const AASequence &without_phospho) const |
return all phospho sites More... | |
std::vector< std::vector< Size > > | computePermutations_ (const std::vector< Size > &sites, Int n_phosphorylation_events) const |
calculate all n_phosphorylation_events sized sets of phospho sites (all versions of the peptides with exactly n_phosphorylation_events) More... | |
Size | numberOfMatchedIons_ (const PeakSpectrum &th, const PeakSpectrum &windows, Size depth) const |
Computes number of matched ions between windows and the given spectrum. All spectra have to be sorted by position! More... | |
double | peptideScore_ (const std::vector< double > &scores) const |
Computes the peptide score according to Beausoleil et al. page 1291. More... | |
void | determineHighestScoringPermutations_ (const std::vector< std::vector< double >> &peptide_site_scores, std::vector< ProbablePhosphoSites > &sites, const std::vector< std::vector< Size >> &permutations, std::multimap< double, Size > &ranking) const |
Finds the peptides with the highest PeptideScores and outputs all information for computing the AScore. More... | |
double | computeBaseProbability_ (double ppm_reference_mz) const |
Computes probability for a peak depth of one given spectra and mass_tolerance variables. More... | |
double | computeCumulativeScore_ (Size N, Size n, double p) const |
Computes the cumulative binomial probabilities. More... | |
Size | numberOfPhosphoEvents_ (const String &sequence) const |
Computes number of phospho events in a sequence. More... | |
AASequence | removePhosphositesFromSequence_ (const String &sequence) const |
Create variant of the peptide with all phosphorylations removed. More... | |
std::vector< PeakSpectrum > | createTheoreticalSpectra_ (const std::vector< std::vector< Size >> &permutations, const AASequence &seq_without_phospho) const |
Create theoretical spectra with all combinations with the number of phosphorylation events. More... | |
std::vector< PeakSpectrum > | peakPickingPerWindowsInSpectrum_ (PeakSpectrum &real_spectrum) const |
Pick top 10 intensity peaks for each 100 Da windows. More... | |
std::vector< std::vector< double > > | calculatePermutationPeptideScores_ (std::vector< PeakSpectrum > &th_spectra, const std::vector< PeakSpectrum > &windows_top10) const |
Create 10 scores for each theoretical spectrum (permutation), according to Beausoleil et al. Figure 3 b. More... | |
std::multimap< double, Size > | rankWeightedPermutationPeptideScores_ (const std::vector< std::vector< double >> &peptide_site_scores) const |
Rank weighted permutation scores ascending. More... | |
void | updateMembers_ () override |
Reimplemented from DefaultParamHandler. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
double | fragment_mass_tolerance_ |
Fragment mass tolerance for spectrum comparisons. More... | |
bool | fragment_tolerance_ppm_ |
Is fragment mass tolerance given in ppm (or Da)? More... | |
Size | max_peptide_length_ |
Limit for peptide lengths that can be analyzed. More... | |
Size | max_permutations_ |
Limit for number of sequence permutations that can be handled. More... | |
double | unambiguous_score_ |
Score for unambiguous assignments (all sites phosphorylated) More... | |
double | base_match_probability_ |
Probability of a match at a peak depth of 1. More... | |
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... | |
Friends | |
struct | PScore |
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... | |
Implementation of the Ascore For a given peptide sequence and its MS/MS spectrum it identifies the most probable phosphorylation-site(s). For each phosphorylation site a probability score is calculated. The algorithm is implemented according to Beausoleil et al. (Nat. Biotechnol. 2006).
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
fragment_mass_tolerance | float | 0.05 | min: 0.0 | Fragment mass tolerance for spectrum comparisons |
fragment_mass_unit | string | Da | Da, ppm | Unit of fragment mass tolerance |
max_peptide_length | int | 40 | min: 0 | Restrict scoring to peptides with a length no greater than this value ('0' for 'no restriction') |
max_num_perm | int | 16384 | min: 0 | Maximum number of permutations a sequence can have to be processed ('0' for 'no restriction') |
unambiguous_score | int | 1000 | Score to use for unambiguous assignments, where all sites on a peptide are phosphorylated. (Note: If a peptide is not phosphorylated at all, its score is set to '-1'.) |
AScore | ( | ) |
Default constructor.
|
override |
Destructor.
|
protected |
Create 10 scores for each theoretical spectrum (permutation), according to Beausoleil et al. Figure 3 b.
|
protected |
PeptideHit compute | ( | const PeptideHit & | hit, |
PeakSpectrum & | real_spectrum | ||
) |
Computes the AScore and returns all computed phospho-sites. The saved sequences contain only phospho information. All other modifications are dropped due to simplicity.
hit | a PeptideHit |
real_spectrum | spectrum mapped to hit |
fmt | fragment_mass_tolerance, when comparing real_spectrum to a theoretical spectrum of the amino acid sequence of hit. |
number_of_phospho_sites | which directs the method to search for this number of phosphorylated sites. |
|
protected |
Computes probability for a peak depth of one given spectra and mass_tolerance variables.
Computes the cumulative binomial probabilities.
|
protected |
calculate all n_phosphorylation_events sized sets of phospho sites (all versions of the peptides with exactly n_phosphorylation_events)
|
protected |
Computes the site determining_ions for the given AS and sequences in candidates.
|
protected |
Create theoretical spectra with all combinations with the number of phosphorylation events.
|
protected |
Finds the peptides with the highest PeptideScores and outputs all information for computing the AScore.
|
protected |
return all phospho sites
|
inlineprotected |
getSpectrumDifference_ works similar as the method std::set_difference (http://en.cppreference.com/w/cpp/algorithm/set_difference). set_difference was reimplemented, because it was necessary to overwrite the compare operator to be able to compare the m/z values. not implemented as "operator<", because using tolerances for comparison does not imply total ordering
|
protected |
Computes number of matched ions between windows and the given spectrum. All spectra have to be sorted by position!
Computes number of phospho events in a sequence.
|
protected |
Pick top 10 intensity peaks for each 100 Da windows.
|
protected |
Computes the peptide score according to Beausoleil et al. page 1291.
|
protected |
Rank weighted permutation scores ascending.
|
protected |
Create variant of the peptide with all phosphorylations removed.
|
overrideprotectedvirtual |
Reimplemented from DefaultParamHandler.
Reimplemented from DefaultParamHandler.
|
friend |
|
protected |
Probability of a match at a peak depth of 1.
|
protected |
Fragment mass tolerance for spectrum comparisons.
|
protected |
Is fragment mass tolerance given in ppm (or Da)?
|
protected |
Limit for peptide lengths that can be analyzed.
|
protected |
Limit for number of sequence permutations that can be handled.
|
protected |
Score for unambiguous assignments (all sites phosphorylated)