NAME

Bio::Phylo::Unparsers::Pagel - An object-oriented module for unparsing tree objects into Newick formatted strings.

SYNOPSIS

my $pagel = new Bio::Phylo::Unparsers::Pagel;
my $string = $pagel->unparse($tree);

DESCRIPTION

This module unparses a Bio::Phylo data structure into an input file for Discrete/Continuous/Multistate. The pagel file format (as it is interpreted here) consists of:

* first line: the number of tips, the number of characters
* subsequent lines: offspring name, parent name, branch length, character
state(s).

During unparsing, the tree is randomly resolved, and branch lengths are formatted to %f floats (i.e. integers, decimal point, integers).

METHODS

CONSTRUCTOR

new()
Type    : Constructor
Title   : new
Usage   : my $pagel = new Bio::Phylo::Unparsers::Pagel;
Function: Initializes a Bio::Phylo::Unparsers::Pagel object.
Alias   :
Returns : A Bio::Phylo::Unparsers::Pagel object.
Args    : none.

UNPARSER

to_string($tree)
Type    : Unparser
Title   : to_string($tree)
Usage   : $pagel->to_string($tree);
Function: Unparses a Bio::Phylo::Tree object into a pagel formatted string.
Returns : SCALAR
Args    : Bio::Phylo::Tree

CONTAINER

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

AUTHOR

Rutger Vos, <rvosa@sfu.ca>

BUGS

Please report any bugs or feature requests to bug-phylo@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=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.