[Biopython-dev] [Wg-phyloinformatics] BioGeography update

Nick Matzke matzke at berkeley.edu
Mon Jul 13 21:40:15 UTC 2009

Brad Chapman wrote:

> Also agreed. We should get Bio.Nexus updated enough so that is can
> handle Nick's problem files, and from there apply a wrapper to push
> Nexus trees into a generic tree compatible with PhyloXML. This will
> force us to be general about the Tree implementation, but save some
> re-writing and maintain back-compatibility. Once the generic tree
> is hammered out and everyone is happy, then we can think about
> migrating Nexus to it. Seconding Peter's comments, this is probably
> another big job.
> So, in summary, the major deliverables are:
> - Generic tree representation plus a TreeIO structure
> - PhyloXML parser that uses this tree directly
> - Nexus parser that can handle problem files and parse into the
>   generic tree. This will let us drop the lagrange duplication from
>   Nick's code.
> Sounds like you have this well worked out,
> Brad

Whoops I missed a few of these biopython-dev messages before, I have 
different filters shuttling things different places depending on the 
Subj. line.  Eric filled me in.

Here were some cases where the node labels blocked Bio.Nexus.Trees:

from Bio.Nexus import Trees

# This works

ts0 = 

to0 = Trees.Tree(ts0)
print to0

# Gymnosperms tree with node labels; doesn't work
ts1a = 


to1a = Trees.Tree(ts1a)

# Just Taxaceae; doesn't work
ts1b = 
to1b = Trees.Tree(ts1b)

# Just Taxaceae; this works; node labels deleted
ts1c = 
to1c = Trees.Tree(ts1c)

# This doesn't work (from bug report)
ts2 = "(((t9:0.385832, (t8:0.445135,t4:0.41401)C:0.024032)B:0.041436, 
t6:0.392496)A:0.0291131, t2:0.497673, ((t0:0.301171, 
t7:0.482152)E:0.0268148, ((t5:0.0984167,t3:0.488578)G:0.0349662, 
to2 = Trees.Tree(ts2)

Nicholas J. Matzke
Ph.D. Candidate, Graduate Student Researcher
Huelsenbeck Lab
Center for Theoretical Evolutionary Genomics
4151 VLSB (Valley Life Sciences Building)
Department of Integrative Biology
University of California, Berkeley

Lab websites:
Dept. personal page: 
Lab personal page: http://fisher.berkeley.edu/cteg/members/matzke.html
Lab phone: 510-643-6299
Dept. fax: 510-643-6264
Cell phone: 510-301-0179
Email: matzke at berkeley.edu

Mailing address:
Department of Integrative Biology
3060 VLSB #3140
Berkeley, CA 94720-3140

"[W]hen people thought the earth was flat, they were wrong. When people 
thought the earth was spherical, they were wrong. But if you think that 
thinking the earth is spherical is just as wrong as thinking the earth 
is flat, then your view is wronger than both of them put together."

Isaac Asimov (1989). "The Relativity of Wrong." The Skeptical Inquirer, 
14(1), 35-44. Fall 1989.

More information about the Biopython-dev mailing list