combines the TraceController with the Mapper for both sequences More...
#include <exact_matcher.hh>
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 SparsificationMapper & | get_sparse_mapperA () const |
| destructor | |
| const SparsificationMapper & | get_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 | |
combines the TraceController with the Mapper for both sequences
| LocARNA::SparseTraceController::SparseTraceController | ( | const SparsificationMapper & | sparse_mapperA_, |
| const SparsificationMapper & | sparse_mapperB_, | ||
| const TraceController & | trace_controller_ | ||
| ) | [inline] |
constructor
| sparse_mapperA_ | sparsification mapper for sequence A |
| sparse_mapperB_ | sparsification mapper for sequence B |
| trace_controller_ | trace controller |
| 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
| indexA | index that is used for sequence A |
| indexB | index that is used for sequence B |
| cur_pos_seq | the pair of positions in sequence A and B, respectively |
| left_endA | set 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_endB | set 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 |
| const SparsificationMapper& LocARNA::SparseTraceController::get_sparse_mapperA | ( | ) | const [inline] |
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
| indexA | index that is used for sequence A |
| indexB | index that is used for sequence B |
| idx_i | row index in the sparsified matrix |
| left_endB | set 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
| idxA | index that is used for sequence A |
| idxB | index that is used for sequence B |
| mat_pos | a 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
| idxA | index that is used for sequence A |
| idxB | index that is used for sequence B |
| idx_pos_diag | a position in the condensed matrix |
| seq_pos_to_be_matched | a 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
| indexA | index that is used for sequence A |
| indexB | index that is used for sequence B |
| idx_i | row index in the sparsified matrix |
| left_endB | set 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
| idxA | index that is used for sequence A |
| idxB | index that is used for sequence B |
| cur_pos | a 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
| idxA | index that is used for sequence A |
| idxB | index that is used for sequence B |
| pos | position in the condensed matrix |
1.7.6.1