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

combines the TraceController with the Mapper for both sequences More...

#include <exact_matcher.hh>

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

List of all members.

Public Types

typedef std::pair< matidx_t,
matidx_t > 
matpos_t
 a type for a position in a sparsified matrix
typedef std::pair< seqpos_t,
seqpos_t > 
pair_seqpos_t
 a type for a pair of positions in the sequences

Public Member Functions

 SparseTraceController (const SparsificationMapper &sparse_mapperA_, const SparsificationMapper &sparse_mapperB_, const TraceController &trace_controller_)
 constructor
const SparsificationMapperget_sparse_mapperA () const
 destructor
const SparsificationMapperget_sparse_mapperB () const
 returns reference to sparsification mapper for sequence B
matidx_t min_col_idx (index_t indexA, index_t indexB, matidx_t idx_i, index_t left_endB=std::numeric_limits< index_t >::max()) const
 minimal column of trace in a row in the sparsified matrix
matidx_t idx_after_max_col_idx (index_t indexA, index_t indexB, matidx_t idx_i, index_t left_endB=std::numeric_limits< index_t >::max()) const
 index after maximal column of trace in a row in the sparsified matrix
matpos_t diag_pos_bef (index_t indexA, index_t indexB, pair_seqpos_t cur_pos_seq, index_t left_endA=std::numeric_limits< index_t >::max(), index_t left_endB=std::numeric_limits< index_t >::max()) const
 computes the first valid matrix position before a sequence position considering the trace controller
pair_seqpos_t pos_in_seq (index_t idxA, index_t idxB, const matpos_t &cur_pos) const
 maps the matrix position cur_pos to the corresponding pair of positions in sequence A and B
bool matching_wo_gap (index_t idxA, index_t idxB, const matpos_t &idx_pos_diag, pair_seqpos_t seq_pos_to_be_matched) const
 is a EPM without a gap in between possible
bool pos_unpaired (index_t idxA, index_t idxB, matpos_t pos) const
 checks whether the matrix position pos can be unpaired in both sequences
bool is_valid_idx_pos (index_t idxA, index_t idxB, matpos_t mat_pos) const
 checks whether a matrix position is valid

Detailed Description

combines the TraceController with the Mapper for both sequences


Constructor & Destructor Documentation

LocARNA::SparseTraceController::SparseTraceController ( const SparsificationMapper sparse_mapperA_,
const SparsificationMapper sparse_mapperB_,
const TraceController trace_controller_ 
) [inline]

constructor

Parameters:
sparse_mapperA_sparsification mapper for sequence A
sparse_mapperB_sparsification mapper for sequence B
trace_controller_trace controller

Member Function Documentation

matpos_t LocARNA::SparseTraceController::diag_pos_bef ( index_t  indexA,
index_t  indexB,
pair_seqpos_t  cur_pos_seq,
index_t  left_endA = std::numeric_limits<index_t>::max(),
index_t  left_endB = std::numeric_limits<index_t>::max() 
) const [inline]

computes the first valid matrix position before a sequence position considering the trace controller

Parameters:
indexAindex that is used for sequence A
indexBindex that is used for sequence B
cur_pos_seqthe pair of positions in sequence A and B, respectively
left_endAset to left end of the arc in sequence A if indexing by the arcs is used default setting is the index for sequence A if indexing by the left ends is used
left_endBset to left end of the arc in sequence B if indexing by the arcs is used default setting is the index for sequence B if indexing by the left ends is used
Returns:
the first valid matrix position before the sequence position cur_pos_seq

destructor

returns reference to sparsification mapper for sequence A

matidx_t LocARNA::SparseTraceController::idx_after_max_col_idx ( index_t  indexA,
index_t  indexB,
matidx_t  idx_i,
index_t  left_endB = std::numeric_limits<index_t>::max() 
) const [inline]

index after maximal column of trace in a row in the sparsified matrix

Parameters:
indexAindex that is used for sequence A
indexBindex that is used for sequence B
idx_irow index in the sparsified matrix
left_endBset to left end of the arc in sequence B if indexing by the arcs is used default setting is the index for sequence B if indexing by the left ends is used
bool LocARNA::SparseTraceController::is_valid_idx_pos ( index_t  idxA,
index_t  idxB,
matpos_t  mat_pos 
) const [inline]

checks whether a matrix position is valid

Parameters:
idxAindex that is used for sequence A
idxBindex that is used for sequence B
mat_posa position in the condensed matrix
bool LocARNA::SparseTraceController::matching_wo_gap ( index_t  idxA,
index_t  idxB,
const matpos_t idx_pos_diag,
pair_seqpos_t  seq_pos_to_be_matched 
) const [inline]

is a EPM without a gap in between possible

returns true iff the corresponding sequence position of the position idx_pos_diag is directly left adjacent to the sequence position pair seq_pos_to_be_matched, i.e. a continuative matching in matrix LR is possible without switching to a gap matrix

Parameters:
idxAindex that is used for sequence A
idxBindex that is used for sequence B
idx_pos_diaga position in the condensed matrix
seq_pos_to_be_matcheda pair of positions in sequence A and B
matidx_t LocARNA::SparseTraceController::min_col_idx ( index_t  indexA,
index_t  indexB,
matidx_t  idx_i,
index_t  left_endB = std::numeric_limits<index_t>::max() 
) const [inline]

minimal column of trace in a row in the sparsified matrix

Parameters:
indexAindex that is used for sequence A
indexBindex that is used for sequence B
idx_irow index in the sparsified matrix
left_endBset to left end of the arc in sequence B if indexing by the arcs is used default setting is the index for sequence B if indexing by the left ends is used
pair_seqpos_t LocARNA::SparseTraceController::pos_in_seq ( index_t  idxA,
index_t  idxB,
const matpos_t cur_pos 
) const [inline]

maps the matrix position cur_pos to the corresponding pair of positions in sequence A and B

Parameters:
idxAindex that is used for sequence A
idxBindex that is used for sequence B
cur_posa pair of positions in sequence A and B
bool LocARNA::SparseTraceController::pos_unpaired ( index_t  idxA,
index_t  idxB,
matpos_t  pos 
) const [inline]

checks whether the matrix position pos can be unpaired in both sequences

Parameters:
idxAindex that is used for sequence A
idxBindex that is used for sequence B
posposition in the condensed matrix

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