multovl
1.3
Multiple overlaps of genomic regions
|
#include "multiregion.hh"
Public Member Functions | |
MultiRegion () | |
Init to empty (to be used by STL containers etc) | |
MultiRegion (unsigned int first, unsigned int last, const ancregset_t &ancestors=ancregset_t(), unsigned int mult=0) | |
void | add_ancestor (const AncestorRegion &anc) |
unsigned int | multiplicity () const |
const ancregset_t & | ancestors () const |
Returns the set of ancestors. | |
std::vector< int > | ancestor_trackids () const |
Return the track IDs of the ancestors in a vector. | |
bool | solitary () const |
std::string | anc_str () 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 |
Multiple regions (overlaps) which constitute the output type of the multioverlap operations. Use this for file-based "multovl" where it is important that the objects can be written to a text file.
multovl::MultiRegion::MultiRegion | ( | unsigned int | first, |
unsigned int | last, | ||
const ancregset_t & | ancestors = ancregset_t() , |
||
unsigned int | mult = 0 |
||
) |
Inits to a region between [first..last] to contain a (multi)set of regions as its "ancestry". Note that multiregions have unspecified ('.') strands and a name "overlap" by default, but these can be changed using the strand(char) and name(const std::string&) methods inherited from Region.
first | start of the multiregion |
last | end of the multiregion |
ancestors | multiset of AncestorRegion objects, empty if omitted |
mult | the maximal multiplicity of the overlap, if 0 (default) then ancestors.size() will be used. |
void multovl::MultiRegion::add_ancestor | ( | const AncestorRegion & | anc | ) |
Adds an ancestor to the calling object.
anc | the ancestor to be added. |
std::string multovl::MultiRegion::anc_str | ( | ) | const |
Returns the "ancestor std::string" which is a '|'-separated list of what AncestorRegion::to_attrstring()-formatted ancestor descriptors. Can be used e.g. als GFF attributes.
|
inline |
Returns the multiplicity of the overlap, ie. how many tracks contributed to this region. Not the same as the number of ancestors when "union overlaps" are generated.
|
inline |
Returns /true/ if this is a 'solitary' multiregion, ie. it has multiplicity()==1 and its ancestor does not overlap with anyone else