LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
LocARNA::TraceController Class Reference

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

#include <trace_controller.hh>

Inheritance diagram for LocARNA::TraceController:
LocARNA::TraceRange LocARNA::MatchController LocARNA::SparseTraceController

List of all members.

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.
virtual ~TraceController ()
 Virtual destructor.
void restrict_by_anchors (const AnchorConstraints &constraints)
 Restrict by anchor constraints.
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.

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 [inline, virtual]

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.

Restrict by anchor constraints.

Limits trace ranges due to anchor constraints

Parameters:
constraintsanchor constraints
Note:
surprisingly, this filtering causes no noticable effect in standard alignment

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends