# source:trunk/lib/utility/Alignment.h@303

Last change on this file since 303 was 303, checked in by Peter, 17 years ago

docs

• Property svn:eol-style set to native
• Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line
1// $Id: Alignment.h 303 2005-04-30 16:17:35Z peter$
2
3#ifndef _theplu_utility_alignment_
4#define _theplu_utility_alignment_
5
6#include <utility>
7#include <vector>
8
9namespace theplu {
10
11namespace gslapi {
12  class matrix;
13}
14
15namespace utility {
16// Jari, this should probably go somewhere else for doxygen to process.
17///
18/// All alignment algorithm should go into the aligment namespace
19///
20/// \brief Container for alignment algorithms
21///
22namespace alignment {
23
24  ///
25  /// Function performing alignment following the Needleman-Wunch
26  /// algorithm. The algorithm starts from the dot-matrix, \a s, where
27  /// \f$s_{ij} \f$ describes how well element \f$i \f$ in the first
28  /// sequence match to element \f$j \f$ in the second sequence. A
29  /// path through this matrix corresponds to an alignment of the two
30  /// sequences, in which a diagonal step over a matrix element
31  /// corresponds to a match between the corresponding sequnce
32  /// elements and a vertical or a horizontal step corresponds to
33  /// inserting a gap in one of the sequnces. The function maximizes
34  /// \f$\sum s_{ij}-n \f$ \a gap, where the first sum goes over all
35  /// matches and the second term is a penalty term for inserting \f$36 /// n \f$ gaps. Default is to have the \a gap cost set to zero. The
37  /// vector \a path contains information about which elements that
38  /// were matched. If the first element in the first sequence was
39  /// matched to the first element in the second sequence, the last
40  /// element in \a path is pair(0,0).
41  ///
42  /// @return the global maximum alignment score.
43  ///
44  double NeedlemanWunsch(const gslapi::matrix& s,
45                         std::vector<std::pair<size_t, size_t> >& path,
46                         const double gap);
47
48}}} // of namespace alignment namespace utility and namespace theplu
49
50#endif
Note: See TracBrowser for help on using the repository browser.