Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MCAligner.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file MCAligner.hh
11 /// @brief class definition for a class that aligns two Sequence objects using a
12 /// the Needleman-Wunsch alignment algorithm.
13 /// @author James Thompson
14 
15 #ifndef INCLUDED_core_sequence_MCAligner_hh
16 #define INCLUDED_core_sequence_MCAligner_hh
17 
18 #include <core/types.hh>
19 
20 #include <core/sequence/Aligner.hh>
24 
25 namespace core {
26 namespace sequence {
27 
28 class MCAligner : public Aligner {
29 
30 public:
31 
32  /// @brief constructors
33  MCAligner() : kT_( 1 ) {}
34  MCAligner( Real kT ) : kT_( kT ) {}
35 
36  /// @brief destructor
37  virtual ~MCAligner() {}
38 
39  /// @brief Sets the kT used in the align method. A optimal value of kT means
40  /// acceptance of less optimal decisions along the dynamic programming matrix.
41  void kT( Real new_kT ) {
42  kT_ = new_kT;
43  }
44 
45  /// @brief Returns the kT used in the align method.
46  Real kT() const {
47  return kT_;
48  }
49 
50  /// @brief Align these two Sequences using the given ScoringScheme. Rather
51  /// than finding an optimal alignment, MCAligner uses a stochastic algorithm
52  /// to generate an alignment at a given kT.
53  /// @detailed The Needleman-Wunsch algorithm uses dynamic programming to
54  /// generate an optimal alignment between two scoring sequences under a given
55  /// scoring scheme. Rather than making the best decision at each element of
56  /// the dynamic programming matrix, MCAligner makes a stochastic decision
57  /// between introducing a gap in seq_y, introducing a gap in seq_x, or aligning two
58  /// characters between the two sequences. The decision is made by transforming the
59  /// scores for each of the three possible decisions into probabilities using
60  /// Boltzmann weighting of the scores for each possibility at a given kT. The kT
61  /// is stored as a member variable of the MCAligner class, and accessor methods
62  /// are provided above.
63 
64  virtual
66  SequenceOP seq_y,
67  SequenceOP seq_x,
69  );
70 
71 private:
73 }; // class MCAligner
74 
75 } // sequence
76 } // core
77 
78 #endif