OpenMS
ConsensusIDAlgorithmSimilarity.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: Hendrik Weisser $
6 // $Authors: Andreas Bertsch, Marc Sturm, Sven Nahnsen, Hendrik Weisser $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
28  class OPENMS_DLLAPI ConsensusIDAlgorithmSimilarity :
30  {
31  protected:
34 
36  typedef std::map<std::pair<AASequence, AASequence>, double> SimilarityCache;
37 
40 
48  virtual double getSimilarity_(AASequence seq1, AASequence seq2) = 0;
49 
50  private:
53 
56 
58  void apply_(std::vector<PeptideIdentification>& ids,
59  const std::map<String, String>& se_info,
60  SequenceGrouping& results) override;
61  };
62 
63 } // namespace OpenMS
64 
Representation of a peptide/protein sequence.
Definition: AASequence.h:86
Abstract base class for ConsensusID algorithms that take peptide similarity into account.
Definition: ConsensusIDAlgorithmSimilarity.h:30
SimilarityCache similarities_
Cache for already computed sequence similarities.
Definition: ConsensusIDAlgorithmSimilarity.h:39
std::map< std::pair< AASequence, AASequence >, double > SimilarityCache
Mapping: pair of peptide sequences -> sequence similarity.
Definition: ConsensusIDAlgorithmSimilarity.h:36
virtual double getSimilarity_(AASequence seq1, AASequence seq2)=0
Sequence similarity calculation (to be implemented by subclasses).
void apply_(std::vector< PeptideIdentification > &ids, const std::map< String, String > &se_info, SequenceGrouping &results) override
Consensus scoring.
ConsensusIDAlgorithmSimilarity(const ConsensusIDAlgorithmSimilarity &)
Not implemented.
ConsensusIDAlgorithmSimilarity & operator=(const ConsensusIDAlgorithmSimilarity &)
Not implemented.
ConsensusIDAlgorithmSimilarity()
Default constructor.
Abstract base class for all ConsensusID algorithms (that calculate a consensus from multiple ID runs)...
Definition: ConsensusIDAlgorithm.h:34
std::map< AASequence, HitInfo > SequenceGrouping
Mapping: peptide sequence -> (charge, scores)
Definition: ConsensusIDAlgorithm.h:71
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22