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

#include "probpipeline.hh"

Inheritance diagram for multovl::prob::ProbPipeline:
multovl::BasePipeline multovl::prob::ParProbPipeline

Classes

class  OvlenCounter
 

Public Member Functions

 ProbPipeline (int argc, char *argv[])
 
- Public Member Functions inherited from multovl::BasePipeline
 BasePipeline ()
 Default init of a BasePipeline object.
 
bool run ()
 
const Errorserrors () const
 

Protected Types

typedef std::map< std::string,
ShuffleOvl
chrom_shufovl_map
 There is one ShuffleOvl object for each chromosome.
 
- Protected Types inherited from multovl::BasePipeline
typedef std::vector< Inputinput_seq_t
 

Protected Member Functions

 ProbPipeline ()
 
virtual unsigned int read_input ()
 
virtual unsigned int detect_overlaps ()
 
unsigned int calc_actual_overlaps ()
 
virtual bool write_output ()
 
virtual ProbOptsopt_ptr ()
 
const chrom_shufovl_mapcsovl () const
 
chrom_shufovl_mapcsovl ()
 
const Statstat () const
 
virtual Statstat ()
 
- Protected Member Functions inherited from multovl::BasePipeline
bool set_optpimpl (MultovlOptbase *optp)
 
MultovlOptbaseopt_pimpl ()
 
const input_seq_t & inputs () const
 
input_seq_t & inputs ()
 
void add_error (const std::string &prefix, const std::string &what)
 Adds an error message.
 
void add_all_errors (const Errors &other)
 
void add_warning (const std::string &prefix, const std::string &what)
 Adds a warning message.
 
void clear_errors ()
 Clears the errors.
 

Detailed Description

The ProbPipeline implements the MULTOVL probability pipeline. The inputs are files (text or binary), the overlap calculations are serial/single core, which are repeated after reshuffling (some) tracks to estimate the probability of overlaps by chance.

Constructor & Destructor Documentation

multovl::prob::ProbPipeline::ProbPipeline ( int  argc,
char *  argv[] 
)

Inits the pipeline with the command-line arguments. These will be parsed inside and the program exits with an error message if parsing goes wrong.

multovl::prob::ProbPipeline::ProbPipeline ( )
protected

Default ctor that does not set the option processing object used by ParProbPipeline ctor only

Member Function Documentation

unsigned int multovl::prob::ProbPipeline::calc_actual_overlaps ( )
protected

Calculates the actual overlaps using the original input tracks without reshuffling.

Returns
the number of actual overlaps
const chrom_shufovl_map& multovl::prob::ProbPipeline::csovl ( ) const
inlineprotected
Returns
const access to the chrom => ShuffleOvl map
chrom_shufovl_map& multovl::prob::ProbPipeline::csovl ( )
inlineprotected
Returns
access to the chrom => ShuffleOvl map
virtual unsigned int multovl::prob::ProbPipeline::detect_overlaps ( )
protectedvirtual

Detects overlaps. First the overlaps without shuffling are calculated, see calc_actual_overlaps(). Then the shufflable tracks are permuted and the number of overlaps counted again and again which will provide an estimate of the null distribution (ie. the extent of overlaps by chance).

Returns
the total number of overlaps found in the unpermuted case.

Implements multovl::BasePipeline.

Reimplemented in multovl::prob::ParProbPipeline.

virtual ProbOpts* multovl::prob::ProbPipeline::opt_ptr ( )
inlineprotectedvirtual
Returns
access to the option-handling object

Implements multovl::BasePipeline.

Reimplemented in multovl::prob::ParProbPipeline.

virtual unsigned int multovl::prob::ProbPipeline::read_input ( )
protectedvirtual

Reads the input tracks. In addition to the "shufflable" tracks specified as positional arguments, a track containing free regions must also be read. All regions must fall within these free regions. Optionally, a set of "fixed" tracks may be defined which won't be shuffled; they are also read here.

Returns
the total number of tracks successfully read, 0 on error.

Implements multovl::BasePipeline.

const Stat& multovl::prob::ProbPipeline::stat ( ) const
inlineprotected
Returns
const access to the statistics collector object
virtual Stat& multovl::prob::ProbPipeline::stat ( )
inlineprotectedvirtual
Returns
access to the statistics collector object

Reimplemented in multovl::prob::ParProbPipeline.

virtual bool multovl::prob::ProbPipeline::write_output ( )
protectedvirtual

Writes the results to standard output. Only the statistics are printed.

Returns
true

Implements multovl::BasePipeline.


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