NVBIO
|
Calculate the alignment score between a pattern and a text, using the Smith-Waterman algorithm.
BAND_LEN | internal band length |
TYPE | the alignment type |
symbol_type | type of string symbols |
#include <sw_inl.h>
Static Public Methods | |
template<bool CHECK_M, typename context_type , typename query_cache , typename score_type , typename temp_iterator , typename sink_type , typename scoring_type > | |
NVBIO_FORCEINLINE static NVBIO_HOST_DEVICE void | update_row (context_type &context, const uint32 block, const uint32 M, const uint32 i, const uint32 N, const symbol_type r_i, const query_cache q_cache, temp_iterator temp, score_type &temp_i, score_type *band, sink_type &sink, score_type &max_score, const score_type G, const score_type I, const score_type zero, const scoring_type scoring) |
template<typename context_type , typename string_type , typename qual_type , typename ref_type , typename scoring_type , typename sink_type , typename column_type > | |
NVBIO_FORCEINLINE static NVBIO_HOST_DEVICE bool | run (const scoring_type &scoring, context_type &context, string_type query, qual_type quals, ref_type ref, const int32 min_score, sink_type &sink, const uint32 window_begin, const uint32 window_end, column_type temp) |
template<uint32 MAX_REF_LEN, typename context_type , typename string_type , typename qual_type , typename ref_type , typename scoring_type , typename sink_type > | |
NVBIO_FORCEINLINE static NVBIO_HOST_DEVICE bool | run (const scoring_type &scoring, context_type &context, string_type query, qual_type quals, ref_type ref, const int32 min_score, sink_type &sink, const uint32 window_begin, const uint32 window_end) |
|
inlinestatic |
Calculate the alignment score between a string and a reference, using the Smith-Waterman algorithm, using a templated column storage.
This function is templated over:
Furthermore, the function can be called on a window of the pattern, assuming that the context will provide the proper initialization for the first column of the corresponding DP matrix window.
context_type | the context class, implementing the following interface: struct context_type
{
// initialize the j-th column of the DP matrix
//
// \param j column index
// \param N column size
// \param column column values
// \param scoring scoring scheme
// \param zero zero value
template <typename column_type, typename scoring_type, typename score_type>
void init(
const uint32 j,
const uint32 N,
const scoring_type& scoring,
const score_type zero);
// do something with the previous column
//
// \param j column index
// \param N column size
// \param column column values
template <typename column_type>
void previous_column(
const uint32 j,
const uint32 N,
// do something with the newly computed cell
//
// \param i row index
// \param N number of rows (column size)
// \param j column index
// \param M number of columns (row size)
// \param score computed score
// \param dir direction flow
template <typename score_type>
void new_cell(
const uint32 i,
const uint32 N,
const uint32 j,
const uint32 M,
const score_type score,
const DirectionVector dir);
};
|
context | template context class, used to specialize the behavior of the aligner |
query | input pattern (horizontal string) |
quals | input pattern qualities (horizontal string) |
ref | input text (vertical string) |
scoring | scoring scheme |
min_score | minimum output score |
sink | alignment sink |
window_begin | beginning of pattern window |
window_end | end of pattern window |
|
inlinestatic |
Calculate the alignment score between a string and a reference, using the Smith-Waterman algorithm, using local memory storage for the boundary columns.
This function is templated over:
Furthermore, the function can be called on a window of the pattern, assuming that the context will provide the proper initialization for the first column of the corresponding DP matrix window.
context_type | the context class, implementing the following interface: struct context_type
{
// initialize the j-th column of the DP matrix
//
// \param j column index
// \param N column size
// \param column column values
// \param scoring scoring scheme
// \param zero zero value
template <typename column_type, typename scoring_type, typename score_type>
void init(
const uint32 j,
const uint32 N,
const scoring_type& scoring,
const score_type zero);
// do something with the previous column
//
// \param j column index
// \param N column size
// \param column column values
template <typename column_type>
void previous_column(
const uint32 j,
const uint32 N,
// do something with the newly computed cell
//
// \param i row index
// \param N number of rows (column size)
// \param j column index
// \param M number of columns (row size)
// \param score computed score
// \param dir direction flow
template <typename score_type>
void new_cell(
const uint32 i,
const uint32 N,
const uint32 j,
const uint32 M,
const score_type score,
const DirectionVector dir);
};
|
scoring | scoring scheme |
context | template context class, used to specialize the behavior of the aligner |
query | input pattern (horizontal string) |
quals | input pattern qualities (horizontal string) |
ref | input text (vertical string) |
min_score | minimum output score |
sink | alignment sink |
window_begin | beginning of pattern window |
window_end | end of pattern window |
|
inlinestatic |