LocARNA-2.0.0
|
Represents a range of traces. More...
#include <trace_controller.hh>
Public Types | |
typedef MultipleAlignment::SeqEntry | SeqEntry |
alias for MultipleAlignment::SeqEntry | |
typedef std::pair< SeqEntry, SeqEntry > | seqentry_pair_t |
pair of sequence entries | |
Public Member Functions | |
TraceRange (const SeqEntry &pseqA, const SeqEntry &pseqB, const SeqEntry &aliA, const SeqEntry &aliB, size_type delta) | |
Construct from pair of alignment strings. More... | |
TraceRange (size_type lenA, size_type lenB, const std::vector< TraceRange > &trs, size_type delta) | |
Construct as consensus trace range from a set of traces. More... | |
size_type | consensus_cost (size_type i, size_type j, const std::vector< TraceRange > &trs) const |
Computes cost of a cut in the consensus trace of a trace range set. More... | |
size_t | rows () const |
Read number of rows. More... | |
size_t | min_col (size_t i) const |
Minimal column of trace in a row. More... | |
size_t | max_col (size_t i) const |
Maximal column of trace in a row. More... | |
TraceRange | reverse () const |
Ranges for reversed sequences. More... | |
void | print_debug (std::ostream &out=std::cerr) const |
Static Public Member Functions | |
static seqentry_pair_t | remove_common_gaps (const SeqEntry &aliA, const SeqEntry &aliB) |
Protected Types | |
using | idx_vec_t = std::vector< size_t > |
Protected Member Functions | |
TraceRange (size_t lenA, size_t lenB) | |
Construct "empty". More... | |
Protected Attributes | |
size_t | lenA_ |
length of sequence A | |
size_t | lenB_ |
length of sequence B | |
idx_vec_t | min_col_ |
minimal column in row | |
idx_vec_t | max_col_ |
maximal column in row | |
Represents a range of traces.
Represents a range of possible traces in a dynamic programming matrix for aligning two sequences
LocARNA::TraceRange::TraceRange | ( | const SeqEntry & | pseqA, |
const SeqEntry & | pseqB, | ||
const SeqEntry & | aliA, | ||
const SeqEntry & | aliB, | ||
size_type | delta | ||
) |
Construct from pair of alignment strings.
construct trace range of two sequences given two alignment strings of the sequences and the allowed deviation delta the sequences can contain gaps themselves (which happens, when sequences orignate from a sequence profile).
pseqA | SeqEntry of sequence A |
pseqB | SeqEntry of sequence B |
aliA | alignment SeqEntry for sequence A |
aliB | alignment SeqEntry for sequence B |
delta | the allowed deviation |
side conditions: remove_gaps(seqA) == remove_gaps(aliA) && remove_gaps(seqB) == remove_gaps(aliB) where remove_gaps is a function that removes all gap symbols length(aliA)==length(aliB)
LocARNA::TraceRange::TraceRange | ( | size_type | lenA, |
size_type | lenB, | ||
const std::vector< TraceRange > & | trs, | ||
size_type | delta | ||
) |
Construct as consensus trace range from a set of traces.
Constructs object as consensus trace ranges of the traces trs. The construction follows an idea of relaxing the deviation constraints by computing a trace with minimal accumulated distance to all traces and then determining its delta environment.
lenA | length of sequence A |
lenB | length of sequence B |
trs | set of traces |
delta | deviation |
|
inlineprotected |
Construct "empty".
only sets lengths
size_type LocARNA::TraceRange::consensus_cost | ( | size_type | i, |
size_type | j, | ||
const std::vector< TraceRange > & | trs | ||
) | const |
Computes cost of a cut in the consensus trace of a trace range set.
i | cut.first |
j | cut.second |
trs | set of trace ranges |
|
inline |
Maximal column of trace in a row.
i | row of matrix, 0<=i<=rows() |
|
inline |
Minimal column of trace in a row.
i | row of matrix, 0<=i<=rows() |
void LocARNA::TraceRange::print_debug | ( | std::ostream & | out = std::cerr | ) | const |
Print object to ouptut stream for debugging
out | output stream |
|
static |
Remove common gaps in pairwise alignment
aliA | alignment string A with name (SeqEntry) |
aliB | alignment string B with name (SeqEntry) |
TraceRange LocARNA::TraceRange::reverse | ( | ) | const |
Ranges for reversed sequences.
|
inline |
Read number of rows.