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

#include "multioverlap.hh"

Inheritance diagram for multovl::MultiOverlap:
multovl::MultiRegLimit multovl::prob::ShuffleOvl

Classes

class  Counter
 

Public Types

typedef std::vector< MultiRegionmultiregvec_t
 
- Public Types inherited from multovl::MultiRegLimit
typedef std::multiset< RegLimitreglim_t
 

Public Member Functions

 MultiOverlap ()
 Init to empty.
 
 MultiOverlap (const Region &region, unsigned int trackid)
 Init to contain a region and trackid.
 
unsigned int find_overlaps (unsigned int ovlen, unsigned int minmult=1, unsigned int maxmult=0, bool intrack=true)
 
unsigned int find_unionoverlaps (unsigned int ovlen, unsigned int minmult=2, unsigned int maxmult=0)
 
const multiregvec_t & overlaps () const
 
void overlap_stats (Counter &counter) const
 
- Public Member Functions inherited from multovl::MultiRegLimit
 MultiRegLimit ()
 Init to empty.
 
 MultiRegLimit (const Region &region, unsigned int trackid)
 Init to contain a region and trackid.
 
 MultiRegLimit (const MultiRegLimit &other)
 
MultiRegLimitoperator= (const MultiRegLimit &rhs)
 
void add (const Region &region, unsigned int trackid)
 
const reglim_t & reglim () const
 
MultiRegLimitoperator+= (const MultiRegLimit &rhs)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from multovl::MultiRegLimit
reglim_t & nonconst_reglim ()
 

Detailed Description

Objects of the MultiOverlap class generate and store multiple overlaps of genomic regions. The class is derived from MultiRegLimit which is responsible for keeping track of where the ancestor regions begin or end. The MultiOverlap::find_* methods iterate along the limits and detect the overlaps.

Member Function Documentation

unsigned int multovl::MultiOverlap::find_overlaps ( unsigned int  ovlen,
unsigned int  minmult = 1,
unsigned int  maxmult = 0,
bool  intrack = true 
)

Finds multiple overlaps. Whenever the multiplicity of the overlap changes, there will be a new MultiRegion in the returned vector. For instance, the region [50,150] and the region [100, 200] will give rise to the following three multiregions: [50-99] with multiplicity 1; [100-150] with multiplicity 2 (the actual overlap part); [151-200] again with multiplicity 1.

Parameters
multiregionsthe overlaps found are appended to this vector
ovlenthe minimum overlap length (>=1) required
minmultthe minimum multiplicity required, >=1, if 0 –> solitaries also required
maxmultthe maximum multiplicity required, >=2, or if 0 –> any multiplicity accepted if /minmult/ > /maxmult/ then they are swapped silently, except when /maxmult/ == 0
intrackif /true/ (default), then overlaps within the same track are accepted
Returns
the total count of the overlaps found
unsigned int multovl::MultiOverlap::find_unionoverlaps ( unsigned int  ovlen,
unsigned int  minmult = 2,
unsigned int  maxmult = 0 
)

Finds 'unions' of overlaps. For instance, the region [50,150] and the region [100, 200] will give rise to the union region [50,200] with maximal multiplicity 2 (because in the middle the original regions overlap). The parameters and the return value have the same meaning as with /find_overlaps/. However, /minmult/ must be >=2 as it makes no sense to detect solitaries here. Also note that there is no /intrack/ parameter because I cannot understand what inter-track region unions could be good for.

void multovl::MultiOverlap::overlap_stats ( Counter counter) const

Generates some overlap statistics using the overlaps found by the last find_overlaps or find_unionoverlaps operation.

Parameters
countera Counter object with track histogram data which will be updated.
const multiregvec_t& multovl::MultiOverlap::overlaps ( ) const
inline

Returns the multiple overlaps found by the last find_overlaps or find_unionoverlaps operation.

Returns
a vector of MultiRegion objects.

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