1 #ifndef LOCARNA_ANCHOR_CONSTRAINTS_HH 2 #define LOCARNA_ANCHOR_CONSTRAINTS_HH 35 typedef std::map<std::string,size_type> name_tab_t;
37 typedef std::vector<int> seq_t;
39 typedef std::vector<std::string> name_seq_t;
101 const std::vector<std::string> &seqCA,
103 const std::vector<std::string> &seqCB);
115 const std::string &seqCA,
117 const std::string &seqCB);
128 && j <= ar[i].second;
182 for (size_type i=a.size(); i>1; ) {
191 for (size_type i=0; i<a.size(); i++) {
207 transform_input(name_tab_t &nameTab,
209 const std::vector<std::string> &seq);
214 init_tables(
const name_tab_t &nameTabA,
215 const name_tab_t &nameTabB);
219 init_seq_table(seq_t & seq_tab,
220 name_seq_t & name_seq_tab,
221 const name_tab_t &nameTabA,
222 const name_tab_t &nameTabB);
228 only_dont_care(
const std::string &s);
233 #endif // LOCARNA_ANCHOR_CONSTRAINTS_HH Represents anchor constraints between two sequences.
Definition: anchor_constraints.hh:26
AnchorConstraints(size_type lenA, const std::vector< std::string > &seqCA, size_type lenB, const std::vector< std::string > &seqCB)
Construct from sequence lengths and anchor names.
Definition: anchor_constraints.cc:11
bool aligned_in_a(size_type i) const
is position i in sequence A aligned to any position in B
Definition: anchor_constraints.hh:154
std::pair< size_type, size_type > size_pair_t
size pair
Definition: anchor_constraints.hh:29
std::vector< range_t > range_seq_t
type for sequence of ranges
Definition: anchor_constraints.hh:32
Definition: aligner.cc:17
int match_to_b(size_type i) const
Definition: anchor_constraints.hh:148
int match_to_a(size_type i) const
Definition: anchor_constraints.hh:138
size_pair_t rightmost_anchor() const
return the positions (i,j) of the rightmost anchor constraint
Definition: anchor_constraints.hh:181
size_type name_size() const
returns length/size of the names
Definition: anchor_constraints.hh:174
size_pair_t leftmost_anchor() const
return the positions (i,j) of the leftmost anchor constraint
Definition: anchor_constraints.hh:190
bool allowed_edge(size_type i, size_type j) const
Definition: anchor_constraints.hh:125
size_pair_t range_t
type of range
Definition: anchor_constraints.hh:31
bool aligned_in_b(size_type j) const
is position j in sequence B aligned to any position in A
Definition: anchor_constraints.hh:160
size_t size_type
size type
Definition: anchor_constraints.hh:28
std::string get_name_b(size_type j) const
get the name of position j in B
Definition: anchor_constraints.hh:170
bool empty() const
is the constraint declaration empty
Definition: anchor_constraints.hh:178
std::string get_name_a(size_type i) const
get the name of position i in A
Definition: anchor_constraints.hh:166