[Bioperl-l] Posterior (and other values) from BEAST/treeannotator/FigTree tree nodes
Jason Stajich
jason at bioperl.org
Thu Jul 8 04:27:56 UTC 2010
Hi -
Is this just that you have internal nodes labeled with the
bootstrap/posterior value? If so you just want the node ids for the
internal nodes then. The semantics of what is encoded in the internal
nodes is not forced by the nexus format so it assumes they are ids by
default.
You can call $tree->move_id_to_bootstrap
to migrate the ids of internal nodes to the bootstrap option.
you can also use the -internal_node_id => 'bootstrap' option when
initializing TreeIO objects too:
=head2 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
-internal_node_id : what is stored in the internal node ids,
bootstrap values or ids, coded as
'bootstrap' or 'id'
-jason
Greg Baillie wrote, On 7/7/10 7:41 AM:
> Hi.
>
> I'm trying to extract information (eg. posterior values) from nodes of
> trees generated using BEAST/treeannotator/FigTree.
>
> The trees, which are in nexus format, seem to load OK, but when I
> iterate through the nodes looking for posterior values (/if (
> $node->has_tag('posterior') ) {.../), none of the nodes seem to have
> posteriors.
>
> In fact, none of the nodes have any tags (/my @tags =
> $node->get_all_tags(); print join ',', @tags/). And when I dump an
> entire tree using Data::Dumper, there is no sign of any of the node
> values.
>
> Does TreeIO handle these values? If so, should I be looking somewhere
> other than the tags for the values?
>
> Thanks.
>
> Greg.
More information about the Bioperl-l
mailing list