LocARNA-2.0.0
|
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. More... | |
void | register_arc (int i, int j) |
registers an arc (i,j) More... | |
const LeftAdjList & | left_adjlist_s (size_type i) const |
Get left adjacency list with sentinel. More... | |
const RightAdjList & | right_adjlist_s (size_type i) const |
Get right adjacency list with sentinel. More... | |
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 | ||
) |
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 | ||
) |
Construct from a set of base pairs.
len | length of sequence |
bps | set of base pairs |
idx | an arc index |
|
inline |
Get left adjacency list with sentinel.
i | position |
void LocARNA::BasePairs::register_arc | ( | int | i, |
int | j | ||
) |
registers an arc (i,j)
registers a basepair (i,j), maintains the basepair access data structures
|
inline |
Get right adjacency list with sentinel.
i | position |