NAME

Bio::Phylo::Generator - An object-oriented module for generating random objects (phylogenetic trees, nodes).

SYNOPSIS

use Bio::Phylo::Generator;
my $random = new Bio::Phylo::Generator;

DESCRIPTION

The generator module is used to simulate trees under the Yule, Hey, or equiprobable model.

METHODS

CONSTRUCTOR

new()
Type    : Constructor
Title   : new
Usage   : my $gen = new Bio::Phylo::Generator;
Function: Initializes a Bio::Phylo::Generator object.
Returns : A Bio::Phylo::Generator object.
Args    : none.

GENERATOR

gen_rand_pure_birth(%options)

This method generates a Bio::Phylo::Trees object populated with Yule/Hey trees.

Type    : Generator
Title   : gen_rand_pure_birth
Usage   : $gen->gen_rand_pure_birth(-tips => 10, -model => 'yule');
Function: Generates markov tree shapes, with branch lengths sampled from
          a user defined model of clade growth, for a user defined
          number of tips.
Returns : A Bio::Phylo::Trees object.
Args    : -tips = number of terminal nodes,
          -model = either 'yule' or 'hey',
          -trees = number of trees to generate
gen_exp_pure_birth(%options)

This method generates a Bio::Phylo::Trees object populated with Yule/Hey trees whose branch lengths are proportional to the expected waiting times (i.e. not sampled from a distribution).

Type    : Generator
Title   : gen_exp_pure_birth
Usage   : $gen->gen_exp_pure_birth(-tips => 10, -model => 'yule');
Function: Generates markov tree shapes, with branch lengths following the
          expectation under a user defined model of clade growth, for a
          user defined number of tips.
Returns : A Bio::Phylo::Trees object.
Args    : -tips = number of terminal nodes,
          -model = either 'yule' or 'hey'
          -trees = number of trees to generate
gen_equiprobable(%options)

This method draws tree shapes at random, such that all shapes are equally probable.

Type    : Generator
Title   : gen_equiprobable
Usage   : $gen->gen_equiprobable(-tips => 10, -trees => 5);
Function: Generates an equiprobable tree shape, with branch lengths = 1;
Returns : A Bio::Phylo::Trees object.
Args    : -tips = number of terminal nodes,
          -trees = number of trees to generate

CONTAINER

container
Type    : Internal method
Title   : container
Usage   : $generator->container;
Function:
Returns : SCALAR
Args    :
container_type
Type    : Internal method
Title   : container_type
Usage   : $generator->container_type;
Function:
Returns : SCALAR
Args    :

AUTHOR

Rutger Vos, <rvosa@sfu.ca> http://www.sfu.ca/~rvosa/

BUGS

Please report any bugs or feature requests to bug-bio-phylo@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-Phylo. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

The author would like to thank Jason Stajich for many ideas borrowed from BioPerl http://www.bioperl.org, and CIPRES http://www.phylo.org and FAB* http://www.sfu.ca/~fabstar for comments and requests.

COPYRIGHT & LICENSE

Copyright 2005 Rutger Vos, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.