Bio::Phylo - Phylogenetic analysis using perl.
This is the base class for the Bio::Phylo package. All other modules inherit from it, the methods defined here are applicable to all. Consult the manual for usage examples: Bio::Phylo::Manual.
The Bio::Phylo object itself, and thus its constructor, is rarely, if ever, used directly. Rather, all other objects in this package inherit its methods, and call its constructor internally.
Type : Constructor Title : new Usage : my $phylo = Bio::Phylo->new; Function: Instantiates Bio::Phylo object Returns : a Bio::Phylo object Args : -name => (object name) -desc => (object description) -score => (numerical score) -generic => (generic key/value pair)
Type : Mutator Title : set_name Usage : $obj->set_name($name); Function: Assigns an object's name. Returns : Modified object. Args : Argument must be a string, single quoted if it contains [;|,|:\(|\)] or spaces.
Type : Mutator Title : set_desc Usage : $obj->set_desc($desc); Function: Assigns an object's description. Returns : Modified object. Args : Argument must be a string.
Type : Mutator Title : set_score Usage : $obj->set_score($score); Function: Assigns an object's numerical score. Returns : Modified object. Args : Argument must be any of perl's number formats.
Type : Mutator Title : set_generic Usage : $obj->set_generic(%generic); Function: Assigns generic key/value pairs to the invocant. Returns : Modified object. Args : Valid arguments constitute key/value pairs, for example: $node->set_generic( '-posterior' => 0.87565, );
Type : Accessor Title : get_name Usage : my $name = $obj->get_name; Function: Returns the object's name (if any). Returns : A string Args : None
Type : Accessor Title : get_desc Usage : my $desc = $obj->get_desc; Function: Returns the object's description (if any). Returns : A string Args : None
Type : Accessor Title : get_score Usage : my $score = $obj->get_score; Function: Returns the object's numerical score (if any). Returns : A number Args : None
Type : Accessor Title : get_generic Usage : my $value = $obj->get_generic($key); or my %hash = %{ $obj->get_generic() }; Function: Returns the object's generic data. If an argument is used, it is considered a key for which the associated value is return. Without arguments, a reference to the whole hash is returned. Returns : A string or hash reference. Args : None
Type : Accessor Title : get_id Usage : my $id = $obj->get_id; Function: Returns the object's unique ID Returns : INT Args : None
All objects in the package subclass the Bio::Phylo object, and so, for example, you can do $node->get('get_branch_length'); instead of $node->get_branch_length. This is a useful feature for listable objects especially, as they have the get_by_value method, which allows you to retrieve, for instance, a list of nodes whose branch length exceeds a certain value. That method (and get_by_regular_expression) uses this $obj->get method.
$node->get('get_branch_length');
$node->get_branch_length
$obj->get method
Type : Accessor Title : get Usage : my $treename = $tree->get('get_name'); Function: Alternative syntax for safely accessing any of the object data; useful for interpolating runtime $vars. Returns : (context dependent) Args : a SCALAR variable, e.g. $var = 'get_name';
Type : Utility method Title : clone Usage : my $clone = $object->clone; Function: Creates a copy of the invocant object. Returns : A copy of the invocant. Args : none.
Getter and setter for the verbose level. Currently it's just 0 = no messages, 1 = messages, but perhaps there could be more levels? For caller diagnostics and so on?
Type : Accessor Title : VERBOSE(0|1) Usage : Phylo->VERBOSE(0|1) Function: Sets/gets verbose level Returns : Verbose level Args : 0 = no messages; 1 = error messages Comments:
Type : Accessor Title : CITATION Usage : $phylo->CITATION; Function: Returns suggested citation. Returns : Returns suggested citation. Args : None Comments:
Type : Accessor Title : VERSION Usage : $phylo->VERSION; Function: Returns version number (including CVS revision number). Alias : Returns : SCALAR Args : NONE Comments:
Type : Format converter Title : to_cipres Usage : my $xml = $obj->to_xml; Function: Turns the invocant object into an XML string. Returns : SCALAR Args : NONE
Type : Destructor Title : DESTROY Usage : $phylo->DESTROY Function: Destroys Phylo object Alias : Returns : TRUE Args : none Comments: You don't really need this, it is called automatically when the object goes out of scope.
Also see the manual: Bio::Phylo::Manual.
CPAN hosts a discussion forum for Bio::Phylo. If you have trouble using this module the discussion forum is a good place to start posting questions (NOT bug reports, see below): http://www.cpanforum.com/dist/Bio-Phylo
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. Be sure to include the following in your request or comment, so that I know what version you're using:
bug-bio-phylo@rt.cpan.org
$Id: Phylo.pm 2188 2006-09-07 07:25:09Z rvosa $
Rutger Vos,
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 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.
To install Bio::Phylo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Phylo
CPAN shell
perl -MCPAN -e shell install Bio::Phylo
For more information on module installation, please visit the detailed CPAN module installation guide.