LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
LocARNA::TraceRange Class Reference

Represents a range of traces. More...

#include <trace_controller.hh>

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

List of all members.

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_

Detailed Description

Represents a range of traces.

Represents a range of possible traces in a dynamic programming matrix for aligning two sequences

See also:
TraceController

Constructor & Destructor Documentation

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).

Parameters:
pseqASeqEntry of sequence A
pseqBSeqEntry of sequence B
aliAalignment SeqEntry for sequence A
aliBalignment SeqEntry for sequence B
deltathe 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.

Parameters:
lenAlength of sequence A
lenBlength of sequence B
trsset of traces
deltadeviation

Member Function Documentation

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.

Parameters:
icut.first
jcut.second
trsset of trace ranges
Returns:
cost of cut (i,j) in consensus of trs
size_t LocARNA::TraceRange::max_col ( size_t  i) const [inline]

Maximal column of trace in a row.

Parameters:
i,:row of matrix, 0<=i<=rows()
Returns:
maximal valid trace cell in the row i
size_t LocARNA::TraceRange::min_col ( size_t  i) const [inline]

Minimal column of trace in a row.

Parameters:
i,:row of matrix, 0<=i<=rows()
Returns:
minimal valid trace cell in the row i
void LocARNA::TraceRange::print_debug ( std::ostream &  out) const

Print object to ouptut stream for debugging

Parameters:
outoutput stream

Remove common gaps in pairwise alignment

Parameters:
aliAalignment string A with name (SeqEntry)
aliBalignment string B with name (SeqEntry)
Returns:
pair of "sequence entries" that represent the pairwise alignment given by aliA and aliB where gap-only columns are removed
size_t LocARNA::TraceRange::rows ( ) const [inline]

Read number of rows.

Returns:
length of seqA, i.e. the maximal row of the trace

Member Data Documentation

std::vector<size_t> LocARNA::TraceRange::max_col_ [protected]

maximal column in row


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