multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Friends | List of all members
multovl::MultiRegion Class Reference

#include "multiregion.hh"

Inheritance diagram for multovl::MultiRegion:
multovl::Region

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_tancestors () 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
 
- Public Member Functions inherited from multovl::Region
 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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
firststart of the multiregion
lastend of the multiregion
ancestorsmultiset of AncestorRegion objects, empty if omitted
multthe maximal multiplicity of the overlap, if 0 (default) then ancestors.size() will be used.

Member Function Documentation

void multovl::MultiRegion::add_ancestor ( const AncestorRegion anc)

Adds an ancestor to the calling object.

Parameters
ancthe 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.

unsigned int multovl::MultiRegion::multiplicity ( ) const
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.

bool multovl::MultiRegion::solitary ( ) const
inline

Returns /true/ if this is a 'solitary' multiregion, ie. it has multiplicity()==1 and its ancestor does not overlap with anyone else


The documentation for this class was generated from the following file: