4340 |
16 Apr 23 |
peter |
1 |
#ifndef _theplu_yat_utility_msemi_local_aligner_ |
4340 |
16 Apr 23 |
peter |
2 |
#define _theplu_yat_utility_msemi_local_aligner_ |
4340 |
16 Apr 23 |
peter |
// $Id$ |
4340 |
16 Apr 23 |
peter |
4 |
|
4346 |
24 Apr 23 |
peter |
5 |
/* |
4346 |
24 Apr 23 |
peter |
Copyright (C) 2023 Peter Johansson |
4346 |
24 Apr 23 |
peter |
7 |
|
4346 |
24 Apr 23 |
peter |
This file is part of the yat library, https://dev.thep.lu.se/yat |
4346 |
24 Apr 23 |
peter |
9 |
|
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 |
14 |
|
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 |
19 |
|
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 |
22 |
*/ |
4346 |
24 Apr 23 |
peter |
23 |
|
4340 |
16 Apr 23 |
peter |
24 |
#include "mAligner.h" |
4340 |
16 Apr 23 |
peter |
25 |
|
4340 |
16 Apr 23 |
peter |
26 |
namespace theplu { |
4340 |
16 Apr 23 |
peter |
27 |
namespace yat { |
4340 |
16 Apr 23 |
peter |
28 |
namespace utility { |
4340 |
16 Apr 23 |
peter |
29 |
|
4344 |
17 Apr 23 |
peter |
30 |
/** |
4344 |
17 Apr 23 |
peter |
\since New in yat 0.21 |
4344 |
17 Apr 23 |
peter |
32 |
*/ |
4353 |
23 Aug 23 |
peter |
33 |
class mSemiLocalAligner : public mAligner<mSemiLocalAligner> |
4340 |
16 Apr 23 |
peter |
34 |
{ |
4340 |
16 Apr 23 |
peter |
35 |
public: |
4344 |
17 Apr 23 |
peter |
36 |
/** |
4344 |
17 Apr 23 |
peter |
Equivalent with |
4344 |
17 Apr 23 |
peter |
mSemiLocalAligner(gap, open_gap, gap, open_gap, |
4344 |
17 Apr 23 |
peter |
gap, open_gap, gap, open_gap) |
4344 |
17 Apr 23 |
peter |
40 |
*/ |
4340 |
16 Apr 23 |
peter |
41 |
mSemiLocalAligner(double gap, double open_gap); |
4344 |
17 Apr 23 |
peter |
42 |
|
4344 |
17 Apr 23 |
peter |
43 |
/** |
4344 |
17 Apr 23 |
peter |
\param insertion_penalty penalty extending an insertion one element |
4344 |
17 Apr 23 |
peter |
45 |
|
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 |
49 |
|
4344 |
17 Apr 23 |
peter |
\param deletion_penalty penalty extending a deletion one element |
4344 |
17 Apr 23 |
peter |
51 |
|
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 |
55 |
*/ |
4340 |
16 Apr 23 |
peter |
56 |
mSemiLocalAligner(double insertion_penalty, |
4340 |
16 Apr 23 |
peter |
57 |
double open_insertion_penalty, |
4340 |
16 Apr 23 |
peter |
58 |
double deletion_penalty, |
4353 |
23 Aug 23 |
peter |
59 |
double open_deletion_penalty); |
4340 |
16 Apr 23 |
peter |
60 |
|
4340 |
16 Apr 23 |
peter |
61 |
|
4353 |
23 Aug 23 |
peter |
62 |
private: |
4353 |
23 Aug 23 |
peter |
63 |
friend class mAligner; |
4353 |
23 Aug 23 |
peter |
64 |
double init_row(size_t q) const; |
4353 |
23 Aug 23 |
peter |
65 |
double init_col(size_t r) const; |
4353 |
23 Aug 23 |
peter |
66 |
double init(size_t r, size_t q) const; |
4353 |
23 Aug 23 |
peter |
67 |
void update(const std::vector<Alignment>& alignments,size_t r, |
4353 |
23 Aug 23 |
peter |
68 |
size_t rsize); |
4353 |
23 Aug 23 |
peter |
69 |
}; |
4344 |
17 Apr 23 |
peter |
70 |
|
4344 |
17 Apr 23 |
peter |
71 |
|
4344 |
17 Apr 23 |
peter |
72 |
|
4340 |
16 Apr 23 |
peter |
73 |
|
4340 |
16 Apr 23 |
peter |
74 |
}}} |
4340 |
16 Apr 23 |
peter |
75 |
#endif |