4340 |
16 Apr 23 |
peter |
1 |
#ifndef _theplu_yat_utility_msmith_waterman |
4340 |
16 Apr 23 |
peter |
2 |
#define _theplu_yat_utility_msmith_waterman |
4346 |
24 Apr 23 |
peter |
3 |
|
4340 |
16 Apr 23 |
peter |
// $Id$ |
4340 |
16 Apr 23 |
peter |
5 |
|
4346 |
24 Apr 23 |
peter |
6 |
/* |
4346 |
24 Apr 23 |
peter |
Copyright (C) 2023 Peter Johansson |
4346 |
24 Apr 23 |
peter |
8 |
|
4346 |
24 Apr 23 |
peter |
This file is part of the yat library, https://dev.thep.lu.se/yat |
4346 |
24 Apr 23 |
peter |
10 |
|
4346 |
24 Apr 23 |
peter |
The yat library is free software; you can redistribute it and/or |
4346 |
24 Apr 23 |
peter |
modify it under the terms of the GNU General Public License as |
4346 |
24 Apr 23 |
peter |
published by the Free Software Foundation; either version 3 of the |
4346 |
24 Apr 23 |
peter |
License, or (at your option) any later version. |
4346 |
24 Apr 23 |
peter |
15 |
|
4346 |
24 Apr 23 |
peter |
The yat library is distributed in the hope that it will be useful, |
4346 |
24 Apr 23 |
peter |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4346 |
24 Apr 23 |
peter |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4346 |
24 Apr 23 |
peter |
General Public License for more details. |
4346 |
24 Apr 23 |
peter |
20 |
|
4346 |
24 Apr 23 |
peter |
You should have received a copy of the GNU General Public License |
4346 |
24 Apr 23 |
peter |
along with yat. If not, see <https://www.gnu.org/licenses/>. |
4346 |
24 Apr 23 |
peter |
23 |
*/ |
4346 |
24 Apr 23 |
peter |
24 |
|
4340 |
16 Apr 23 |
peter |
25 |
#include "mAligner.h" |
4340 |
16 Apr 23 |
peter |
26 |
|
4340 |
16 Apr 23 |
peter |
27 |
namespace theplu { |
4340 |
16 Apr 23 |
peter |
28 |
namespace yat { |
4340 |
16 Apr 23 |
peter |
29 |
namespace utility { |
4340 |
16 Apr 23 |
peter |
30 |
|
4344 |
17 Apr 23 |
peter |
31 |
/** |
4344 |
17 Apr 23 |
peter |
\since New in yat 0.21 |
4344 |
17 Apr 23 |
peter |
33 |
*/ |
4353 |
23 Aug 23 |
peter |
34 |
class mSmithWaterman : public mAligner<mSmithWaterman> |
4340 |
16 Apr 23 |
peter |
35 |
{ |
4340 |
16 Apr 23 |
peter |
36 |
public: |
4344 |
17 Apr 23 |
peter |
37 |
/** |
4344 |
17 Apr 23 |
peter |
Equivalent with mSmithWaterman(gap, open_gap, gap, open_gap) |
4344 |
17 Apr 23 |
peter |
39 |
*/ |
4340 |
16 Apr 23 |
peter |
40 |
mSmithWaterman(double gap, double open_gap); |
4340 |
16 Apr 23 |
peter |
41 |
|
4344 |
17 Apr 23 |
peter |
42 |
/** |
4344 |
17 Apr 23 |
peter |
\param insertion_penalty penalty extending an insertion one element |
4344 |
17 Apr 23 |
peter |
44 |
|
4344 |
17 Apr 23 |
peter |
\param open_insertion_penalty total penalty for an n-element |
4344 |
17 Apr 23 |
peter |
insertion is \a open_insertion_penalty + \c n * \a |
4344 |
17 Apr 23 |
peter |
insertion_penalty |
4344 |
17 Apr 23 |
peter |
48 |
|
4344 |
17 Apr 23 |
peter |
\param deletion_penalty penalty extending an deletion one element |
4344 |
17 Apr 23 |
peter |
50 |
|
4344 |
17 Apr 23 |
peter |
\param open_deletion_penalty total penalty for an n-element |
4344 |
17 Apr 23 |
peter |
deletion is \a open_deletion_penalty + \c n * \a |
4344 |
17 Apr 23 |
peter |
deletion_penalty |
4344 |
17 Apr 23 |
peter |
54 |
*/ |
4340 |
16 Apr 23 |
peter |
55 |
mSmithWaterman(double insertion_penalty, |
4340 |
16 Apr 23 |
peter |
56 |
double open_insertion_penalty, |
4340 |
16 Apr 23 |
peter |
57 |
double deletion_penalty, |
4340 |
16 Apr 23 |
peter |
58 |
double open_deletion_penalty); |
4340 |
16 Apr 23 |
peter |
59 |
|
4340 |
16 Apr 23 |
peter |
60 |
private: |
4353 |
23 Aug 23 |
peter |
61 |
friend class mAligner; |
4353 |
23 Aug 23 |
peter |
62 |
double init_row(size_t q) const; |
4353 |
23 Aug 23 |
peter |
63 |
double init_col(size_t r) const; |
4353 |
23 Aug 23 |
peter |
64 |
double init(size_t r, size_t q) const; |
4353 |
23 Aug 23 |
peter |
65 |
void update(const std::vector<Alignment>& alignments, size_t r, |
4353 |
23 Aug 23 |
peter |
66 |
size_t rsize); |
4340 |
16 Apr 23 |
peter |
67 |
}; |
4340 |
16 Apr 23 |
peter |
68 |
|
4340 |
16 Apr 23 |
peter |
69 |
}}} |
4340 |
16 Apr 23 |
peter |
70 |
#endif |