[Bioperl-l] Query on tree bootstrap values

Jason Stajich jason at bioperl.org
Fri Oct 27 16:50:54 UTC 2006


I've answered to this effect this multiple times in the past on the  
mailing list.  newick format does not distinguish between internal  
ids and bootstrap values (or whatever else you want to attach  
there).  Different programs have different conventions.  when both  
values are present and encoded so that we can parse out the  
bootstrap  like this: [BOOTSTRAP] the parser grabs it out.   If you  
know all the internal ids are boostraps you can just copy the values  
over manually very simply

for my $node ( grep { ! $_->is_Leaf } $tree->get_nodes ) { # get all  
the internal nodes
  $node->bootstrap($node->id) if defined $node->id && length($node- 
 >id); # copy id to boostrap
  $node->id(''); # set internal id to empty
}

If someone can make this clearer on a wiki page that would be great.

On Oct 27, 2006, at 4:16 AM, Sendu Bala wrote:

> Nathan S. Haigh wrote:
>> Sendu Bala wrote:
>>> Himanshu Ardawatia wrote:
>>>>
>>>> EXAMPLE TREE (Newick with bootstrap values and branch lengths) :
>>>> #################################
>>>> (
>>>>   ('Chimp'  : 0.052,
>>>>    'Human'  : 0.042) 0.71 : 0.007,
>>>>   'Gorilla'  : 0.060,
>>>>   ('Gibbon'  : 0.124,
>>>>    'Orangutan'  : 0.0971) 1 : 0.038
>>>> );
>>>> #################################
>>>>
>>> Are you sure this is in the correct format?
>>>
>>
>> He/she may have a tree that already contains bootstrap values output
>> from another program. If this is so, which program did you use?  
>> Without
>> reminding myself of the formats, you should lookup newick format and
>> whther it is possible to store bootstraps in it. In addition you  
>> should
>> also look up the nhx format.
>
> Ah, well from a brief google it seemed like some software do store
> boostrap values for internal nodes as the node ids when outputting in
> Newick format. I don't think Bioperl should be able to tell the
> difference between a normal id and a bootstrap value, so you'll  
> have to
> detect that yourself and manually use bootstrap() when you get an id
> that looks like a number.
>
> Or should Bioperl be making this assumption for you? Is that a safe
> thing to do? Maybe as an option only?
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Jason Stajich, PhD
Miller Research Fellow
University of California
Dept of Plant and Microbial Biology
321 Koshland Hall #3102
Berkeley, CA 94720-3102
lab: 510.642.8441
http://pmb.berkeley.edu/~taylor/people/js.html





More information about the Bioperl-l mailing list