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