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::ShuffleOvl Class Reference

Class for calculating multiple overlaps repeatedly after reshuffling some of the tracks. More...

#include "shuffleovl.hh"

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

Public Member Functions

 ShuffleOvl (const std::vector< Region > &frees)
 
bool fit_into_frees (const Region &reg) const
 
bool add_randomplacer (unsigned int reglen, unsigned int trackid)
 
unsigned int shuffle (UniformGen &rng)
 
- Public Member Functions inherited from multovl::MultiOverlap
 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)
 

Additional Inherited Members

- Public Types inherited from multovl::MultiOverlap
typedef std::vector< MultiRegionmultiregvec_t
 
- Public Types inherited from multovl::MultiRegLimit
typedef std::multiset< RegLimitreglim_t
 
- Protected Member Functions inherited from multovl::MultiRegLimit
reglim_t & nonconst_reglim ()
 

Detailed Description

Class for calculating multiple overlaps repeatedly after reshuffling some of the tracks.

Constructor & Destructor Documentation

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

Init with free regions

Parameters
freesa vector of free regions into which all fixed and shufflable regions must fall

Member Function Documentation

bool multovl::prob::ShuffleOvl::add_randomplacer ( unsigned int  reglen,
unsigned int  trackid 
)

Adds the length of a "shufflable" region in a track to the internal trackid => RandomPlacer map.

Parameters
reglenthe length of the region, should be > 0
trackidthe track ID
Returns
true on success, false if reglen == 0
bool multovl::prob::ShuffleOvl::fit_into_frees ( const Region reg) const
inline

Checks whether a given region "fits" into one of the free regions (all regions must be contained in a free region). If a region does not fit, then it must not be considered for overlap shuffling. Note that the pipeline input operation takes care of this.

Parameters
regThe region to be tested
Returns
true if /reg/ fits, false otherwise.
unsigned int multovl::prob::ShuffleOvl::shuffle ( UniformGen rng)

Shuffle the "shufflable" tracks

Parameters
rnga uniform[0,1) random number generator
Returns
the new shuffle count

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