LocARNA-2.0.0
|
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 | |
![]() | |
typedef MultipleAlignment::SeqEntry | SeqEntry |
alias for MultipleAlignment::SeqEntry | |
typedef std::pair< SeqEntry, SeqEntry > | seqentry_pair_t |
pair of sequence entries | |
Public Member Functions | |
SparseTraceController (const SparsificationMapper &sparse_mapperA_, const SparsificationMapper &sparse_mapperB_, const TraceController &trace_controller_) | |
constructor More... | |
const SparsificationMapper & | get_sparse_mapperA () const |
destructor More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
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 More... | |
bool | is_valid_idx_pos (index_t idxA, index_t idxB, matpos_t mat_pos) const |
checks whether a matrix position is valid More... | |
![]() | |
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. | |
void | restrict_by_anchors (const AnchorConstraints &constraints) |
Restrict by anchor constraints. More... | |
void | restrict_by_trace_probabilities (const TraceProbs &trace_probs, double min_prob) |
Restrict by anchor constraints. More... | |
TraceController | reverse () const |
Controller for the reversed sequences. More... | |
bool | is_valid (size_type i, size_type j) const |
Is (i,j) a valid cell of the DP matrices (i.e. on some possible trace)? More... | |
virtual bool | is_valid_match (size_type i, size_type j) const |
size_type | get_delta () const |
Read deviation. More... | |
![]() | |
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... | |
TraceRange | reverse () const |
Ranges for reversed sequences. More... | |
void | print_debug (std::ostream &out=std::cerr) const |
Additional Inherited Members | |
![]() | |
static seqentry_pair_t | remove_common_gaps (const SeqEntry &aliA, const SeqEntry &aliB) |
![]() | |
using | idx_vec_t = std::vector< size_t > |
![]() | |
TraceRange (size_t lenA, size_t lenB) | |
Construct "empty". More... | |
![]() | |
size_t | lenA_ |
length of sequence A | |
size_t | lenB_ |
length of sequence B | |
idx_vec_t | min_col_ |
minimal column in row | |
idx_vec_t | max_col_ |
maximal column in row | |
combines the TraceController with the Mapper for both sequences
|
inline |
constructor
sparse_mapperA_ | sparsification mapper for sequence A |
sparse_mapperB_ | sparsification mapper for sequence B |
trace_controller_ | trace controller |
|
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 |
|
inline |
destructor
returns reference to sparsification mapper for sequence A
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |