NVBIO
|
This module contains a series of functions to perform string alignment. The the kind of alignment performed is selected according to an Aligner.
Modules | |
Alignment Type | |
Algorithm Tags | |
Aligner Tags | |
Aligners | |
Batch Schedulers | |
Batch Alignments | |
Utilities | |
Alignment Sinks | |
AlignmentDetail | |
Namespaces | |
nvbio::aln | |
Enumerations | |
enum | nvbio::aln::DirectionVector { nvbio::aln::SUBSTITUTION = 0u, nvbio::aln::INSERTION = 1u, nvbio::aln::DELETION = 2u, nvbio::aln::SINK = 3u, nvbio::aln::INSERTION_EXT = 4u, nvbio::aln::DELETION_EXT = 8u, nvbio::aln::HMASK = 3u, nvbio::aln::EMASK = 4u, nvbio::aln::FMASK = 8u } |
enum | nvbio::aln::State { nvbio::aln::HSTATE = 0, nvbio::aln::ESTATE = 1, nvbio::aln::FSTATE = 2 } |
enum | nvbio::bowtie2::cuda::AlignmentType { nvbio::bowtie2::cuda::EndToEndAlignment = 0, nvbio::bowtie2::cuda::LocalAlignment = 1 } |
enum | nvbio::bowtie2::cuda::CostType { nvbio::bowtie2::cuda::ROUNDED_QUAL_COST = 1, nvbio::bowtie2::cuda::QUAL_COST = 2, nvbio::bowtie2::cuda::CONSTANT_COST = 3 } |
Functions | |
template<uint32 BAND_LEN, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | nvbio::aln::banded_alignment_score (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, sink_type &sink) |
template<uint32 BAND_LEN, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | nvbio::aln::banded_alignment_score (const aligner_type aligner, const pattern_string pattern, const text_string text, const int32 min_score, sink_type &sink) |
template<uint32 BAND_LEN, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE int32 | nvbio::aln::banded_alignment_score (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score) |
template<uint32 BAND_LEN, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE int32 | nvbio::aln::banded_alignment_score (const aligner_type aligner, const pattern_string pattern, const text_string text, const int32 min_score) |
template<uint32 BAND_LEN, uint32 CHECKPOINTS, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename backtracer_type , typename checkpoints_type , typename submatrix_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment < int32 > | nvbio::aln::banded_alignment_traceback (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, backtracer_type &backtracer, checkpoints_type checkpoints, submatrix_type submatrix) |
template<typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type , typename column_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | nvbio::aln::alignment_score (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, sink_type &sink, column_type column) |
template<uint32 MAX_TEXT_LEN, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename sink_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool | nvbio::aln::alignment_score (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, sink_type &sink) |
template<uint32 CHECKPOINTS, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename backtracer_type , typename checkpoints_type , typename submatrix_type , typename column_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment < int32 > | nvbio::aln::alignment_traceback (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, backtracer_type &backtracer, checkpoints_type checkpoints, submatrix_type submatrix, column_type column) |
template<uint32 MAX_PATTERN_LEN, uint32 MAX_TEXT_LEN, uint32 CHECKPOINTS, typename aligner_type , typename pattern_string , typename qual_string , typename text_string , typename backtracer_type > | |
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment < int32 > | nvbio::aln::alignment_traceback (const aligner_type aligner, const pattern_string pattern, const qual_string quals, const text_string text, const int32 min_score, backtracer_type &backtracer) |
template<AlignmentType TYPE, typename scheme_type > | |
make_aligner_dispatch< TYPE, scheme_type >::type | nvbio::bowtie2::cuda::make_aligner (const scheme_type &scheme) |
SmithWatermanScoringScheme | nvbio::bowtie2::cuda::load_scoring_scheme (const char *name, const AlignmentType type) |
A representation of the DP direction flow vectors
Enumerator | |
---|---|
SUBSTITUTION | |
INSERTION | |
DELETION | |
SINK | |
INSERTION_EXT | |
DELETION_EXT | |
HMASK | |
EMASK | |
FMASK |
Definition at line 139 of file alignment_base.h.
enum nvbio::aln::State |
A representation of the Gotoh traceback matrix states
Enumerator | |
---|---|
HSTATE | |
ESTATE | |
FSTATE |
Definition at line 154 of file alignment_base.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::aln::alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
sink_type & | sink, | ||
column_type | column | ||
) |
Compute the alignment score between a pattern and a text string with full DP alignment.
This is a low-level function, requiring all needed temporary storage to be passed from the caller. The purpose is allowing the caller to allocate such storage (possibly among kernel threads) using different strategies.
Example:
aligner_type | an Aligner algorithm |
pattern_string | a string representing the pattern. |
qual_string | an array representing the pattern qualities. |
text_string | a string representing the text. |
sink_type | an Alignment Sink. |
column_type | an array-like class defining operator[], used to represent a matrix column; the type of the matrix cells depends on the aligner, and can be obtained as typename column_storage_type<aligner_type>::type |
aligner | alignment algorithm |
pattern | pattern string |
quals | quality string |
text | text string |
min_score | threshold alignment score |
sink | output sink |
column | temporary storage for a matrix column, must be at least as large as the text |
Definition at line 65 of file alignment_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::aln::alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
sink_type & | sink | ||
) |
Compute the alignment score between a pattern and a text string with full DP alignment.
This is a high level function, allocating all necessary temporary storage in local memory. In order to size the allocations properly, the function requires compile-time knowledge of the maximum text length.
Example:
MAX_TEXT_LEN | specifies the maximum text length, used to allocate statically the necessary temporary storage. |
aligner | alignment algorithm |
pattern | pattern string |
quals | quality string |
text | text string |
min_score | threshold alignment score |
sink | output sink |
Definition at line 103 of file alignment_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment< int32 > nvbio::aln::alignment_traceback | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
backtracer_type & | backtracer, | ||
checkpoints_type | checkpoints, | ||
submatrix_type | submatrix, | ||
column_type | column | ||
) |
Backtrace an optimal alignment using a full DP algorithm.
This is a low-level function, requiring all needed temporary storage to be passed from the caller. The purpose is allowing the caller to allocate such storage (possibly among kernel threads) using different strategies.
Example:
CHECKPOINTS | number of DP rows between each checkpoint |
aligner_type | an Aligner algorithm |
pattern_string | a string representing the pattern. |
qual_string | an array representing the pattern qualities. |
text_string | a string representing the text. |
checkpoints_type | an array-like class defining operator[], used to represent a reduced DP score matrix, containing all the matrix columns whose index is a multiple of CHECKPOINTS; the type of the matrix cells depends on the aligner, and can be obtained as typename checkpoint_storage_type<aligner_type>::type; the array must contain at least text.length()*((pattern.length() + CHECKPOINTS-1)/CHECKPOINTS) entries |
submatrix_type | an array-like class defining operator[], used to represent a temporary DP flow submatrix, containing all the matrix flow cells between two checkpointed columns. the number of bits needed for the submatrix cells depends on the aligner, and can be obtained as direction_vector_traits<aligner_type>::BITS |
backtracer_type | a model of Backtracer Model. |
column_type | an array-like class defining operator[], used to represent a matrix column; the type of the matrix cells depends on the aligner, and can be obtained as typename column_storage_type<aligner_type>::type |
aligner | alignment algorithm |
pattern | pattern to be aligned |
quals | pattern quality scores |
text | text to align the pattern to |
min_score | minimum accepted score |
backtracer | backtracking delegate |
checkpoints | temporary checkpoints storage |
submatrix | temporary submatrix storage |
column | temporary storage for a matrix column, must be at least as large as the text |
Definition at line 365 of file alignment_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment< int32 > nvbio::aln::alignment_traceback | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
backtracer_type & | backtracer | ||
) |
Backtrace an optimal alignment using a full DP algorithm.
This is a high level function, allocating all necessary temporary storage in local memory. In order to size the allocations properly, the function requires compile-time knowledge of the maximum pattern and text length.
MAX_PATTERN_LEN | maximum pattern length |
MAX_TEXT_LEN | maximum text length |
CHECKPOINTS | number of DP rows between each checkpoint |
aligner_type | an Aligner algorithm |
pattern_string | a string representing the pattern. |
qual_string | an array representing the pattern qualities. |
text_string | a string representing the text. |
backtracer_type | a model of Backtracer Model. |
aligner | alignment algorithm |
pattern | pattern to be aligned |
quals | pattern quality scores |
text | text to align the pattern to |
min_score | minimum accepted score |
backtracer | backtracking delegate |
Definition at line 498 of file alignment_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::aln::banded_alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
sink_type & | sink | ||
) |
Compute the alignment score between a pattern and a text string with banded DP alignment.
BAND_LEN | size of the DP band |
aligner | alignment algorithm |
pattern | pattern string |
quals | quality string |
text | text string |
min_score | threshold alignment score |
sink | output sink |
Definition at line 58 of file banded_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool nvbio::aln::banded_alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const text_string | text, | ||
const int32 | min_score, | ||
sink_type & | sink | ||
) |
Compute the alignment score between a pattern and a text string with banded DP alignment.
BAND_LEN | size of the DP band |
aligner | alignment algorithm |
pattern | pattern string |
text | text string |
min_score | threshold alignment score |
sink | output sink |
Definition at line 92 of file banded_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE int32 nvbio::aln::banded_alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score | ||
) |
Compute the alignment score between a pattern and a text string with banded DP alignment.
BAND_LEN | size of the DP band |
aligner | alignment algorithm |
pattern | pattern string |
quals | quality string |
text | text string |
min_score | threshold alignment score |
Definition at line 126 of file banded_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE int32 nvbio::aln::banded_alignment_score | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const text_string | text, | ||
const int32 | min_score | ||
) |
Compute the alignment score between a pattern and a text string with banded DP alignment.
BAND_LEN | size of the DP band |
aligner | alignment algorithm |
pattern | pattern string |
text | text string |
min_score | threshold alignment score |
Definition at line 160 of file banded_inl.h.
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE Alignment< int32 > nvbio::aln::banded_alignment_traceback | ( | const aligner_type | aligner, |
const pattern_string | pattern, | ||
const qual_string | quals, | ||
const text_string | text, | ||
const int32 | min_score, | ||
backtracer_type & | backtracer, | ||
checkpoints_type | checkpoints, | ||
submatrix_type | submatrix | ||
) |
Backtrace an alignment using a banded DP algorithm.
BAND_LEN | size of the DP band |
CHECKPOINTS | number of DP rows between each checkpoint |
aligner_type | an Aligner algorithm |
pattern_string | a string representing the pattern. |
qual_string | an array representing the pattern qualities. |
text_string | a string representing the text. |
checkpoints_type | an array-like class defining operator[], used to represent a reduced DP score matrix, containing all the matrix columns whose index is a multiple of CHECKPOINTS; the type of the matrix cells depends on the aligner, and can be obtained as typename checkpoint_storage_type<aligner_type>::type |
submatrix_type | an array-like class defining operator[], used to represent a temporary DP flow submatrix, containing all the matrix flow cells between two checkpointed columns. the number of bits needed for the submatrix cells depends on the aligner, and can be obtained as direction_vector_traits<aligner_type>::BITS |
backtracer_type | a model of Backtracer Model. |
aligner | alignment algorithm |
pattern | pattern to be aligned |
quals | pattern quality scores |
text | text to align the pattern to |
min_score | minimum accepted score |
backtracer | backtracking delegate |
checkpoints | temporary checkpoints storage |
submatrix | temporary submatrix storage |
Definition at line 363 of file banded_inl.h.
|
inline |
load a Smith-Waterman scoring scheme from disk
Definition at line 37 of file scoring_inl.h.