OpenMS
IDScoreGetterSetter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Julianus Pfeuffer $
6 // $Authors: Julianus Pfeuffer $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
16 
17 #include <vector>
18 #include <unordered_set>
19 #include <unordered_map>
20 
21 namespace OpenMS
22 {
27  typedef std::pair<double, double> ScoreToTgtDecLabelPair;
28 
29  struct ScoreToTgtDecLabelPairs // Not a typedef to allow forward declaration.
30  : public std::vector<ScoreToTgtDecLabelPair>
31  {
32  typedef std::vector<ScoreToTgtDecLabelPair> Base;
33  using Base::Base;
34  };
35 
40  {
41 
42  private:
43 
44  template<typename T>
45  struct IsIDType
46  {
47  static bool const value =
48  std::is_same<T, PeptideIdentification>::value || std::is_same<T, ProteinIdentification>::value;
49  };
50 
51  template<typename T>
52  struct IsHitType
53  {
54  static bool const value = std::is_same<T, PeptideHit>::value || std::is_same<T, ProteinHit>::value;
55  };
56 
57  public:
67  std::unordered_map<String, ScoreToTgtDecLabelPair>& picked_scores,
68  const ProteinIdentification& id,
69  const String& decoy_string,
70  bool decoy_prefix);
71 
81  const std::unordered_map<String, ScoreToTgtDecLabelPair>& picked_scores,
82  ScoreToTgtDecLabelPairs& scores_labels,
83  const std::vector<ProteinIdentification::ProteinGroup>& grps,
84  const String& decoy_string,
85  bool decoy_prefix);
86 
88  static std::pair<bool,String> removeDecoyStringIfPresent_(const String& acc, const String& decoy_string, bool decoy_prefix);
89 
90  static void fillPeptideScoreMap_(
91  std::unordered_map<String, ScoreToTgtDecLabelPair>& seq_to_score_labels,
92  std::vector<PeptideIdentification> const& ids);
93 
94  static void fillPeptideScoreMap_(
95  std::unordered_map<String, ScoreToTgtDecLabelPair>& seq_to_score_labels,
96  ConsensusMap const& map,
97  bool include_unassigned);
98 
99 
109  //TODO could be done with set of target accessions, too
110  //TODO even better: store nr targets and nr decoys when creating the groups!
111  //TODO alternative scoring is possible, too (e.g. ratio of tgts vs decoys)
112  static void getScores_(
113  ScoreToTgtDecLabelPairs &scores_labels,
114  const std::vector<ProteinIdentification::ProteinGroup> &grps,
115  const std::unordered_set<std::string> &decoy_accs);
116 
117 
118  template<class ...Args>
119  static void getScores_(
120  ScoreToTgtDecLabelPairs &scores_labels,
121  const std::vector<PeptideIdentification> &ids,
122  Args &&... args)
123  {
124  for (const PeptideIdentification &id : ids)
125  {
126  getScores_(scores_labels, id, std::forward<Args>(args)...);
127  }
128  }
129 
130  static void getScores_(
131  ScoreToTgtDecLabelPairs &scores_labels,
132  const ProteinIdentification &id)
133  {
134  scores_labels.reserve(scores_labels.size() + id.getHits().size());
135  std::transform(id.getHits().begin(), id.getHits().end(),
136  std::back_inserter(scores_labels),
137  [](const ProteinHit &hit)
138  {
139  checkTDAnnotation_(hit);
140  return std::make_pair<double, bool>(hit.getScore(), getTDLabel_(hit));
141  }
142  );
143  }
144 
145  template<class ...Args>
146  static void getScores_(
147  ScoreToTgtDecLabelPairs &scores_labels,
148  const PeptideIdentification &id,
149  bool all_hits,
150  Args &&... args
151  )
152  {
153  if (all_hits)
154  {
155  for (const PeptideHit &hit : id.getHits())
156  {
157  getScores_(scores_labels, hit, std::forward<Args>(args)...);
158  }
159  }
160  else
161  {
162  //TODO for speed and constness I assume that they are sorted and first = best.
163  //id.sort();
164  const PeptideHit &hit = id.getHits()[0];
165  getScores_(scores_labels, hit, std::forward<Args>(args)...);
166  }
167  }
168 
169  template<typename IDPredicate, class ...Args>
170  static void getScores_(
171  ScoreToTgtDecLabelPairs &scores_labels,
172  const PeptideIdentification &id,
173  IDPredicate &&fun,
174  bool all_hits,
175  Args &&... args
176  )
177  {
178  if (fun(id))
179  {
180  if (all_hits)
181  {
182  for (const PeptideHit &hit : id.getHits())
183  {
184  getScores_(scores_labels, hit, std::forward<Args>(args)...);
185  }
186  }
187  else
188  {
189  //TODO for speed I assume that they are sorted and first = best.
190  //id.sort();
191  const PeptideHit &hit = id.getHits()[0];
192  getScores_(scores_labels, hit, std::forward<Args>(args)...);
193  }
194  }
195  }
196 
197  template<typename HitPredicate>
198  static void getScores_(
199  ScoreToTgtDecLabelPairs &scores_labels,
200  const PeptideHit &hit,
201  HitPredicate &&fun)
202  {
203  if (fun(hit))
204  {
205  getScores_(scores_labels, hit);
206  }
207  }
208 
209  template<typename HitType, typename std::enable_if<IsHitType<HitType>::value>::type * = nullptr>
210  static void getScores_(
211  ScoreToTgtDecLabelPairs &scores_labels,
212  const HitType &hit)
213  {
214  checkTDAnnotation_(hit);
215  scores_labels.emplace_back(hit.getScore(), getTDLabel_(hit));
216  }
225  template<class ...Args>
227  ScoreToTgtDecLabelPairs &scores_labels,
228  const ConsensusMap &cmap, bool include_unassigned_peptides, Args &&... args)
229  {
230  auto f =
231  [&](const PeptideIdentification &id) -> void
232  { getScores_(scores_labels, id, std::forward<Args>(args)...); };
233  cmap.applyFunctionOnPeptideIDs(f, include_unassigned_peptides);
234  }
235 
241  static bool getTDLabel_(const MetaInfoInterface &idOrHit)
242  {
243  return std::string(idOrHit.getMetaValue("target_decoy"))[0] == 't';
244  }
245 
257  template<typename IDType, class ...Args>
258  static void setScores_(const std::map<double, double> &scores_to_FDR,
259  std::vector<IDType> &ids,
260  const std::string &score_type,
261  bool higher_better,
262  Args &&... args)
263  {
264  for (auto &id : ids)
265  {
266  setScores_(scores_to_FDR, id, score_type, higher_better, std::forward<Args>(args)...);
267  }
268  }
269 
270  template<typename IDType>
271  static String setScoreType_(IDType &id, const std::string &score_type,
272  bool higher_better)
273  {
274  String old_score_type = id.getScoreType() + "_score";
275  id.setScoreType(score_type);
276  id.setHigherScoreBetter(higher_better);
277  return old_score_type;
278  }
279 
280  template<typename IDType>
281  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
282  bool higher_better, bool keep_decoy)
283  {
284  bool old_higher_better = id.isHigherScoreBetter();
285  String old_score_type = setScoreType_(id, score_type, higher_better);
286 
287  if (keep_decoy) //in-place set scores
288  {
289  if (old_higher_better)
290  {
291  setScores_(scores_to_FDR, id, old_score_type);
292  }
293  else
294  {
295  setScoresHigherWorse_(scores_to_FDR, id, old_score_type);
296  }
297  }
298  else
299  {
300  if (old_higher_better)
301  {
302  setScoresAndRemoveDecoys_(scores_to_FDR, id, old_score_type);
303  }
304  else
305  {
306  setScoresHigherWorseAndRemoveDecoys_(scores_to_FDR, id, old_score_type);
307  }
308  }
309  }
310 
311  template<typename IDType>
312  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id,
313  const String &old_score_type)
314  {
315  std::vector<typename IDType::HitType> &hits = id.getHits();
316  for (auto &hit : hits)
317  {
318  setScore_(scores_to_FDR, hit, old_score_type);
319  }
320  }
321 
322  template<typename IDType>
323  static void setScoresHigherWorse_(const std::map<double, double> &scores_to_FDR, IDType &id,
324  const String &old_score_type)
325  {
326  std::vector<typename IDType::HitType> &hits = id.getHits();
327  for (auto &hit : hits)
328  {
329  setScoreHigherWorse_(scores_to_FDR, hit, old_score_type);
330  }
331  }
332 
333  template<typename IDType, class ...Args>
334  static void setScoresAndRemoveDecoys_(const std::map<double, double> &scores_to_FDR, IDType &id,
335  const String &old_score_type, Args&& ... args)
336  {
337  std::vector<typename IDType::HitType> &hits = id.getHits();
338  std::vector<typename IDType::HitType> new_hits;
339  new_hits.reserve(hits.size());
340  for (auto &hit : hits)
341  {
342  setScoreAndMoveIfTarget_(scores_to_FDR, hit, old_score_type, new_hits, std::forward<Args>(args)...);
343  }
344  hits.swap(new_hits);
345  }
346 
347  template<typename IDType, class ...Args>
348  static void setScoresHigherWorseAndRemoveDecoys_(const std::map<double, double> &scores_to_FDR, IDType &id,
349  const String &old_score_type, Args&& ... args)
350  {
351  std::vector<typename IDType::HitType> &hits = id.getHits();
352  std::vector<typename IDType::HitType> new_hits;
353  new_hits.reserve(hits.size());
354  for (auto &hit : hits)
355  {
356  setScoreHigherWorseAndMoveIfTarget_(scores_to_FDR, hit, old_score_type, new_hits, std::forward<Args>(args)...);
357  }
358  hits.swap(new_hits);
359  }
360 
361  template<typename HitType>
362  static void setScore_(const std::map<double, double> &scores_to_FDR, HitType &hit, const std::string &old_score_type)
363  {
364  hit.setMetaValue(old_score_type, hit.getScore());
365  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
366  }
367 
368  template<typename HitType>
369  static void setScoreHigherWorse_(const std::map<double, double> &scores_to_FDR, HitType &hit, const std::string &old_score_type)
370  {
371  hit.setMetaValue(old_score_type, hit.getScore());
372  auto ub = scores_to_FDR.upper_bound(hit.getScore());
373  if (ub != scores_to_FDR.begin()) ub--;
374  hit.setScore(ub->second);
375  }
376 
377  /*template<typename IDType>
378  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
379  bool higher_better)
380  {
381  bool old_higher_better = id.isHigherScoreBetter();
382  String old_score_type = setScoreType_(id, score_type, higher_better);
383  setScores_(scores_to_FDR, id, old_score_type, old_higher_better);
384  }*/
385 
386  static void setScores_(const std::map<double, double> &scores_to_FDR,
388  const std::string &score_type,
389  bool higher_better,
390  bool keep_decoy,
391  int charge)
392  {
393  String old_score_type = setScoreType_(id, score_type, higher_better);
394  if (keep_decoy) //in-place set scores
395  {
396  setScores_(scores_to_FDR, id, old_score_type, higher_better, charge);
397  }
398  else
399  {
400  setScoresAndRemoveDecoys_<PeptideIdentification>(scores_to_FDR, id, old_score_type, charge);
401  }
402  }
403 
404  static void setScores_(const std::map<double, double> &scores_to_FDR,
406  const std::string &score_type,
407  bool higher_better,
408  bool keep_decoy,
409  int charge,
410  const String &identifier)
411  {
412  if (id.getIdentifier() == identifier)
413  {
414  setScores_(scores_to_FDR, id, score_type, higher_better, keep_decoy, charge);
415  }
416  }
417 
418  template<typename IDType>
419  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
420  bool higher_better, bool keep_decoy, const String &identifier)
421  {
422  if (id.getIdentifier() == identifier)
423  {
424  setScores_(scores_to_FDR, id, score_type, higher_better, keep_decoy);
425  }
426  }
427 
428  static void setScores_(const std::map<double, double> &scores_to_FDR,
430  const std::string &score_type,
431  bool higher_better,
432  int charge,
433  const String &identifier)
434  {
435  if (id.getIdentifier() == identifier)
436  {
437  setScores_(scores_to_FDR, id, score_type, higher_better, charge);
438  }
439  }
440 
441  template<typename IDType>
442  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
443  bool higher_better, const String &identifier)
444  {
445  if (id.getIdentifier() == identifier)
446  {
447  setScores_(scores_to_FDR, id, score_type, higher_better);
448  }
449  }
450 
451  template<typename IDType>
452  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
453  bool higher_better, int charge)
454  {
455  for (auto& hit : id.getHits())
456  {
457  if (hit.getCharge() == charge)
458  {
459  if (higher_better)
460  {
461  setScore_(scores_to_FDR, hit, score_type);
462  }
463  else
464  {
465  setScoreHigherWorse_(scores_to_FDR, hit, score_type);
466  }
467  }
468  }
469  }
470 
471  //TODO could also get a keep_decoy flag when we define what a "decoy group" is -> keep all always for now
472  static void setScores_(
473  const std::map<double, double> &scores_to_FDR,
474  std::vector<ProteinIdentification::ProteinGroup> &grps,
475  const std::string &score_type,
476  bool higher_better);
477 
488  template<typename HitType>
489  static void setScoreAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
490  HitType &hit,
491  const std::string &old_score_type,
492  std::vector<HitType> &new_hits)
493  {
494  const String &target_decoy(hit.getMetaValue("target_decoy"));
495  if (target_decoy[0] == 't')
496  {
497  hit.setMetaValue(old_score_type, hit.getScore());
498  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
499  new_hits.push_back(std::move(hit));
500  } // else do not move over
501  }
502 
503  template<typename HitType>
504  static void setScoreHigherWorseAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
505  HitType &hit,
506  const std::string &old_score_type,
507  std::vector<HitType> &new_hits)
508  {
509  const String &target_decoy(hit.getMetaValue("target_decoy"));
510  if (target_decoy[0] == 't')
511  {
512  hit.setMetaValue(old_score_type, hit.getScore());
513  auto ub = scores_to_FDR.upper_bound(hit.getScore());
514  if (ub != scores_to_FDR.begin()) ub--;
515  hit.setScore(ub->second);
516  new_hits.push_back(std::move(hit));
517  } // else do not move over
518  }
519 
520 
529  static void setScoreAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
530  PeptideHit &hit,
531  const std::string &old_score_type,
532  std::vector<PeptideHit> &new_hits,
533  int charge)
534  {
535  if (charge == hit.getCharge())
536  {
537  const String &target_decoy(hit.getMetaValue("target_decoy"));
538  if (target_decoy[0] == 't')
539  {
540  hit.setMetaValue(old_score_type, hit.getScore());
541  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
542  new_hits.push_back(std::move(hit));
543  } // else do not move over
544  }
545  else // different charge, move over unchanged to process later at correct charge.
546  {
547  new_hits.push_back(std::move(hit));
548  }
549  }
550 
561  template<class ...Args>
562  static void setPeptideScoresForMap_(const std::map<double, double> &scores_to_FDR,
563  ConsensusMap &cmap,
564  bool include_unassigned_peptides,
565  const std::string &score_type,
566  bool higher_better,
567  bool keep_decoy,
568  Args&&... args)
569  {
570  //Note: Gcc4.8 cannot handle variadic templates in lambdas
571  auto f =
572  [&](PeptideIdentification &id) -> void
573  { setScores_(scores_to_FDR, id, score_type,
574  higher_better, keep_decoy, std::forward<Args>(args)...); };
575  cmap.applyFunctionOnPeptideIDs(f, include_unassigned_peptides);
576  }
577 
583  static void checkTDAnnotation_(const MetaInfoInterface &id_or_hit)
584  {
585  if (!id_or_hit.metaValueExists("target_decoy"))
586  {
587  throw Exception::MissingInformation(__FILE__,
588  __LINE__,
589  OPENMS_PRETTY_FUNCTION,
590  "Meta value 'target_decoy' does not exist in all ProteinHits! Reindex the idXML file with 'PeptideIndexer'");
591  }
592  }
593 
594  static void setPeptideScoresFromMap_(std::unordered_map<String, ScoreToTgtDecLabelPair> const& seq_to_fdr,
595  std::vector<PeptideIdentification>& ids,
596  std::string const& score_type,
597  bool keep_decoys);
598 
599  static void setPeptideScoresFromMap_(std::unordered_map<String, ScoreToTgtDecLabelPair> const& seq_to_fdr,
600  ConsensusMap& map,
601  std::string const& score_type,
602  bool keep_decoys,
603  bool include_unassigned);
604  };
605 } // namespace OpenMS
A container for consensus elements.
Definition: ConsensusMap.h:66
Not all required information provided.
Definition: Exception.h:162
A class for extracting and reinserting IDScores from Peptide/ProteinIdentifications and from Consensu...
Definition: IDScoreGetterSetter.h:40
static void fillPeptideScoreMap_(std::unordered_map< String, ScoreToTgtDecLabelPair > &seq_to_score_labels, ConsensusMap const &map, bool include_unassigned)
static void setPeptideScoresFromMap_(std::unordered_map< String, ScoreToTgtDecLabelPair > const &seq_to_fdr, std::vector< PeptideIdentification > &ids, std::string const &score_type, bool keep_decoys)
static std::pair< bool, String > removeDecoyStringIfPresent_(const String &acc, const String &decoy_string, bool decoy_prefix)
removes the decoy_string from acc if present. Returns if string was removed and the new string.
static void setScoreHigherWorseAndMoveIfTarget_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type, std::vector< HitType > &new_hits)
Definition: IDScoreGetterSetter.h:504
static void setScoreAndMoveIfTarget_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type, std::vector< HitType > &new_hits)
Used when keep_decoy_peptides or proteins is false.
Definition: IDScoreGetterSetter.h:489
static void setPeptideScoresForMap_(const std::map< double, double > &scores_to_FDR, ConsensusMap &cmap, bool include_unassigned_peptides, const std::string &score_type, bool higher_better, bool keep_decoy, Args &&... args)
Helper for applying set Scores on ConsensusMaps.
Definition: IDScoreGetterSetter.h:562
static void fillPeptideScoreMap_(std::unordered_map< String, ScoreToTgtDecLabelPair > &seq_to_score_labels, std::vector< PeptideIdentification > const &ids)
static void setPeptideScoresFromMap_(std::unordered_map< String, ScoreToTgtDecLabelPair > const &seq_to_fdr, ConsensusMap &map, std::string const &score_type, bool keep_decoys, bool include_unassigned)
static bool getTDLabel_(const MetaInfoInterface &idOrHit)
For peptide hits, a hit is considered target also if it maps to both a target and a decoy protein (i....
Definition: IDScoreGetterSetter.h:241
static void getPeptideScoresFromMap_(ScoreToTgtDecLabelPairs &scores_labels, const ConsensusMap &cmap, bool include_unassigned_peptides, Args &&... args)
Helper for getting scores in ConsensusMaps.
Definition: IDScoreGetterSetter.h:226
static void checkTDAnnotation_(const MetaInfoInterface &id_or_hit)
To check the metavalues before we do anything.
Definition: IDScoreGetterSetter.h:583
static void getPickedProteinGroupScores_(const std::unordered_map< String, ScoreToTgtDecLabelPair > &picked_scores, ScoreToTgtDecLabelPairs &scores_labels, const std::vector< ProteinIdentification::ProteinGroup > &grps, const String &decoy_string, bool decoy_prefix)
Fills the scores_labels vector from a vector of ProteinGroups grps for picked protein group FDR.
static void setScoreAndMoveIfTarget_(const std::map< double, double > &scores_to_FDR, PeptideHit &hit, const std::string &old_score_type, std::vector< PeptideHit > &new_hits, int charge)
Used when keep_decoy_peptides is false and charge states are considered.
Definition: IDScoreGetterSetter.h:529
static void getPickedProteinScores_(std::unordered_map< String, ScoreToTgtDecLabelPair > &picked_scores, const ProteinIdentification &id, const String &decoy_string, bool decoy_prefix)
Fills the scores_labels vector from an ProteinIdentification id for picked protein FDR....
void applyFunctionOnPeptideIDs(T &&f, bool include_unassigned=true)
applies a function on all PeptideIDs or only assigned ones
Definition: MapUtilities.h:42
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:35
bool metaValueExists(const String &name) const
Returns whether an entry with the given name exists.
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
const DataValue & getMetaValue(const String &name) const
Returns the value corresponding to a string, or DataValue::EMPTY if not found.
Representation of a peptide hit.
Definition: PeptideHit.h:31
double getScore() const
returns the PSM score
Int getCharge() const
returns the charge of the peptide
void setScore(double score)
sets the PSM score
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:39
Representation of a protein hit.
Definition: ProteinHit.h:34
double getScore() const
returns the score of the protein hit
Representation of a protein identification run.
Definition: ProteinIdentification.h:50
A more convenient string class.
Definition: String.h:34
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const PeptideIdentification &id, IDPredicate &&fun, bool all_hits, Args &&... args)
Definition: IDScoreGetterSetter.h:170
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const PeptideHit &hit, HitPredicate &&fun)
Definition: IDScoreGetterSetter.h:198
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const std::vector< PeptideIdentification > &ids, Args &&... args)
Definition: IDScoreGetterSetter.h:119
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const HitType &hit)
Definition: IDScoreGetterSetter.h:210
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const std::vector< ProteinIdentification::ProteinGroup > &grps, const std::unordered_set< std::string > &decoy_accs)
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const ProteinIdentification &id)
Definition: IDScoreGetterSetter.h:130
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const PeptideIdentification &id, bool all_hits, Args &&... args)
Definition: IDScoreGetterSetter.h:146
static void setScoresHigherWorseAndRemoveDecoys_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type, Args &&... args)
Definition: IDScoreGetterSetter.h:348
static void setScores_(const std::map< double, double > &scores_to_FDR, std::vector< ProteinIdentification::ProteinGroup > &grps, const std::string &score_type, bool higher_better)
static String setScoreType_(IDType &id, const std::string &score_type, bool higher_better)
Definition: IDScoreGetterSetter.h:271
static void setScoreHigherWorse_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type)
Definition: IDScoreGetterSetter.h:369
static void setScores_(const std::map< double, double > &scores_to_FDR, PeptideIdentification &id, const std::string &score_type, bool higher_better, bool keep_decoy, int charge, const String &identifier)
Definition: IDScoreGetterSetter.h:404
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const std::string &score_type, bool higher_better, bool keep_decoy, const String &identifier)
Definition: IDScoreGetterSetter.h:419
static void setScores_(const std::map< double, double > &scores_to_FDR, PeptideIdentification &id, const std::string &score_type, bool higher_better, bool keep_decoy, int charge)
Definition: IDScoreGetterSetter.h:386
static void setScore_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type)
Definition: IDScoreGetterSetter.h:362
static void setScoresHigherWorse_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type)
Definition: IDScoreGetterSetter.h:323
static void setScoresAndRemoveDecoys_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type, Args &&... args)
Definition: IDScoreGetterSetter.h:334
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const std::string &score_type, bool higher_better, int charge)
Definition: IDScoreGetterSetter.h:452
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const std::string &score_type, bool higher_better, bool keep_decoy)
Definition: IDScoreGetterSetter.h:281
static void setScores_(const std::map< double, double > &scores_to_FDR, std::vector< IDType > &ids, const std::string &score_type, bool higher_better, Args &&... args)
Definition: IDScoreGetterSetter.h:258
static void setScores_(const std::map< double, double > &scores_to_FDR, PeptideIdentification &id, const std::string &score_type, bool higher_better, int charge, const String &identifier)
Definition: IDScoreGetterSetter.h:428
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type)
Definition: IDScoreGetterSetter.h:312
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const std::string &score_type, bool higher_better, const String &identifier)
Definition: IDScoreGetterSetter.h:442
custom arguments to allow for looping calls
Definition: WizardHelper.h:47
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
std::pair< double, double > ScoreToTgtDecLabelPair
Definition: IDScoreGetterSetter.h:27
Definition: IDScoreGetterSetter.h:53
static bool const value
Definition: IDScoreGetterSetter.h:54
Definition: IDScoreGetterSetter.h:46
static bool const value
Definition: IDScoreGetterSetter.h:47
Definition: IDScoreGetterSetter.h:31
std::vector< ScoreToTgtDecLabelPair > Base
Definition: IDScoreGetterSetter.h:32