.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Taxonomy::Tree 3pm" .TH Bio::Taxonomy::Tree 3pm "2018-10-27" "perl v5.26.2" "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::Taxonomy::Tree \- An Organism Level Implementation of TreeI interface. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # NB: This module is deprecated. Use Bio::Taxon in combination with \& # Bio::Tree::Tree instead \& \& # like from a TreeIO \& my $treeio = Bio::TreeIO\->new(\-format => \*(Aqnewick\*(Aq, \-file => \*(Aqtreefile.dnd\*(Aq); \& my $tree = $treeio\->next_tree; \& my @nodes = $tree\->get_nodes; \& my $root = $tree\->get_root_node; \& my @leaves = $tree\->get_leaves; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object holds handles to Taxonomic Nodes which make up a tree. .SH "EXAMPLES" .IX Header "EXAMPLES" .Vb 2 \& use Bio::Species; \& use Bio::Taxonomy::Tree; \& \& my $human=Bio::Species\->new(); \& my $chimp=Bio::Species\->new(); \& my $bonobo=Bio::Species\->new(); \& \& $human\->classification(qw( sapiens Homo Hominidae \& Catarrhini Primates Eutheria \& Mammalia Euteleostomi Vertebrata \& Craniata Chordata \& Metazoa Eukaryota )); \& $chimp\->classification(qw( troglodytes Pan Hominidae \& Catarrhini Primates Eutheria \& Mammalia Euteleostomi Vertebrata \& Craniata Chordata \& Metazoa Eukaryota )); \& $bonobo\->classification(qw( paniscus Pan Hominidae \& Catarrhini Primates Eutheria \& Mammalia Euteleostomi Vertebrata \& Craniata Chordata \& Metazoa Eukaryota )); \& \& # ranks passed to $taxonomy match ranks of species \& my @ranks = (\*(Aqsuperkingdom\*(Aq,\*(Aqkingdom\*(Aq,\*(Aqphylum\*(Aq,\*(Aqsubphylum\*(Aq, \& \*(Aqno rank 1\*(Aq,\*(Aqno rank 2\*(Aq,\*(Aqclass\*(Aq,\*(Aqno rank 3\*(Aq,\*(Aqorder\*(Aq, \& \*(Aqsuborder\*(Aq,\*(Aqfamily\*(Aq,\*(Aqgenus\*(Aq,\*(Aqspecies\*(Aq); \& \& my $taxonomy=Bio::Taxonomy\->new(\-ranks => \e@ranks, \& \-method => \*(Aqtrust\*(Aq, \& \-order => \-1); \& \& \& my $tree1=Bio::Taxonomy::Tree\->new(); \& my $tree2=Bio::Taxonomy::Tree\->new(); \& \& $tree1\->make_species_branch($human,$taxonomy); \& $tree2\->make_species_branch($chimp,$taxonomy); \& \& my ($homo_sapiens)=$tree1\->get_leaves; \& \& $tree1\->splice($tree2); \& \& $tree1\->add_species($bonobo,$taxonomy); \& \& my @taxa; \& foreach my $leaf ($tree1\->get_leaves) { \& push @taxa,$leaf\->taxon; \& } \& print join(", ",@taxa)."\en"; \& \& @taxa=(); \& $tree1\->remove_branch($homo_sapiens); \& foreach my $leaf ($tree1\->get_leaves) { \& push @taxa,$leaf\->taxon; \& } \& print join(", ",@taxa)."\en"; .Ve .SH "FEEDBACK" .IX Header "FEEDBACK" See \s-1AUTHOR\s0 .SH "AUTHOR \- Dan Kortschak" .IX Header "AUTHOR - Dan Kortschak" Email kortschak@rsbs.anu.edu.au .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Mainly Jason Stajich .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 5 \& Title : new \& Usage : my $obj = Bio::Taxonomy::Tree\->new(); \& Function: Builds a new Bio::Taxonomy::Tree object \& Returns : Bio::Taxonomy::Tree \& Args : .Ve .SS "get_nodes" .IX Subsection "get_nodes" .Vb 6 \& Title : get_nodes \& Usage : my @nodes = $tree\->get_nodes() \& Function: Return list of Bio::Taxonomy::Taxon objects \& Returns : array of Bio::Taxonomy::Taxon objects \& Args : (named values) hash with one value \& order => \*(Aqb|breadth\*(Aq first order or \*(Aqd|depth\*(Aq first order .Ve .SS "get_root_node" .IX Subsection "get_root_node" .Vb 6 \& Title : get_root_node \& Usage : my $node = $tree\->get_root_node(); \& Function: Get the Top Node in the tree, in this implementation \& Trees only have one top node. \& Returns : Bio::Taxonomy::Taxon object \& Args : none .Ve .SS "set_root_node" .IX Subsection "set_root_node" .Vb 5 \& Title : set_root_node \& Usage : $tree\->set_root_node($node) \& Function: Set the Root Node for the Tree \& Returns : Bio::Taxonomy::Taxon \& Args : Bio::Taxonomy::Taxon .Ve .SS "get_leaves" .IX Subsection "get_leaves" .Vb 5 \& Title : get_leaves \& Usage : my @nodes = $tree\->get_leaves() \& Function: Return list of Bio::Taxonomy::Taxon objects \& Returns : array of Bio::Taxonomy::Taxon objects \& Args : .Ve .SS "make_species_branch" .IX Subsection "make_species_branch" .Vb 5 \& Title : make_species_branch \& Usage : @nodes = $tree\->make_species_branch($species,$taxonomy) \& Function: Return list of Bio::Taxonomy::Taxon objects based on a Bio::Species object \& Returns : array of Bio::Taxonomy::Taxon objects \& Args : Bio::Species and Bio::Taxonomy objects .Ve .SS "make_branch" .IX Subsection "make_branch" .Vb 5 \& Title : make_branch \& Usage : $tree\->make_branch($node) \& Function: Make a linear Bio::Taxonomy::Tree object from a leafish node \& Returns : \& Args : Bio::Taxonomy::Taxon object .Ve .SS "splice" .IX Subsection "splice" .Vb 5 \& Title : splice \& Usage : @nodes = $tree\->splice($tree) \& Function: Return a of Bio::Taxonomy::Tree object that is a fusion of two \& Returns : array of Bio::Taxonomy::Taxon added to tree \& Args : Bio::Taxonomy::Tree object .Ve .SS "add_species" .IX Subsection "add_species" .Vb 5 \& Title : add_species \& Usage : @nodes = $tree\->add_species($species,$taxonomy) \& Function: Return a of Bio::Taxonomy::Tree object with a new species added \& Returns : array of Bio::Taxonomy::Taxon added to tree \& Args : Bio::Species object .Ve .SS "add_branch" .IX Subsection "add_branch" .Vb 7 \& Title : add_branch \& Usage : $tree\->add_branch($node,boolean) \& Function: Return a of Bio::Taxonomy::Tree object with a new branch added \& Returns : array of Bio::Taxonomy::Taxon objects of the resulting tree \& Args : Bio::Taxonomy::Taxon object \& boolean flag to force overwrite of descendent \& (see Bio::Node\->add_Descendent) .Ve .SS "remove_branch" .IX Subsection "remove_branch" .Vb 5 \& Title : remove_branch \& Usage : $tree\->remove_branch($node) \& Function: remove a branch up to the next multifurcation \& Returns : \& Args : Bio::Taxonomy::Taxon object .Ve