.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Tree::RandomFactory 3pm" .TH Bio::Tree::RandomFactory 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Tree::RandomFactory \- TreeFactory for generating Random Trees .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Bio::Tree::RandomFactory \& my @taxonnames; \& my $factory = Bio::Tree::RandomFactory\->new( \-taxa => \e@taxonnames, \& \-maxcount => 10); \& \& # or for anonymous samples \& \& my $factory = Bio::Tree::RandomFactory\->new( \-num_taxa => 6, \& \-maxcount => 50); \& \& \& my $tree = $factory\->next_tree; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Builds a random tree every time next_tree is called or up to \-maxcount times. .PP This module was originally written for Coalescent simulations see Bio::PopGen::Simulation::Coalescent. I've left the next_tree method intact although it is not generating random trees in the phylogenetic sense. I would be happy for someone to provide alternative implementations which can be used here. As written it will generate random topologies but the branch lengths are built from assumptions in the coalescent and are not appropriate for phylogenetic analyses. .PP This algorithm is based on the make_tree algorithm from Richard Hudson 1990. .PP Hudson, R. R. 1990. Gene genealogies and the coalescent process. Pp. 1\-44 in D. Futuyma and J. Antonovics, eds. Oxford surveys in evolutionary biology. Vol. 7. Oxford University Press, New York .PP Sanderson, M ... .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "Mailing Lists" User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. .SS "Reporting Bugs" .IX Subsection "Reporting Bugs" Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Jason Stajich" .IX Header "AUTHOR - Jason Stajich" Email jason\-AT\-bioperl.org .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Matthew Hahn, Mike Sanderson .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 12 \& Title : new \& Usage : my $factory = Bio::Tree::RandomFactory\->new(\-samples => \e@samples, \& \-maxcount=> $N); \& Function: Initializes a Bio::Tree::RandomFactory object \& Returns : Bio::Tree::RandomFactory \& Args : \-nodetype => Type of Nodes to create [default Bio::Tree::Node] \& \-maxcount => [optional] Maximum num trees to create \& \-randtype => Type of random trees so far support \& \- yule/backward_yule/BY [default] \& \- forward_yule/FY \& \- birthdeath_forward/BDF \& \- birthdeath_backwards/BDB \& \& \& ONE of the following must be specified \& \-taxa => $arrayref of taxa names \& \-num_taxa => integer indicating number of taxa in the tree .Ve .SS "next_tree" .IX Subsection "next_tree" .Vb 6 \& Title : next_tree \& Usage : my $tree = $factory\->next_tree \& Function: Returns a random tree based on the initialized number of nodes \& NOTE: if maxcount is not specified on initialization or \& set to a valid integer, subsequent calls to next_tree will \& continue to return random trees and never return undef \& \& Returns : Bio::Tree::TreeI object \& Args : none .Ve .SS "maxcount" .IX Subsection "maxcount" .Vb 5 \& Title : maxcount \& Usage : $obj\->maxcount($newval) \& Function: \& Returns : Maxcount value \& Args : newvalue (optional) .Ve .SS "reset_tree_count" .IX Subsection "reset_tree_count" .Vb 5 \& Title : reset_tree_count \& Usage : $factory\->reset_tree_count; \& Function: Reset the tree counter \& Returns : none \& Args : none .Ve .SS "taxa" .IX Subsection "taxa" .Vb 5 \& Title : taxa \& Usage : $obj\->taxa($newval) \& Function: Set the leaf node names \& Returns : value of taxa \& Args : Arrayref of Taxon names .Ve .SS "num_taxa" .IX Subsection "num_taxa" .Vb 5 \& Title : num_taxa \& Usage : $obj\->num_taxa($newval) \& Function: Get the number of Taxa \& Returns : value of num_taxa \& Args : none .Ve .SS "random" .IX Subsection "random" .Vb 7 \& Title : random \& Usage : my $rfloat = $node\->random($size) \& Function: Generates a random number between 0 and $size \& This is abstracted so that someone can override and provide their \& own special RNG. This is expected to be a uniform RNG. \& Returns : Floating point random \& Args : $maximum size for random number (defaults to 1) .Ve .SS "random_tree_method" .IX Subsection "random_tree_method" .Vb 6 \& Title : random_tree_method \& Usage : $obj\->random_tree_method($newval) \& Function: \& Example : \& Returns : value of random_tree_method (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve .SS "nodetype" .IX Subsection "nodetype" .Vb 6 \& Title : nodetype \& Usage : $obj\->nodetype($newval) \& Function: \& Example : \& Returns : value of nodetype (a scalar) \& Args : on set, new value (a scalar or undef, optional) .Ve