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

#include "freeregions.hh"

Public Member Functions

 FreeRegions (const std::vector< Region > &frees)
 
bool fit (const Region &reg) const
 
const Regionselect_free_region (UniformGen &rng, unsigned int minlen) const
 

Detailed Description

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.

Constructor & Destructor Documentation

multovl::prob::FreeRegions::FreeRegions ( const std::vector< Region > &  frees)
explicit

Inits with a vector of free regions. All must be on the same chromosome of course. They should not overlap (not tested).

Parameters
freesvector of free regions

Member Function Documentation

bool multovl::prob::FreeRegions::fit ( const Region reg) const

Checks if a given region fits into one of the free regions.

Parameters
regthe region to be tested
Returns
true if /reg/ fits, false if not.
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

Parameters
rngA uniform random number generator
minlenThe selected region must be at least this long (this is how we make sure a region would fit into the selected free region)
Returns
const ref to a randomly selected free region

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