multovl
1.3
Multiple overlaps of genomic regions
|
#include "freeregions.hh"
Public Member Functions | |
FreeRegions (const std::vector< Region > &frees) | |
bool | fit (const Region ®) const |
const Region & | select_free_region (UniformGen &rng, unsigned int minlen) const |
A FreeRegions object holds the genomic regions within which a shuffled actual region may be placed, and can select one randomly with a probability proportional to the free region's length if asked. Free regions are those genomic regions in which it is possible to detect "peaks". For microarrays, these are regions containing probes. For ChIP-Seq or RNA-Seq, repeat-free regions into which reads can be mapped.
|
explicit |
Inits with a vector of free regions. All must be on the same chromosome of course. They should not overlap (not tested).
frees | vector of free regions |
bool multovl::prob::FreeRegions::fit | ( | const Region & | reg | ) | const |
Checks if a given region fits into one of the free regions.
reg | the region to be tested |
const Region& multovl::prob::FreeRegions::select_free_region | ( | UniformGen & | rng, |
unsigned int | minlen | ||
) | const |
Picks one of the free regions randomly with a probability corresponding to the regions' lengths
rng | A uniform random number generator |
minlen | The selected region must be at least this long (this is how we make sure a region would fit into the selected free region) |