a class for the representation of exact pattern matches (EPM) More...
#include <exact_matcher.hh>
Classes | |
struct | compare_el_am_to_do |
struct | compare_el_pat_vec |
compare two elements of the pattern vector | |
Public Types | |
typedef BasePairs__Arc | Arc |
arc class of BasePairs | |
typedef SparsificationMapper::seq_pos_t | seqpos_t |
a type for a sequence position | |
typedef SparseTraceController::matpos_t | matpos_t |
a type for a position in a sparsified matrix | |
typedef SparsificationMapper::ArcIdx | ArcIdx |
arc index | |
typedef SparseTraceController::pair_seqpos_t | pair_seqpos_t |
pair of positions in sequence A and B | |
typedef std::pair< ArcIdx, ArcIdx > | PairArcIdx |
pair of arc indices | |
typedef std::vector< PairArcIdx > | PairArcIdxVec |
a vector of pairs of arc indices | |
typedef triple< seqpos_t, seqpos_t, char > | el_pat_vec |
typedef std::vector< el_pat_vec > | pat_vec_t |
type for pattern vector | |
Public Member Functions | |
EPM () | |
Constructor. | |
virtual | ~EPM () |
destructor | |
score_t | get_score () const |
returns the score of the EPM | |
int | get_state () const |
return the current matrix state of the EPM | |
const matpos_t & | get_cur_pos () const |
returns the current matrix position of the EPM | |
const score_t & | get_max_tol_left () const |
returns the maximal tolerance that is left for the EPM | |
bool | get_first_insertion () const |
returns whether it is the first insertion into the EPM | |
bool | is_invalid () const |
void | set_score (score_t score_) |
void | set_state (int state_) |
void | set_cur_pos (const matpos_t &cur_pos_) |
void | set_max_tol_left (score_t tol) |
void | set_first_insertion (bool first_insertion_) |
void | set_invalid () |
sets the flag invalid for the EPM | |
const PairArcIdx & | get_am (PairArcIdxVec::size_type idx) const |
PairArcIdxVec::size_type | number_of_am () |
void | clear_am_to_do () |
deletes the list am_to_do | |
PairArcIdxVec::const_iterator | am_begin () const |
PairArcIdxVec::const_iterator | am_end () const |
el_pat_vec | pat_vec_at (pat_vec_t::size_type idx) const |
pat_vec_t::size_type | pat_vec_size () const |
pat_vec_t::const_iterator | begin () const |
pat_vec_t::const_iterator | end () const |
pair_seqpos_t | last_matched_pos () |
void | add (seqpos_t posA, seqpos_t posB, char c) |
void | overwrite (seqpos_t posA, seqpos_t posB, char c, pat_vec_t::size_type pos) |
void | add_am (const Arc &a, const Arc &b) |
void | store_am (const Arc &a, const Arc &b) |
PairArcIdx | next_arcmatch () |
void | sort_patVec () |
void | sort_am_to_do () |
void | insert_epm (const EPM &epm_to_insert) |
bool | includes (const EPM &epm_to_test) const |
bool | includes_am (const EPM &epm_to_test) const |
void | print_epm (std::ostream &out, bool verbose) const |
a class for the representation of exact pattern matches (EPM)
typedef triple<seqpos_t, seqpos_t, char> LocARNA::EPM::el_pat_vec |
type for elements of the pattern vector, <position in seq A, position in sequence B, structure>
void LocARNA::EPM::add | ( | seqpos_t | posA, |
seqpos_t | posB, | ||
char | c | ||
) | [inline] |
adds an element to the pattern vector
posA | position in sequence A that is added to the pattern vector |
posB | position in sequence B that is added to the pattern vector |
c | char that specifies the match (sequential match '.', structural match '(' or ')' ) |
void LocARNA::EPM::add_am | ( | const Arc & | a, |
const Arc & | b | ||
) | [inline] |
appends an arc match to the EPM
a | arc in sequence A |
b | arc in sequence B |
PairArcIdxVec::const_iterator LocARNA::EPM::am_begin | ( | ) | const [inline] |
begin of vector that stores the pairs of arc indices that need to be computed
PairArcIdxVec::const_iterator LocARNA::EPM::am_end | ( | ) | const [inline] |
end of vector that stores the pairs of arc indices that need to be computed
pat_vec_t::const_iterator LocARNA::EPM::begin | ( | ) | const [inline] |
begin of pattern vector
pat_vec_t::const_iterator LocARNA::EPM::end | ( | ) | const [inline] |
end of pattern vector
const PairArcIdx& LocARNA::EPM::get_am | ( | PairArcIdxVec::size_type | idx | ) | const [inline] |
returns the pair of arc indices at position pos
idx | index in the PairArcIdxVec |
bool LocARNA::EPM::includes | ( | const EPM & | epm_to_test | ) | const [inline] |
bool LocARNA::EPM::includes_am | ( | const EPM & | epm_to_test | ) | const [inline] |
void LocARNA::EPM::insert_epm | ( | const EPM & | epm_to_insert | ) | [inline] |
bool LocARNA::EPM::is_invalid | ( | ) | const [inline] |
returns whether the EPM is invalid (only used in the suboptimal traceback when inexact structural matches are allowed)
pair_seqpos_t LocARNA::EPM::last_matched_pos | ( | ) | [inline] |
PairArcIdx LocARNA::EPM::next_arcmatch | ( | ) | [inline] |
returns a pair of arc indices that is processed
PairArcIdxVec::size_type LocARNA::EPM::number_of_am | ( | ) | [inline] |
returns the number of pairs of arc indices that need to be computed
void LocARNA::EPM::overwrite | ( | seqpos_t | posA, |
seqpos_t | posB, | ||
char | c, | ||
pat_vec_t::size_type | pos | ||
) | [inline] |
overwrites the element at position pos of the pattern vector
posA | position in sequence A that is added to the pattern vector |
posB | position in sequence B that is added to the pattern vector |
c | char that specifies the match (sequential match '.', structural match '(' or ')' ) |
pos | position in the pattern vector |
el_pat_vec LocARNA::EPM::pat_vec_at | ( | pat_vec_t::size_type | idx | ) | const [inline] |
returns the element of the pattern vector at position pos
idx | index |
pat_vec_t::size_type LocARNA::EPM::pat_vec_size | ( | ) | const [inline] |
return the size of the pattern vector
void LocARNA::EPM::print_epm | ( | std::ostream & | out, |
bool | verbose | ||
) | const [inline] |
prints the EPM
out | output stream object |
verbose | whether to write additional information |
void LocARNA::EPM::set_cur_pos | ( | const matpos_t & | cur_pos_ | ) | [inline] |
sets the matrix position of the EPM
cur_pos_ | matrix position |
void LocARNA::EPM::set_first_insertion | ( | bool | first_insertion_ | ) | [inline] |
sets the flag first_insertion for the EPM
first_insertion_ | whether it is the first_insertion |
void LocARNA::EPM::set_max_tol_left | ( | score_t | tol | ) | [inline] |
sets the maximal tolerance that is left for the EPM
tol | maximal tolerance |
void LocARNA::EPM::set_score | ( | score_t | score_ | ) | [inline] |
sets the score of the EPM
score_ | score |
void LocARNA::EPM::set_state | ( | int | state_ | ) | [inline] |
sets the matrix state of the EPM
state_ | matrix state |
void LocARNA::EPM::sort_am_to_do | ( | ) | [inline] |
sorts the list of arcmatches am_to_do, such that includes_am works
void LocARNA::EPM::sort_patVec | ( | ) | [inline] |
sorts the pattern vector according to the positions in the first sequence (automatically also sorted according to the positions in the second sequence)
void LocARNA::EPM::store_am | ( | const Arc & | a, |
const Arc & | b | ||
) | [inline] |
stores an arc match in the am_to_do data structure
a | arc in sequence A |
b | arc in sequence B |