Bio::T...:nexus(3pm)
π Bio::TreeIO::nexus β the tea β
okay bestie, so this is Bio::TreeIO::nexus, a TreeIO driver module for parsing Nexus tree output from PAUP. It lives in the User Contributed Perl Documentation and fr fr it's giving "I read your PAUP trees so you don't have to" π
β¨ SYNOPSIS β¨
like, the whole vibe in four lines:
use Bio::TreeIO;
my $in = Bio::TreeIO->new(-file => 't/data/cat_tre.tre');
while( my $tree = $in->next_tree ) {
}
that's it. that's the whole thing. loop over your trees, live your life π¦
πΈ DESCRIPTION πΈ
So this is a driver module for parsing PAUP Nexus tree format β which, no cap, is basically just a remapping of trees. lowkey simple, highkey useful π«Ά
π Comments π
Here's the cute part: the nexus format lets you drop node comments inside square brackets. Normally those comments (which get implemented as tags for nodes) are there to give a name to an internal node or to record the bootstrap value, but bestie, other uses are possible. sky's the limit β¨
Now β the FigTree program by Andrew Rambaut adds all these rendering parameters inside comments, and it flags those comments by starting them with &!. Iconic behaviour tbh. The parameters implemented here are:
labelcolor
that's the list. those two. periodt π
π«Ά FEEDBACK π«Ά
π 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 β genuinely, they mean it π
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. The way that there are many experienced and reponsive experts who will be able look at the problem and quickly address itβ¦ obsessed. 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-open-bio-dot-org
π§ APPENDIX π§
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (iykyk)
β new
Title : new
Args : -header => boolean default is true
print/do not print #NEXUS header
-translate => boolean default is true
print/do not print Node Id translation to a number
so like, -header is a boolean and the default is true β it controls whether you print/do not print the #NEXUS header. And -translate is a boolean too, default is true, controlling whether you print/do not print Node Id translation to a number. two little switches, both defaulting to yes π
π next_tree
Title : next_tree
Usage : my $tree = $treeio->next_tree
Function: Gets the next tree in the stream
Returns : Bio::Tree::TreeI
Args : none
gets the next tree in the stream, hands you back a Bio::Tree::TreeI, takes no args. she just delivers π
π₯ 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. in and out, no drama π«Ά
π header
Title : header
Usage : $obj->header($newval)
Function:
Example :
Returns : value of header (a scalar)
Args : on set, new value (a scalar or undef, optional)
returns the value of header (a scalar). on set, it takes the new value (a scalar or undef, optional). yes the Function and Example fields are literally empty, we're not gonna pretend otherwise π
π¦ translate_node
Title : translate_node
Usage : $obj->translate_node($newval)
Function:
Example :
Returns : value of translate_node (a scalar)
Args : on set, new value (a scalar or undef, optional)
returns the value of translate_node (a scalar). on set, new value (a scalar or undef, optional). same energy as header, different name, we love a consistent queen β¨
and that's the whole page bestie!! π no notes. this was perl v5.32.1, dated 2021-08-15, and it's part of Bio::T...:nexus(3pm) β User Contributed Perl Documentation. slay, go parse some trees πππ
π¦ 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