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. | |
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. | |
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. | |
size_t | rows () const |
Read number of rows. | |
size_t | min_col (size_t i) const |
Minimal column of trace in a row. | |
size_t | max_col (size_t i) const |
Maximal column of trace in a row. | |
void | print_debug (std::ostream &out) const |
Static Public Member Functions | |
static seqentry_pair_t | remove_common_gaps (const SeqEntry &aliA, const SeqEntry &aliB) |
Protected Member Functions | |
TraceRange () | |
Construct empty. | |
Protected Attributes | |
std::vector< size_t > | min_col_ |
minimal column in row | |
std::vector< size_t > | max_col_ |
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 |
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 |
size_t LocARNA::TraceRange::max_col | ( | size_t | i | ) | const [inline] |
Maximal column of trace in a row.
i,: | row of matrix, 0<=i<=rows() |
size_t LocARNA::TraceRange::min_col | ( | size_t | i | ) | const [inline] |
Minimal column of trace in a row.
i,: | row of matrix, 0<=i<=rows() |
void LocARNA::TraceRange::print_debug | ( | std::ostream & | out | ) | const |
Print object to ouptut stream for debugging
out | output stream |
TraceRange::seqentry_pair_t LocARNA::TraceRange::remove_common_gaps | ( | const SeqEntry & | aliA, |
const SeqEntry & | aliB | ||
) | [static] |
Remove common gaps in pairwise alignment
aliA | alignment string A with name (SeqEntry) |
aliB | alignment string B with name (SeqEntry) |
size_t LocARNA::TraceRange::rows | ( | ) | const [inline] |
Read number of rows.
std::vector<size_t> LocARNA::TraceRange::max_col_ [protected] |
maximal column in row