source: trunk/lib/utility/Alignment.h @ 304

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

moved namespace dox to separate file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1// $Id: Alignment.h 304 2005-05-02 14:10:50Z 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 {
16namespace alignment {
17
18  ///
19  /// Function performing alignment following the Needleman-Wunch
20  /// algorithm. The algorithm starts from the dot-matrix, \a s, where
21  /// \f$ s_{ij} \f$ describes how well element \f$ i \f$ in the first
22  /// sequence match to element \f$ j \f$ in the second sequence. A
23  /// path through this matrix corresponds to an alignment of the two
24  /// sequences, in which a diagonal step over a matrix element
25  /// corresponds to a match between the corresponding sequnce
26  /// elements and a vertical or a horizontal step corresponds to
27  /// inserting a gap in one of the sequnces. The function maximizes
28  /// \f$ \sum s_{ij}-n \f$ \a gap, where the first sum goes over all
29  /// matches and the second term is a penalty term for inserting \f$
30  /// n \f$ gaps. Default is to have the \a gap cost set to zero. The
31  /// vector \a path contains information about which elements that
32  /// were matched. If the first element in the first sequence was
33  /// matched to the first element in the second sequence, the last
34  /// element in \a path is pair(0,0).
35  ///
36  /// @return the global maximum alignment score.
37  ///
38  double NeedlemanWunsch(const gslapi::matrix& s,
39                         std::vector<std::pair<size_t, size_t> >& path,
40                         const double gap);
41
42}}} // of namespace alignment namespace utility and namespace theplu
43
44#endif
Note: See TracBrowser for help on using the repository browser.