[Bioperl-l] Re: bug report Bio::TreeIO::newick

Jason Stajich jason at cgt.duhs.duke.edu
Sun Sep 19 21:56:08 EDT 2004


Jacques -
Have fixed the problem of single clade leaves ( the (e)f --> e,f  
problem).

Will also see about getting the root label back.
In the future it is best to submit bugs at  http://bugzilla.open-bio.org

We are slowly updating all the module documentation to this effect.

-jason

On Sep 19, 2004, at 9:53 PM, Jason Stajich wrote:

> ---------- Forwarded message ----------
> From: Jacques van Helden <jvanheld at scmbb.ulb.ac.be>
> Date: Wed, 15 Sep 2004 00:59:11 +0200 (MET DST)
> Subject: bug report Bio::TreeIO::newick
> To: bioperl-bugs at bioperl.org, Jason Stajich <jason at bioperl.org>
> Cc: Jacques van Helden <jvanheld at scmbb.ulb.ac.be>
>
>
> Dear Bioperl developers,
>
> I started to use your librairy Bio::Tree::TreeIO::newick, which is
> very useful for a lot of purposes, and I noticed a bug: when a branch
> of a tree has a single leaf, the output is erroneous: the leaf node
> appears as a brother of its parent.
>
> I put hereafter a sample input file, the resulting output, and a small
> perl script to demonstrate the bug. The script simply reads a file in
> newick format, and exports it in the same format. One would of course
> expect to have the same tree, which is not the case.
>
> Could you please check if this bug could be fixed ?
>
> Best regards
>
> Jacques
>
> ================ Input file ==================================
> File in.dnd :
>
> (((a,b)c)d,(e)f)r;
>
> ================ Output file ==================================
> File out.dnd:
>
> (e,f,((a,b)c)d);
>
> Notice the difference at the level of nodes e and f: in the input, e
> is a child of f, in the output, they are brothers. Please also note
> that the name of the root (r) has disappeared.
>
> ======== The test script ======================================
>
> #!/usr/bin/perl
>
> ################################################################
> ## A quick test for the Bio::TreeIO library
> ##
> ## Usage: test-tree.pl in.dnd out.dnd
>
> use Bio::TreeIO;
>
> my ($infile, $outfile) = @ARGV;
>
> unless ($infile) {
>     die "\tusage: test-tree.pl in.dnd out.dnd\n"
> }
>
> ## read input
> my $tree_input = new Bio::TreeIO(-format => "newick",
>                                  -file => $infile);
> my $tree = $tree_input->next_tree();
>
> ## Write output
> my $tree_output = new Bio::TreeIO(-format => "newick",
>                                   -file => ">".$outfile);
> $tree_output->write_tree($tree);
>
> warn "done\n";
>
>
> Jacques van Helden <jvanheld at ucmb.ulb.ac.be>
> http://www.ucmb.ulb.ac.be/~jvanheld/
> SCMB - Universite Libre de Bruxelles. Campus Plaine.
> CP 263. Boulevard du Triomphe. 1050 Bruxelles - Belgium
> Tel: +32 2 650 5466 / 650 2013 - Fax: +32 2 650 5425
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu



More information about the Bioperl-l mailing list