Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Jason Stajich <jason.stajich <at> gmail.com>
Subject: Re: Checking a tree input
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Wednesday 17th July 2013 20:13:52 UTC (over 3 years ago)
It depends on what format the bootstraps are stored in - are they as
internal node labels or encoded in the ID string or encoded in the length
of the branches?

Because there isn't an explicit format - there are variants of it for
newick -  you can move them automatically passing in '-bootstrap_style' =>
'traditional')  when initializating the parser.
or you can move them explicitly 

copy them from ID to boostrap slot in the objects after you have created
it.
for my $node ( grep { ! $_->is_Leaf } $tree->get_nodes ) {
 $node->bootstrap($node->id);
}

Or you can use the connivence function which does the same thing.
$tree->move_id_to_bootstrap

Presumably these internal node IDs will be empty when there is no bootstrap
so you can check them after the fact for your other use case when there are
no boostraps.

On Jul 14, 2013, at 1:45 AM, soungalo  wrote:

> Hi there,
> Does anyone know if I can do the following:
> given an input file, check whether it is a newick tree or not, and if it
is,
> check if it has bootstrap values.
> Regarding the bootstraps, I tried reading previous posts here, but I
didn't
> get it - using the TreeIO module, the $node->bootstrap method keeps
giving
> undefined values. In some trees, the bootstrap values are in the id
field.
> Can you explain how to work with bootstraps ?
> Thanks!
> 
> 
> 
> --
> View this message in context: http://bioperl.996286.n3.nabble.com/Checking-a-tree-input-tp17041.html
> Sent from the Bioperl-L mailing list archive at Nabble.com.
> _______________________________________________
> Bioperl-l mailing list
> [email protected]
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Jason Stajich
[email protected]
[email protected]
 
CD: 3ms