49 class PeptideIdentification;
50 class ProteinIdentification;
89 static std::map<String, std::vector<std::vector<double>>> extractAndTransformScores(
90 const std::vector<ProteinIdentification> & protein_ids,
91 const std::vector<PeptideIdentification> & peptide_ids,
92 const bool split_charge,
93 const bool top_hits_only,
94 const bool target_decoy_available,
95 const double fdr_for_targets_smaller);
110 static void updateScores(
112 const String & search_engine,
114 const bool prob_correct,
115 const bool split_charge,
116 std::vector<ProteinIdentification> & protein_ids,
117 std::vector<PeptideIdentification> & peptide_ids,
118 bool & unable_to_fit_data,
119 bool & data_might_not_be_well_fit);
127 bool fit(std::vector<double> & search_engine_scores);
136 bool fit(std::vector<double> & search_engine_scores, std::vector<double> & probabilities);
139 void fillDensities(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
141 double computeMaxLikelihood(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
143 double one_minus_sum_post(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
145 double sum_post(std::vector<double> & incorrect_density, std::vector<double> & correct_density);
147 double sum_pos_x0(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
149 double sum_neg_x0(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
151 double sum_pos_sigma(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density,
double positive_mean);
153 double sum_neg_sigma(std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density,
double positive_mean);
159 return correctly_assigned_fit_param_;
165 return incorrectly_assigned_fit_param_;
171 return negative_prior_;
177 double z = exp((params.
x0 - x) / params.
sigma);
178 return (z * exp(-1 * z)) / params.
sigma;
185 double computeProbability(
double score)
const;
188 TextFile initPlots(std::vector<double> & x_scores);
200 void plotTargetDecoyEstimation(std::vector<double> & target, std::vector<double> & decoy);
205 return smallest_score_;
209 void tryGnuplot(
const String& gp_file);
213 static double transformScore_(
const String & engine,
const PeptideHit & hit);
A more convenient string class.
Definition: String.h:57
double max_incorrectly_
peak of the incorrectly assigned sequences distribution
Definition: PosteriorErrorProbabilityModel.h:226
double x0
parameter x0 of Gaussian distribution (center position)
Definition: GaussFitter.h:75
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
double sigma
parameter sigma of Gaussian distribution (width)
Definition: GaussFitter.h:78
GaussFitter::GaussFitResult incorrectly_assigned_fit_param_
stores parameters for incorrectly assigned sequences. If gumbel fit was used, A can be ignored...
Definition: PosteriorErrorProbabilityModel.h:220
double getNegativePrior() const
returns the estimated negative prior probability.
Definition: PosteriorErrorProbabilityModel.h:169
double getSmallestScore()
returns the smallest score used in the last fit
Definition: PosteriorErrorProbabilityModel.h:203
double max_correctly_
peak of the gauss distribution (correctly assigned sequences)
Definition: PosteriorErrorProbabilityModel.h:228
static double getGumbel_(double x, const GaussFitter::GaussFitResult ¶ms)
computes the gumbel density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:175
Representation of a peptide hit.
Definition: PeptideHit.h:54
GaussFitter::GaussFitResult getIncorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:163
GaussFitter::GaussFitResult getCorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:157
GaussFitter::GaussFitResult correctly_assigned_fit_param_
stores gauss parameters
Definition: PosteriorErrorProbabilityModel.h:222
struct of parameters of a Gaussian distribution
Definition: GaussFitter.h:63
Implements a mixture model of the inverse gumbel and the gauss distribution or a gaussian mixture...
Definition: PosteriorErrorProbabilityModel.h:67
double negative_prior_
stores final prior probability for negative peptides
Definition: PosteriorErrorProbabilityModel.h:224
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
double smallest_score_
smallest score which was used for fitting the model
Definition: PosteriorErrorProbabilityModel.h:230
int Int
Signed integer type.
Definition: Types.h:102
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46