[Biopython-dev] [Fwd: Bug in Biopython Phyloxml reader]
eric.talevich at gmail.com
Thu Jun 16 02:29:18 UTC 2011
I pushed a very small fix:
It appears I misunderstood the Nexus.Trees code while I was porting
NewickIO, so there was no good reason for this behavior to be the default.
Anyway, it behaves as expected now.
Nicolas: Bio.Phylo includes a function called 'convert' which you may also
>>> Phylo.convert('foo.xml', 'phyloxml', 'bar.nwk', 'newick')
On Wed, Jun 15, 2011 at 10:20 AM, Eric Talevich <eric.talevich at gmail.com>wrote:
> Hi Nicolas and Brad,
> Thanks for reporting and forwarding this. The 0 -> 1 terminal branch
> lengths are another surprising default that crept in during the port of
> NewickIO; I don't see a problem with changing it to keep 0-length branches
> at the tips. The phyloXML parser and writer shouldn't be introducing this
> bug; it should just be occurring when writing in Newick or Nexus formats.
> I'll keep you posted on the fix, probably this weekend. If you'd like to
> try it yourself, the code to edit is in Bio/Phylo/NewickIO.py.
> On Wed, Jun 15, 2011 at 9:03 AM, Brad Chapman <chapmanb at 50mail.com> wrote:
>> Thanks for reporting the problem. The Biopython mailing lists
>> (http://biopython.org/wiki/Mailing_lists) are the right place to
>> report these types of issues.
>> Hopefully Eric or someone else on the list will be able to help.
>> Thanks again,
>> ----- Forwarded message from Nicolas Rochette <
>> nicolas.rochette at univ-lyon1.fr> -----
>> Date: Wed, 15 Jun 2011 14:25:09 +0200
>> I apologize for contacting you directly, but I could not find the
>> right place for this report. Could you please forward it ?
>> The bug is about 0-length terminal branches being given a length of 1
>> ; please find an example below.
>> Nicolas Rochette
>> PhD student
>> Laboratory for Biometry and Evolutive Biology
>> Lyon, France
>> echo '(A:2,(B:0,C:3):0,D:5);' > foo.newick
>> java -cp forester.jar org.forester.application.phyloxml_converter
>> -f=nn -i foo.newick foo.phyloxml
>> python -c 'from Bio import Phylo;
>> Phylo.write(Phylo.read("foo.phyloxml","phyloxml"), "bar.newick",
>> cat bar.newick
>> ----- End forwarded message -----
>> Biopython-dev mailing list
>> Biopython-dev at lists.open-bio.org
More information about the Biopython-dev