OpenMS
IDScoreGetterSetter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- 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:
68  std::unordered_map<String, ScoreToTgtDecLabelPair>& picked_scores,
69  const ProteinIdentification& id,
70  const String& decoy_string,
71  bool decoy_prefix);
72 
83  const std::unordered_map<String, ScoreToTgtDecLabelPair>& picked_scores,
84  ScoreToTgtDecLabelPairs& scores_labels,
85  const std::vector<ProteinIdentification::ProteinGroup>& grps,
86  const String& decoy_string,
87  bool decoy_prefix);
88 
90  static std::pair<bool,String> removeDecoyStringIfPresent_(const String& acc, const String& decoy_string, bool decoy_prefix);
91 
92  static void fillPeptideScoreMap_(
93  std::unordered_map<String, ScoreToTgtDecLabelPair>& seq_to_score_labels,
94  std::vector<PeptideIdentification> const& ids);
95 
96  static void fillPeptideScoreMap_(
97  std::unordered_map<String, ScoreToTgtDecLabelPair>& seq_to_score_labels,
98  ConsensusMap const& map,
99  bool include_unassigned);
100 
101 
111  //TODO could be done with set of target accessions, too
112  //TODO even better: store nr targets and nr decoys when creating the groups!
113  //TODO alternative scoring is possible, too (e.g. ratio of tgts vs decoys)
114  static void getScores_(
115  ScoreToTgtDecLabelPairs &scores_labels,
116  const std::vector<ProteinIdentification::ProteinGroup> &grps,
117  const std::unordered_set<std::string> &decoy_accs);
118 
119 
120  template<class ...Args>
121  static void getScores_(
122  ScoreToTgtDecLabelPairs &scores_labels,
123  const std::vector<PeptideIdentification> &ids,
124  Args &&... args)
125  {
126  for (const PeptideIdentification &id : ids)
127  {
128  getScores_(scores_labels, id, std::forward<Args>(args)...);
129  }
130  }
131 
132  static void getScores_(
133  ScoreToTgtDecLabelPairs &scores_labels,
134  const ProteinIdentification &id)
135  {
136  scores_labels.reserve(scores_labels.size() + id.getHits().size());
137  std::transform(id.getHits().begin(), id.getHits().end(),
138  std::back_inserter(scores_labels),
139  [](const ProteinHit &hit)
140  {
141  checkTDAnnotation_(hit);
142  return std::make_pair<double, bool>(hit.getScore(), getTDLabel_(hit));
143  }
144  );
145  }
146 
147  template<class ...Args>
148  static void getScores_(
149  ScoreToTgtDecLabelPairs &scores_labels,
150  const PeptideIdentification &id,
151  bool all_hits,
152  Args &&... args
153  )
154  {
155  if (all_hits)
156  {
157  for (const PeptideHit &hit : id.getHits())
158  {
159  getScores_(scores_labels, hit, std::forward<Args>(args)...);
160  }
161  }
162  else
163  {
164  //TODO for speed and constness I assume that they are sorted and first = best.
165  //id.sort();
166  const PeptideHit &hit = id.getHits()[0];
167  getScores_(scores_labels, hit, std::forward<Args>(args)...);
168  }
169  }
170 
171  template<typename IDPredicate, class ...Args>
172  static void getScores_(
173  ScoreToTgtDecLabelPairs &scores_labels,
174  const PeptideIdentification &id,
175  IDPredicate &&fun,
176  bool all_hits,
177  Args &&... args
178  )
179  {
180  if (fun(id))
181  {
182  if (all_hits)
183  {
184  for (const PeptideHit &hit : id.getHits())
185  {
186  getScores_(scores_labels, hit, std::forward<Args>(args)...);
187  }
188  }
189  else
190  {
191  //TODO for speed I assume that they are sorted and first = best.
192  //id.sort();
193  const PeptideHit &hit = id.getHits()[0];
194  getScores_(scores_labels, hit, std::forward<Args>(args)...);
195  }
196  }
197  }
198 
199  template<typename HitPredicate>
200  static void getScores_(
201  ScoreToTgtDecLabelPairs &scores_labels,
202  const PeptideHit &hit,
203  HitPredicate &&fun)
204  {
205  if (fun(hit))
206  {
207  getScores_(scores_labels, hit);
208  }
209  }
210 
211  template<typename HitType, typename std::enable_if<IsHitType<HitType>::value>::type * = nullptr>
212  static void getScores_(
213  ScoreToTgtDecLabelPairs &scores_labels,
214  const HitType &hit)
215  {
216  checkTDAnnotation_(hit);
217  scores_labels.emplace_back(hit.getScore(), getTDLabel_(hit));
218  }
227  template<class ...Args>
229  ScoreToTgtDecLabelPairs &scores_labels,
230  const ConsensusMap &cmap, bool include_unassigned_peptides, Args &&... args)
231  {
232  auto f =
233  [&](const PeptideIdentification &id) -> void
234  { getScores_(scores_labels, id, std::forward<Args>(args)...); };
235  cmap.applyFunctionOnPeptideIDs(f, include_unassigned_peptides);
236  }
237 
243  static bool getTDLabel_(const MetaInfoInterface &idOrHit)
244  {
245  return std::string(idOrHit.getMetaValue("target_decoy"))[0] == 't';
246  }
247 
259  template<typename IDType, class ...Args>
260  static void setScores_(const std::map<double, double> &scores_to_FDR,
261  std::vector<IDType> &ids,
262  const std::string &score_type,
263  bool higher_better,
264  Args &&... args)
265  {
266  for (auto &id : ids)
267  {
268  setScores_(scores_to_FDR, id, score_type, higher_better, std::forward<Args>(args)...);
269  }
270  }
271 
272  template<typename IDType>
273  static String setScoreType_(IDType &id, const std::string &score_type,
274  bool higher_better)
275  {
276  String old_score_type = id.getScoreType() + "_score";
277  id.setScoreType(score_type);
278  id.setHigherScoreBetter(higher_better);
279  return old_score_type;
280  }
281 
282  template<typename IDType>
283  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
284  bool higher_better, bool keep_decoy)
285  {
286  bool old_higher_better = id.isHigherScoreBetter();
287  String old_score_type = setScoreType_(id, score_type, higher_better);
288 
289  if (keep_decoy) //in-place set scores
290  {
291  if (old_higher_better)
292  {
293  setScores_(scores_to_FDR, id, old_score_type);
294  }
295  else
296  {
297  setScoresHigherWorse_(scores_to_FDR, id, old_score_type);
298  }
299  }
300  else
301  {
302  if (old_higher_better)
303  {
304  setScoresAndRemoveDecoys_(scores_to_FDR, id, old_score_type);
305  }
306  else
307  {
308  setScoresHigherWorseAndRemoveDecoys_(scores_to_FDR, id, old_score_type);
309  }
310  }
311  }
312 
313  template<typename IDType>
314  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id,
315  const String &old_score_type)
316  {
317  std::vector<typename IDType::HitType> &hits = id.getHits();
318  for (auto &hit : hits)
319  {
320  setScore_(scores_to_FDR, hit, old_score_type);
321  }
322  }
323 
324  template<typename IDType>
325  static void setScoresHigherWorse_(const std::map<double, double> &scores_to_FDR, IDType &id,
326  const String &old_score_type)
327  {
328  std::vector<typename IDType::HitType> &hits = id.getHits();
329  for (auto &hit : hits)
330  {
331  setScoreHigherWorse_(scores_to_FDR, hit, old_score_type);
332  }
333  }
334 
335  template<typename IDType, class ...Args>
336  static void setScoresAndRemoveDecoys_(const std::map<double, double> &scores_to_FDR, IDType &id,
337  const String &old_score_type, Args&& ... args)
338  {
339  std::vector<typename IDType::HitType> &hits = id.getHits();
340  std::vector<typename IDType::HitType> new_hits;
341  new_hits.reserve(hits.size());
342  for (auto &hit : hits)
343  {
344  setScoreAndMoveIfTarget_(scores_to_FDR, hit, old_score_type, new_hits, std::forward<Args>(args)...);
345  }
346  hits.swap(new_hits);
347  }
348 
349  template<typename IDType, class ...Args>
350  static void setScoresHigherWorseAndRemoveDecoys_(const std::map<double, double> &scores_to_FDR, IDType &id,
351  const String &old_score_type, Args&& ... args)
352  {
353  std::vector<typename IDType::HitType> &hits = id.getHits();
354  std::vector<typename IDType::HitType> new_hits;
355  new_hits.reserve(hits.size());
356  for (auto &hit : hits)
357  {
358  setScoreHigherWorseAndMoveIfTarget_(scores_to_FDR, hit, old_score_type, new_hits, std::forward<Args>(args)...);
359  }
360  hits.swap(new_hits);
361  }
362 
363  template<typename HitType>
364  static void setScore_(const std::map<double, double> &scores_to_FDR, HitType &hit, const std::string &old_score_type)
365  {
366  hit.setMetaValue(old_score_type, hit.getScore());
367  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
368  }
369 
370  template<typename HitType>
371  static void setScoreHigherWorse_(const std::map<double, double> &scores_to_FDR, HitType &hit, const std::string &old_score_type)
372  {
373  hit.setMetaValue(old_score_type, hit.getScore());
374  auto ub = scores_to_FDR.upper_bound(hit.getScore());
375  if (ub != scores_to_FDR.begin()) ub--;
376  hit.setScore(ub->second);
377  }
378 
379  /*template<typename IDType>
380  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
381  bool higher_better)
382  {
383  bool old_higher_better = id.isHigherScoreBetter();
384  String old_score_type = setScoreType_(id, score_type, higher_better);
385  setScores_(scores_to_FDR, id, old_score_type, old_higher_better);
386  }*/
387 
388  static void setScores_(const std::map<double, double> &scores_to_FDR,
390  const std::string &score_type,
391  bool higher_better,
392  bool keep_decoy,
393  int charge)
394  {
395  String old_score_type = setScoreType_(id, score_type, higher_better);
396  if (keep_decoy) //in-place set scores
397  {
398  setScores_(scores_to_FDR, id, old_score_type, higher_better, charge);
399  }
400  else
401  {
402  setScoresAndRemoveDecoys_<PeptideIdentification>(scores_to_FDR, id, old_score_type, charge);
403  }
404  }
405 
406  static void setScores_(const std::map<double, double> &scores_to_FDR,
408  const std::string &score_type,
409  bool higher_better,
410  bool keep_decoy,
411  int charge,
412  const String &identifier)
413  {
414  if (id.getIdentifier() == identifier)
415  {
416  setScores_(scores_to_FDR, id, score_type, higher_better, keep_decoy, charge);
417  }
418  }
419 
420  template<typename IDType>
421  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
422  bool higher_better, bool keep_decoy, const String &identifier)
423  {
424  if (id.getIdentifier() == identifier)
425  {
426  setScores_(scores_to_FDR, id, score_type, higher_better, keep_decoy);
427  }
428  }
429 
430  static void setScores_(const std::map<double, double> &scores_to_FDR,
432  const std::string &score_type,
433  bool higher_better,
434  int charge,
435  const String &identifier)
436  {
437  if (id.getIdentifier() == identifier)
438  {
439  setScores_(scores_to_FDR, id, score_type, higher_better, charge);
440  }
441  }
442 
443  template<typename IDType>
444  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
445  bool higher_better, const String &identifier)
446  {
447  if (id.getIdentifier() == identifier)
448  {
449  setScores_(scores_to_FDR, id, score_type, higher_better);
450  }
451  }
452 
453  template<typename IDType>
454  static void setScores_(const std::map<double, double> &scores_to_FDR, IDType &id, const std::string &score_type,
455  bool higher_better, int charge)
456  {
457  for (auto& hit : id.getHits())
458  {
459  if (hit.getCharge() == charge)
460  {
461  if (higher_better)
462  {
463  setScore_(scores_to_FDR, hit, score_type);
464  }
465  else
466  {
467  setScoreHigherWorse_(scores_to_FDR, hit, score_type);
468  }
469  }
470  }
471  }
472 
473  //TODO could also get a keep_decoy flag when we define what a "decoy group" is -> keep all always for now
474  static void setScores_(
475  const std::map<double, double> &scores_to_FDR,
476  std::vector<ProteinIdentification::ProteinGroup> &grps,
477  const std::string &score_type,
478  bool higher_better);
479 
490  template<typename HitType>
491  static void setScoreAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
492  HitType &hit,
493  const std::string &old_score_type,
494  std::vector<HitType> &new_hits)
495  {
496  const String &target_decoy(hit.getMetaValue("target_decoy"));
497  if (target_decoy[0] == 't')
498  {
499  hit.setMetaValue(old_score_type, hit.getScore());
500  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
501  new_hits.push_back(std::move(hit));
502  } // else do not move over
503  }
504 
505  template<typename HitType>
506  static void setScoreHigherWorseAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
507  HitType &hit,
508  const std::string &old_score_type,
509  std::vector<HitType> &new_hits)
510  {
511  const String &target_decoy(hit.getMetaValue("target_decoy"));
512  if (target_decoy[0] == 't')
513  {
514  hit.setMetaValue(old_score_type, hit.getScore());
515  auto ub = scores_to_FDR.upper_bound(hit.getScore());
516  if (ub != scores_to_FDR.begin()) ub--;
517  hit.setScore(ub->second);
518  new_hits.push_back(std::move(hit));
519  } // else do not move over
520  }
521 
522 
531  static void setScoreAndMoveIfTarget_(const std::map<double, double> &scores_to_FDR,
532  PeptideHit &hit,
533  const std::string &old_score_type,
534  std::vector<PeptideHit> &new_hits,
535  int charge)
536  {
537  if (charge == hit.getCharge())
538  {
539  const String &target_decoy(hit.getMetaValue("target_decoy"));
540  if (target_decoy[0] == 't')
541  {
542  hit.setMetaValue(old_score_type, hit.getScore());
543  hit.setScore(scores_to_FDR.lower_bound(hit.getScore())->second);
544  new_hits.push_back(std::move(hit));
545  } // else do not move over
546  }
547  else // different charge, move over unchanged to process later at correct charge.
548  {
549  new_hits.push_back(std::move(hit));
550  }
551  }
552 
564  template<class ...Args>
565  static void setPeptideScoresForMap_(const std::map<double, double>& scores_to_FDR,
566  ConsensusMap& cmap,
567  bool include_unassigned_peptides,
568  const std::string& score_type,
569  bool higher_better,
570  bool keep_decoy,
571  Args&&... args)
572  {
573  //Note: Gcc4.8 cannot handle variadic templates in lambdas
574  auto f =
575  [&](PeptideIdentification &id) -> void
576  { setScores_(scores_to_FDR, id, score_type,
577  higher_better, keep_decoy, std::forward<Args>(args)...); };
578  cmap.applyFunctionOnPeptideIDs(f, include_unassigned_peptides);
579  }
580 
586  static void checkTDAnnotation_(const MetaInfoInterface &id_or_hit)
587  {
588  if (!id_or_hit.metaValueExists("target_decoy"))
589  {
590  throw Exception::MissingInformation(__FILE__,
591  __LINE__,
592  OPENMS_PRETTY_FUNCTION,
593  "Meta value 'target_decoy' does not exist in all ProteinHits! Reindex the idXML file with 'PeptideIndexer'");
594  }
595  }
596 
597  static void setPeptideScoresFromMap_(std::unordered_map<String, ScoreToTgtDecLabelPair> const& seq_to_fdr,
598  std::vector<PeptideIdentification>& ids,
599  std::string const& score_type,
600  bool keep_decoys);
601 
602  static void setPeptideScoresFromMap_(std::unordered_map<String, ScoreToTgtDecLabelPair> const& seq_to_fdr,
603  ConsensusMap& map,
604  std::string const& score_type,
605  bool keep_decoys,
606  bool include_unassigned);
607  };
608 } // namespace OpenMS
A container for consensus elements.
Definition: ConsensusMap.h:66
Not all required information provided.
Definition: Exception.h:155
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:506
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:491
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:565
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:243
static void getPeptideScoresFromMap_(ScoreToTgtDecLabelPairs &scores_labels, const ConsensusMap &cmap, bool include_unassigned_peptides, Args &&... args)
Helper for getting scores in ConsensusMaps.
Definition: IDScoreGetterSetter.h:228
static void checkTDAnnotation_(const MetaInfoInterface &id_or_hit)
To check the metavalues before we do anything.
Definition: IDScoreGetterSetter.h:586
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:531
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:172
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const PeptideHit &hit, HitPredicate &&fun)
Definition: IDScoreGetterSetter.h:200
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const std::vector< PeptideIdentification > &ids, Args &&... args)
Definition: IDScoreGetterSetter.h:121
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const HitType &hit)
Definition: IDScoreGetterSetter.h:212
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:132
static void getScores_(ScoreToTgtDecLabelPairs &scores_labels, const PeptideIdentification &id, bool all_hits, Args &&... args)
Definition: IDScoreGetterSetter.h:148
static void setScoresHigherWorseAndRemoveDecoys_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type, Args &&... args)
Definition: IDScoreGetterSetter.h:350
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:273
static void setScoreHigherWorse_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type)
Definition: IDScoreGetterSetter.h:371
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:406
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:421
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:388
static void setScore_(const std::map< double, double > &scores_to_FDR, HitType &hit, const std::string &old_score_type)
Definition: IDScoreGetterSetter.h:364
static void setScoresHigherWorse_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type)
Definition: IDScoreGetterSetter.h:325
static void setScoresAndRemoveDecoys_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type, Args &&... args)
Definition: IDScoreGetterSetter.h:336
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:454
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:283
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:260
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:430
static void setScores_(const std::map< double, double > &scores_to_FDR, IDType &id, const String &old_score_type)
Definition: IDScoreGetterSetter.h:314
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:444
custom arguments to allow for looping calls
Definition: WizardHelper.h:47
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
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