LocARNA-1.8.11
Public Member Functions | List of all members
LocARNA::TraceController Class Reference

Controls the matrix cells valid for traces. More...

#include <trace_controller.hh>

Inheritance diagram for LocARNA::TraceController:
Inheritance graph
[legend]
Collaboration diagram for LocARNA::TraceController:
Collaboration graph
[legend]

Public Member Functions

 TraceController (const Sequence &seqA, const Sequence &seqB, const MultipleAlignment *ma, int delta, bool relaxed_merging=false)
 Constructs for the general case of alignment of alignments. More...
 
virtual ~TraceController ()
 Virtual destructor.
 
bool is_valid (size_type i, size_type j) const
 
virtual bool is_valid_match (size_type i, size_type j) const
 
size_type get_delta () const
 Read deviation. More...
 
void print_debug (std::ostream &out) const
 
- Public Member Functions inherited from LocARNA::TraceRange
 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...
 
void print_debug (std::ostream &out) const
 

Additional Inherited Members

- Public Types inherited from LocARNA::TraceRange
typedef MultipleAlignment::SeqEntry SeqEntry
 alias for MultipleAlignment::SeqEntry
 
typedef std::pair< SeqEntry, SeqEntryseqentry_pair_t
 pair of sequence entries
 
- Static Public Member Functions inherited from LocARNA::TraceRange
static seqentry_pair_t remove_common_gaps (const SeqEntry &aliA, const SeqEntry &aliB)
 
- Protected Member Functions inherited from LocARNA::TraceRange
 TraceRange ()
 Construct empty.
 
- Protected Attributes inherited from LocARNA::TraceRange
std::vector< size_t > min_col_vector_
 minimal column in row
 
std::vector< size_t > max_col_vector_
 

Detailed Description

Controls the matrix cells valid for traces.

Controls the matrix cells that need to be filled in a dynamic programming algorithm because they occur on valid traces due to the max-diff heuristic

The valid traces can be defined either unrestricted, or by a maximal difference of i and j for matrix cells (i,j) or due to a maximal difference to a given alignment (trace).

Constructor & Destructor Documentation

LocARNA::TraceController::TraceController ( const Sequence seqA,
const Sequence seqB,
const MultipleAlignment ma,
int  delta,
bool  relaxed_merging = false 
)

Constructs for the general case of alignment of alignments.

switch between strict and relaxed merging of pairwise trace ranges

Parameters
seqAsequence A
seqBsequence B
mamultiple reference alignment
deltathe allowed difference
relaxed_mergingwhether to use relaxed merging of trace ranges
Note
If delta == -1 then min_col is 1 and max_col is lenB
If delta != -1 and ma==NULL, then define min j, max j by deviation |i-(lenA/lenB)*j|<=delta
These values are chosen such that for all j between min and max, the delta constraint holds for all pairs of sequences in seqA and seqB.

Member Function Documentation

size_type LocARNA::TraceController::get_delta ( ) const
inline

Read deviation.

Returns
deviation Delta
bool LocARNA::TraceController::is_valid ( size_type  i,
size_type  j 
) const
inline

test for matrix entries on valid trace

Parameters
iposition in sequence A in 1..lenA or 0
jposition in sequence B in 1..lenB or 0
Returns
whether matrix cell (i.j) is valid
bool LocARNA::TraceController::is_valid_match ( size_type  i,
size_type  j 
) const
inlinevirtual

test for allowed matches due to valid traces

Parameters
iposition in sequence A in 1..lenA
jposition in sequence B in 1..lenB
Returns
whether i~j is an allowed match due to valid traces

Implements LocARNA::MatchController.

void LocARNA::TraceController::print_debug ( std::ostream &  out) const

print debugging information to stream

Parameters
outoutput stream

The documentation for this class was generated from the following files: