Describes sequence and structure ensemble of an RNA. More...
#include <basepairs.hh>
Classes | |
class | LeftAdjEntry |
Entry in a left adjacency list. More... | |
class | RightAdjEntry |
Entry in a right adjacency list. More... | |
Public Types | |
typedef size_t | size_type |
size | |
typedef BasePairs__Arc | Arc |
arc | |
typedef std::vector< Arc > | arc_vec_t |
Vector of arcs. | |
typedef std::vector< LeftAdjEntry > | LeftAdjList |
type of left adjacency list | |
typedef std::vector < RightAdjEntry > | RightAdjList |
type of right adjacency list | |
typedef SparseMatrix< int > | arc_matrix_t |
type for matrix of arcs (actually arc indices) | |
typedef std::pair< size_type, size_type > | bpair_t |
type for pair of positions (base pairs) | |
typedef std::set< bpair_t > | bpair_set_t |
type for set of position pairs | |
Public Member Functions | |
BasePairs (const RnaData *rna_data, double min_prob) | |
BasePairs (size_type len, const bpair_set_t &bps) | |
Construct from a set of base pairs. | |
void | register_arc (int i, int j) |
Copy constructor. | |
const LeftAdjList & | left_adjlist (int i) const |
returns the list of arcs with right end i | |
const RightAdjList & | right_adjlist (int i) const |
returns the list of arcs with left end i | |
const Arc & | arc (int i, int j) const |
accesses basepair by (i,j) | |
const Arc & | arc (size_type idx) const |
bool | exists_arc (int i, int j) const |
returns whether basepair (i,j) exists | |
size_type | num_bps () const |
returns number of basepairs in the object | |
size_type | seqlen () const |
returns length of sequence | |
double | prob_min () const |
return minimal probability |
Describes sequence and structure ensemble of an RNA.
Stores and maintains the list of potential base pairs together with their score contributions in arc matches.
In contrast to RnaData, which stores the raw data for an RNA, a BasePairs object knows about sparsification of base pairs by a probability threshold and provides traversal of base pairs suited for alignment algorithms.
If the base pairs object is constructed from an RnaData object, it knows about its corresponding RnaData object.
LocARNA::BasePairs::BasePairs | ( | const RnaData * | rna_data, |
double | min_prob | ||
) | [inline] |
Construct from rna data
rna_data | rna data |
min_prob | minimal probability for filtering base pairs |
LocARNA::BasePairs::BasePairs | ( | size_type | len, |
const bpair_set_t & | bps | ||
) | [inline] |
Construct from a set of base pairs.
len | length of sequence |
bps | set of base pairs |
const Arc& LocARNA::BasePairs::arc | ( | size_type | idx | ) | const [inline] |
idx | an arc index |
void LocARNA::BasePairs::register_arc | ( | int | i, |
int | j | ||
) |
Copy constructor.
registers an arc (i,j)
Assignment operator registers a basepair (i,j), maintains the basepair access data structures