Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
AScore Class Reference

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. More...

#include <OpenMS/ANALYSIS/ID/AScore.h>

Public Member Functions

 AScore ()
 Default constructor. More...
 
 ~AScore ()
 Destructor. More...
 
PeptideHit compute (const PeptideHit &hit, PeakSpectrum &real_spectrum, double fragment_mass_tolerance, bool fragment_mass_unit_ppm, Size max_peptide_len=60, Size max_num_perm=16384)
 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...
 

Protected Member Functions

int compareMZ_ (double mz1, double mz2, double fragment_mass_tolerance, bool fragment_mass_unit_ppm) const
 
template<class InputIterator1 , class InputIterator2 , class OutputIterator >
OutputIterator getSpectrumDifference_ (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, double fragment_mass_tolerance, bool fragment_mass_unit_ppm) const
 
void computeSiteDeterminingIons_ (const std::vector< PeakSpectrum > &th_spectra, const ProbablePhosphoSites &candidates, std::vector< PeakSpectrum > &site_determining_ions, double fragment_mass_tolerance, bool fragment_mass_unit_ppm) const
 Computes the site determining_ions for the given AS and sequences in candidates. More...
 
std::vector< SizegetSites_ (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, double fragment_mass_tolerance, bool fragment_mass_tolerance_ppm=false) 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 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< PeakSpectrumcreateTheoreticalSpectra_ (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< PeakSpectrumpeakPickingPerWindowsInSpectrum_ (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, double fragment_mass_tolerance, bool fragment_mass_unit_ppm) const
 Create 10 scores for each theoretical spectrum (permutation), according to Beausoleil et al. Figure 3 b. More...
 
std::multimap< double, SizerankWeightedPermutationPeptideScores_ (const std::vector< std::vector< double > > &peptide_site_scores) const
 Rank weighted permutation scores ascending. More...
 

Friends

struct PScore
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AScore()

AScore ( )

Default constructor.

◆ ~AScore()

~AScore ( )

Destructor.

Member Function Documentation

◆ calculatePermutationPeptideScores_()

std::vector<std::vector<double> > calculatePermutationPeptideScores_ ( std::vector< PeakSpectrum > &  th_spectra,
const std::vector< PeakSpectrum > &  windows_top10,
double  fragment_mass_tolerance,
bool  fragment_mass_unit_ppm 
) const
protected

Create 10 scores for each theoretical spectrum (permutation), according to Beausoleil et al. Figure 3 b.

◆ compareMZ_()

int compareMZ_ ( double  mz1,
double  mz2,
double  fragment_mass_tolerance,
bool  fragment_mass_unit_ppm 
) const
protected

◆ compute()

PeptideHit compute ( const PeptideHit hit,
PeakSpectrum real_spectrum,
double  fragment_mass_tolerance,
bool  fragment_mass_unit_ppm,
Size  max_peptide_len = 60,
Size  max_num_perm = 16384 
)

Computes the AScore and returns all computed phospho-sites. The saved sequences contain only phospho information. All other modifications are dropped due to simplicity.

Parameters
hita PeptideHit
real_spectrumspectrum mapped to hit
fmtfragment_mass_tolerance, when comparing real_spectrum to a theoretical spectrum of the amino acid sequence of hit.
number_of_phospho_siteswhich directs the method to search for this number of phosphorylated sites.
Note
the original sequence is saved in the PeptideHits as MetaValue Search_engine_sequence.

◆ computeCumulativeScore_()

double computeCumulativeScore_ ( Size  N,
Size  n,
double  p 
) const
protected

Computes the cumulative binomial probabilities.

◆ computePermutations_()

std::vector<std::vector<Size> > computePermutations_ ( const std::vector< Size > &  sites,
Int  n_phosphorylation_events 
) const
protected

calculate all n_phosphorylation_events sized sets of phospho sites (all versions of the peptides with exactly n_phosphorylation_events)

◆ computeSiteDeterminingIons_()

void computeSiteDeterminingIons_ ( const std::vector< PeakSpectrum > &  th_spectra,
const ProbablePhosphoSites candidates,
std::vector< PeakSpectrum > &  site_determining_ions,
double  fragment_mass_tolerance,
bool  fragment_mass_unit_ppm 
) const
protected

Computes the site determining_ions for the given AS and sequences in candidates.

◆ createTheoreticalSpectra_()

std::vector<PeakSpectrum> createTheoreticalSpectra_ ( const std::vector< std::vector< Size > > &  permutations,
const AASequence seq_without_phospho 
) const
protected

Create theoretical spectra with all combinations with the number of phosphorylation events.

◆ determineHighestScoringPermutations_()

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
protected

Finds the peptides with the highest PeptideScores and outputs all information for computing the AScore.

Note
This function assumes that there are more permutations than the assumed number of phosphorylations!

◆ getSites_()

std::vector<Size> getSites_ ( const AASequence without_phospho) const
protected

return all phospho sites

◆ getSpectrumDifference_()

OutputIterator getSpectrumDifference_ ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
InputIterator2  last2,
OutputIterator  result,
double  fragment_mass_tolerance,
bool  fragment_mass_unit_ppm 
) const
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

◆ numberOfMatchedIons_()

Size numberOfMatchedIons_ ( const PeakSpectrum th,
const PeakSpectrum windows,
Size  depth,
double  fragment_mass_tolerance,
bool  fragment_mass_tolerance_ppm = false 
) const
protected

Computes number of matched ions between windows and the given spectrum. All spectra have to be sorted by position!

◆ numberOfPhosphoEvents_()

Size numberOfPhosphoEvents_ ( const String  sequence) const
protected

Computes number of phospho events in a sequence.

◆ peakPickingPerWindowsInSpectrum_()

std::vector<PeakSpectrum> peakPickingPerWindowsInSpectrum_ ( PeakSpectrum real_spectrum) const
protected

Pick top 10 intensity peaks for each 100 Da windows.

◆ peptideScore_()

double peptideScore_ ( const std::vector< double > &  scores) const
protected

Computes the peptide score according to Beausoleil et al. page 1291.

◆ rankWeightedPermutationPeptideScores_()

std::multimap<double, Size> rankWeightedPermutationPeptideScores_ ( const std::vector< std::vector< double > > &  peptide_site_scores) const
protected

Rank weighted permutation scores ascending.

◆ removePhosphositesFromSequence_()

AASequence removePhosphositesFromSequence_ ( const String  sequence) const
protected

Create variant of the peptide with all phosphorylations removed.

Friends And Related Function Documentation

◆ PScore

friend struct PScore
friend

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:07 using doxygen 1.8.13