[BiO BB] Re: paup output parsing

Kerr Wall pkerrwall at psu.edu
Tue Apr 13 12:19:20 EDT 2004


On 4/13/04 12:01 PM, "Ognen Duzlevski" <maketo at sdf.lonestar.org> wrote:

> Hi all,
> 
> I am trying to parse out paup output such as this one:
> tree PAUP_1 = [&U] (1:4,2:20,((3:14,5:200):17,4:13):24);
> 
> What I want is to extract the length for each one. The number after : is
> the length
> 
> For this case:
> Length of 1 will be 4
> Length of 2 will be 20
> Length of 3 will be 14+17+24=55
> Length of 5 will be 200+17+24=241
> Length of 4 will be 13+24=3
> 
> Naturally, the output gets pretty large and complicated and before I fire
> up my editor and start coding: are there any tools/scripts outhere that
> extract this information already and are available for download?
> 
> Thanks,
> Ognen

Yes.  Check out www.bioperl.org

Specifically, Bio::Tree::TreeIO, Bio::Tree::TreeI, Bio::Tree::NodeI, etc. at
http://doc.bioperl.org/releases/bioperl-1.4/

There's also a HOWTO on Phylogenetic Trees at
http://bioperl.org/HOWTOs/html/Trees.html

Kerr




More information about the BBB mailing list