yat
0.9.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
utility
Aligner.h
1
#ifndef _theplu_yat_utility_aligner_
2
#define _theplu_yat_utility_aligner_
3
4
// $Id: Aligner.h 2816 2012-08-28 02:44:03Z peter $
5
6
/*
7
Copyright (C) 2012 Peter Johansson
8
9
This file is part of the yat library, http://dev.thep.lu.se/yat
10
11
The yat library is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License as
13
published by the Free Software Foundation; either version 3 of the
14
License, or (at your option) any later version.
15
16
The yat library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with yat. If not, see <http://www.gnu.org/licenses/>.
23
*/
24
25
#include <vector>
26
27
namespace
theplu {
28
namespace
yat {
29
namespace
utility {
30
31
class
Matrix;
32
47
class
Aligner
48
{
49
public
:
55
enum
direction
{ none, right, down, diagonal };
56
62
Aligner
(
double
gap=0,
double
open_gap=0);
63
79
Aligner
(
double
vertical_gap,
double
open_vertical_gap,
80
double
horizon_gap,
double
open_horizon_gap);
81
90
double
needleman_wunsch
(
const
Matrix
& d);
91
98
double
smith_waterman
(
const
Matrix
& d);
99
112
void
operator()
(
const
Matrix
& dot,
Matrix
& score);
113
122
const
direction
&
alignment
(
size_t
i,
size_t
j)
const
;
123
124
private
:
125
direction
& cigar(
size_t
i,
size_t
j);
126
127
size_t
columns_;
128
double
vertical_gap_;
129
double
open_vertical_gap_;
130
double
horizon_gap_;
131
double
open_horizon_gap_;
132
std::vector<direction> alignment_;
133
};
134
135
}}}
// of namespace utility, yat, and theplu
136
137
#endif
Generated on Tue Jan 29 2013 02:33:39 for yat by
1.8.1