Bio::TreeIO(3pm)
π Bio::TreeIO β the tree parser bestie π
Perl manual page Β· Bio::TreeIO(3pm) Β· User Contributed Perl Documentation
okay so literally welcome to Bio::TreeIO, the driver module that reads Trees π³ out of data streams and flatfiles, and it's whole goal in life is to build Bio::Tree::TreeI objects for you. no cap. π
β¨ SYNOPSIS β¨
{
use Bio::TreeIO;
my $treeio = Bio::TreeIO->new(-format => 'newick',
-file => 'globin.dnd');
while( my $tree = $treeio->next_tree ) {
print "Tree is ", $tree->number_nodes, "\n";
}
}
look at her go π¦ loop over the trees, print the node count, iconic behavior honestly.
πΈ DESCRIPTION πΈ
So this is the driver module for Tree reading from data streams and flatfiles. The whole point, the main character mission, is that it's intended to be able to create Bio::Tree::TreeI objects. periodt. π
π FEEDBACK π
π¬ Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules, fr fr. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated π«Ά
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π« Support
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it (yes that's their spelling, we keep it π). Please include a thorough description of the problem with code and data examples if at all possible.
π 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:
https://github.com/bioperl/bioperl-live/issues
π AUTHOR - Jason Stajich π
Email jason-at-bioperl-dot-org
π CONTRIBUTORS π
Allen Day <allenday@ucla.edu>
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (iykyk, underscore means it's private business π).
π± new
Title : new
Usage : my $obj = Bio::TreeIO->new();
Function: Builds a new Bio::TreeIO object
Returns : Bio::TreeIO
Args : a hash. useful keys:
-format : Specify the format of the file. Supported formats:
newick Newick tree format
nexus Nexus tree format
nhx NHX tree format
svggraph SVG graphical representation of tree
tabtree ASCII text representation of tree
lintree lintree output format
bestie you literally just hand it a hash and it builds you a fresh Bio::TreeIO object and hands it right back π the useful keys: -format lets you pick what format the file is in, and the supported formats are newick, nexus, nhx, svggraph, tabtree, and lintree. slay.
π format
Title : format
Usage : $format = $obj->format()
Function: Get the tree format
Returns : tree format
Args : none
gets you the tree format. no args needed, she just tells you. β¨
π³ next_tree
Title : next_tree
Usage : my $tree = $treeio->next_tree;
Function: Gets the next tree off the stream
Returns : Bio::Tree::TreeI or undef if no more trees
Args : none
grabs the next tree off the stream π₯ returns a Bio::Tree::TreeI, or undef if there are no more trees (sad but true, all good things end π).
ποΈ write_tree
Title : write_tree
Usage : $treeio->write_tree($tree);
Function: Writes a tree onto the stream
Returns : none
Args : Bio::Tree::TreeI
writes a tree onto the stream. takes a Bio::Tree::TreeI, returns none β she gives, she doesn't take π
π§ attach_EventHandler
Title : attach_EventHandler
Usage : $parser->attatch_EventHandler($handler)
Function: Adds an event handler to listen for events
Returns : none
Args : Bio::Event::EventHandlerI
adds an event handler to listen for events π«Ά takes a Bio::Event::EventHandlerI, returns none. (yes the usage line says attatch with two t's, we're keeping it exactly as it is, no editing the vibes π)
π _eventHandler
Title : _eventHandler
Usage : private
Function: Get the EventHandler
Returns : Bio::Event::EventHandlerI
Args : none
private, bestie, don't touch π gets you the EventHandler as a Bio::Event::EventHandlerI.
π¦ _load_format_module
Title : _load_format_module
Usage : *INTERNAL TreeIO stuff*
Function: Loads up (like use) a module at run time on demand
Example :
Returns :
Args :
internal TreeIO stuff only β loads up (like use) a module at run time on demand. that's it, that's the function.
π _guess_format
Title : _guess_format
Usage : $obj->_guess_format($filename)
Function:
Example :
Returns : guessed format of filename (lower case)
Args :
takes a filename, returns the guessed format of that filename (lower case) π detective energy fr.
and that's the whole page bestie, go parse some trees π³π
this was perl v5.32.1, dated 2021-08-15, Bio::TreeIO(3pm) β mwah, take care of her πβ¨
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms