#include <yat/utility/SmithWaterman.h>
|
| SmithWaterman (double gap=0, double open_gap=0) |
| Constructor. More...
|
|
| SmithWaterman (double vertical_gap, double open_vertical_gap, double horizon_gap, double open_horizon_gap) |
| Constructor. More...
|
|
const Aligner::Cigar & | cigar (void) const |
|
size_t | position (void) const |
|
const Matrix & | score (void) const |
|
double | operator() (const Matrix &dot) |
|
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 > |
double | operator() (RandomAccessIterator1 reference_begin, RandomAccessIterator1 reference_end, RandomAccessIterator2 query_begin, RandomAccessIterator2 query_end, double mismatch=0) |
|
theplu::yat::utility::SmithWaterman::SmithWaterman |
( |
double |
gap = 0 , |
|
|
double |
open_gap = 0 |
|
) |
| |
|
explicit |
Constructor.
Same as SmithWaterman(gap, open_gap, gap, open_gap)
theplu::yat::utility::SmithWaterman::SmithWaterman |
( |
double |
vertical_gap, |
|
|
double |
open_vertical_gap, |
|
|
double |
horizon_gap, |
|
|
double |
open_horizon_gap |
|
) |
| |
Constructor.
- Parameters
-
vertical_gap | Penalty for extending a vertical gap. A vertical gap means consuming a reference element i.e. a deletion in query sequence. |
open_vertical_gap | Open a deletion. Total cost for a deletion is open_vertical_gap + N * vertical_gap. |
horizon_gap | Penalty for extending a insertion. |
open_horizon_gap | Penalty for open an insertion. Total penalty for a insertion is open_horizon_gap + N * horizon_gap. |
const Aligner::Cigar& theplu::yat::utility::SmithWaterman::cigar |
( |
void |
| ) |
const |
The CIGAR here is slightly different compared to CIGAR in Aligner as it uses BAM_CEQUAL and BAM_CDIFF rather than BAM_CMATCH, and it also uses BAM_CSOFT_CLIP and ends of CIGAR to reflect if whole query was aligned.
- Returns
- CIGAR reflecting latest performed alignment
double theplu::yat::utility::SmithWaterman::operator() |
( |
const Matrix & |
dot | ) |
|
Find best alignment using Smith-Waterman algorithm based on the dot-matrix. Each row in dot corresponds to an element in reference, and each column corresponds to an element in the query.
- Returns
- smith-waterman score
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 >
double theplu::yat::utility::SmithWaterman::operator() |
( |
RandomAccessIterator1 |
reference_begin, |
|
|
RandomAccessIterator1 |
reference_end, |
|
|
RandomAccessIterator2 |
query_begin, |
|
|
RandomAccessIterator2 |
query_end, |
|
|
double |
mismatch = 0 |
|
) |
| |
Calculate a dot-matrix of size query_end-query_begin X reference_end-reference_begin where the element ij is 1.0 if reference_begin[i] == query_begin[j] and -mismatch otherwise.
Type Requirements:
size_t theplu::yat::utility::SmithWaterman::position |
( |
void |
| ) |
const |
- Returns
- position i.e. first element in reference that is aligned to the query.
const Matrix& theplu::yat::utility::SmithWaterman::score |
( |
void |
| ) |
const |
The documentation for this class was generated from the following file: