51 class PeptideIdentification;
52 class ProteinIdentification;
96 static std::map<String, std::vector<std::vector<double>>> extractAndTransformScores(
97 const std::vector<ProteinIdentification> & protein_ids,
98 const std::vector<PeptideIdentification> & peptide_ids,
99 const bool split_charge,
100 const bool top_hits_only,
101 const bool target_decoy_available,
102 const double fdr_for_targets_smaller);
117 static void updateScores(
119 const String & search_engine,
121 const bool prob_correct,
122 const bool split_charge,
123 std::vector<ProteinIdentification> & protein_ids,
124 std::vector<PeptideIdentification> & peptide_ids,
125 bool & unable_to_fit_data,
126 bool & data_might_not_be_well_fit);
136 bool fit(std::vector<double> & search_engine_scores,
const String& outlier_handling);
146 bool fitGumbelGauss(std::vector<double>& search_engine_scores,
const String& outlier_handling);
155 bool fit(std::vector<double> & search_engine_scores, std::vector<double> & probabilities,
const String& outlier_handling);
158 void fillDensities(
const std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
160 void fillLogDensities(
const std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
162 void fillLogDensitiesGumbel(
const std::vector<double> & x_scores, std::vector<double> & incorrect_density, std::vector<double> & correct_density);
164 double computeLogLikelihood(
const std::vector<double> & incorrect_density,
const std::vector<double> & correct_density)
const;
170 double computeLLAndIncorrectPosteriorsFromLogDensities(
171 const std::vector<double>& incorrect_log_density,
172 const std::vector<double>& correct_log_density,
173 std::vector<double>& incorrect_posterior)
const;
181 std::pair<double, double> pos_neg_mean_weighted_posteriors(
const std::vector<double> &x_scores,
182 const std::vector<double> &incorrect_posteriors);
190 std::pair<double, double> pos_neg_sigma_weighted_posteriors(
const std::vector<double> &x_scores,
191 const std::vector<double> &incorrect_posteriors,
192 const std::pair<double, double>& means);
197 return correctly_assigned_fit_param_;
203 return incorrectly_assigned_fit_param_;
209 return incorrectly_assigned_fit_gumbel_param_;
215 return negative_prior_;
221 double z = exp((params.
x0 - x) / params.
sigma);
222 return (z * exp(-1 * z)) / params.
sigma;
229 double computeProbability(
double score)
const;
232 TextFile initPlots(std::vector<double> & x_scores);
244 void plotTargetDecoyEstimation(std::vector<double> & target, std::vector<double> & decoy);
249 return smallest_score_;
253 void tryGnuplot(
const String& gp_file);
257 void processOutliers_(std::vector<double>& x_scores,
const String& outlier_handling)
const;
263 static double transformScore_(
const String& engine,
const PeptideHit& hit,
const String& current_score_type);
269 static double getScore_(
const std::vector<String>& requested_score_types,
const PeptideHit & hit,
const String& actual_score_type);
GumbelMaxLikelihoodFitter::GumbelDistributionFitResult getIncorrectlyAssignedGumbelFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:207
A more convenient string class.
Definition: String.h:58
double max_incorrectly_
peak of the incorrectly assigned sequences distribution
Definition: PosteriorErrorProbabilityModel.h:283
double x0
parameter x0 of Gaussian distribution (center position)
Definition: GaussFitter.h:77
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double sigma
parameter sigma of Gaussian distribution (width)
Definition: GaussFitter.h:80
GaussFitter::GaussFitResult incorrectly_assigned_fit_param_
stores parameters for incorrectly assigned sequences. If gumbel fit was used, A can be ignored...
Definition: PosteriorErrorProbabilityModel.h:276
double getNegativePrior() const
returns the estimated negative prior probability.
Definition: PosteriorErrorProbabilityModel.h:213
double max_correctly_
peak of the gauss distribution (correctly assigned sequences)
Definition: PosteriorErrorProbabilityModel.h:285
static double getGumbel_(double x, const GaussFitter::GaussFitResult ¶ms)
computes the gumbel density at position x with parameters params.
Definition: PosteriorErrorProbabilityModel.h:219
double getSmallestScore() const
returns the smallest score used in the last fit
Definition: PosteriorErrorProbabilityModel.h:247
Representation of a peptide hit.
Definition: PeptideHit.h:55
GaussFitter::GaussFitResult getIncorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:201
GaussFitter::GaussFitResult getCorrectlyAssignedFitResult() const
returns estimated parameters for correctly assigned sequences. Fit should be used before...
Definition: PosteriorErrorProbabilityModel.h:195
GaussFitter::GaussFitResult correctly_assigned_fit_param_
stores gauss parameters
Definition: PosteriorErrorProbabilityModel.h:279
struct of parameters of a Gaussian distribution
Definition: GaussFitter.h:65
Implements a mixture model of the inverse gumbel and the gauss distribution or a gaussian mixture...
Definition: PosteriorErrorProbabilityModel.h:74
double negative_prior_
stores final prior probability for negative peptides
Definition: PosteriorErrorProbabilityModel.h:281
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
double smallest_score_
smallest score which was used for fitting the model
Definition: PosteriorErrorProbabilityModel.h:287
GumbelMaxLikelihoodFitter::GumbelDistributionFitResult incorrectly_assigned_fit_gumbel_param_
Definition: PosteriorErrorProbabilityModel.h:277
int Int
Signed integer type.
Definition: Types.h:102
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
struct to represent the parameters of a gumbel distribution
Definition: GumbelMaxLikelihoodFitter.h:63