multovl
1.3
Multiple overlaps of genomic regions
|
AncestorRegion objects represent the regions that give rise to overlaps. They are essentially Region-s, with the additional track ID attribute (an uint) that indicates which track they belong to. Track IDs are assigned by client programs and may indirectly refer to files or database objects. More...
#include "ancregion.hh"
Public Member Functions | |
AncestorRegion () | |
Init to empty. | |
AncestorRegion (const Region ®ion, unsigned int trackid=0) | |
Init with base class /region/ and /trackid/ (default 0) | |
AncestorRegion (unsigned int f, unsigned int l, char s, const std::string &nm, unsigned int trackid=0) | |
const unsigned int & | track_id () const |
Returns the current track ID. | |
unsigned int | track_id (unsigned int trackid) |
Sets the track ID to /trackid/. Returns old track ID. | |
bool | operator== (const AncestorRegion &rhs) const |
Equality. All fields must be equal. | |
bool | operator< (const AncestorRegion &rhs) const |
std::string | to_attrstring () const |
![]() | |
Region () | |
Inits to empty (makes sense when using as input buffer) | |
Region (unsigned int f, unsigned int l, char s, const std::string &nm) | |
virtual | ~Region () |
empty virtual dtor | |
void | set_coords (unsigned int f, unsigned int l) |
void | strand (char s) |
Sets the strand. | |
std::string | name (const std::string &nm) |
const unsigned int & | first () const |
Returns the first coordinate. | |
const unsigned int & | last () const |
Returns the last coordinate. | |
const unsigned int & | length () const |
Returns the length. | |
bool | is_empty () const |
Zero-length regions are considered empty. | |
const char & | strand () const |
Returns the strand information. | |
const std::string & | name () const |
Returns the name of the region. | |
bool | equal_pos (const Region &rhs) const |
bool | operator== (const Region &rhs) const |
bool | operator< (const Region &rhs) const |
Friends | |
class | boost::serialization::access |
AncestorRegion objects represent the regions that give rise to overlaps. They are essentially Region-s, with the additional track ID attribute (an uint) that indicates which track they belong to. Track IDs are assigned by client programs and may indirectly refer to files or database objects.
|
inline |
Inits to contain the genomic region with positions [f..l], strand /s/, name /nm/, track ID /trackid/.
bool multovl::AncestorRegion::operator< | ( | const AncestorRegion & | rhs | ) | const |
Ordering. Sorted on the track ID, then on the coordinates and the name (lexicographically).
std::string multovl::AncestorRegion::to_attrstring | ( | ) | const |
Makes a string that describes the ancestor region so that it can be put in a GFF-style ANCESTORS attribute when Multovl prints the overlaps. The format is "<trackid>:<name>:<strand>:<first>-<last>"