LocARNA-1.8.11
Public Types | Public Member Functions | List of all members
LocARNA::SparseTraceController Class Reference

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

#include <exact_matcher.hh>

Inheritance diagram for LocARNA::SparseTraceController:
Inheritance graph
[legend]
Collaboration diagram for LocARNA::SparseTraceController:
Collaboration graph
[legend]

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 Types inherited from LocARNA::TraceRange
typedef MultipleAlignment::SeqEntry SeqEntry
 alias for MultipleAlignment::SeqEntry
 
typedef std::pair< SeqEntry, SeqEntryseqentry_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 SparsificationMapperget_sparse_mapperA () const
 destructor More...
 
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 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, 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...
 
- Public Member Functions inherited from 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. More...
 
virtual ~TraceController ()
 Virtual destructor.
 
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. More...
 
void print_debug (std::ostream &out) const
 
- Public Member Functions inherited from LocARNA::TraceRange
 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...
 
void print_debug (std::ostream &out) const
 

Additional Inherited Members

- Static Public Member Functions inherited from LocARNA::TraceRange
static seqentry_pair_t remove_common_gaps (const SeqEntry &aliA, const SeqEntry &aliB)
 
- Protected Member Functions inherited from LocARNA::TraceRange
 TraceRange ()
 Construct empty.
 
- Protected Attributes inherited from LocARNA::TraceRange
std::vector< size_t > min_col_vector_
 minimal column in row
 
std::vector< size_t > max_col_vector_
 

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

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,
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: