[Biojava-l] Rooted trees in nexus files

Richard Holland holland at eaglegenomics.com
Mon Nov 2 22:14:58 UTC 2009


The current parser that converts the original Newick tree string into  
a JGraphT does not take the root into account, and therefore it is not  
recorded anywhere in the JGraphT object. Someone would have to change  
the parser to be able to make it record the root node.

In the meantime, the JGraph library which is used for displaying  
JGraphT graphs in a visual form does include root-finding methods, so  
maybe you could investigate there to see if any of the existing  
functions might help?

cheers,
Richard

On 2 Nov 2009, at 19:36, Tiago Antão wrote:

> 2009/11/2 Richard Holland <holland at eaglegenomics.com>:
>> The graphs returned by the Nexus parser are instances that  
>> implement the
>> org.jgrapht.UndirectedGraph interface. Undirected graphs have no  
>> root.
>
>
> Yes, that is a property of the jgrapht. But it might not be the case
> of the original nexus file/tree. So, if the tree is rooted, how can
> one know the root (without doing the parsing again ourselves to
> discover it)? I note two things:
> a) The root is obviously not one taxa, but one intermediate node.
> b) Even if the tree is unrooted, it might be interesting to know the
> "root", for instance to draw the tree, in the way that is was written
> in the file.
>
> Tiago
> PS - I also added to bugzilla one but related to the parser, but that
> is different problem...

--
Richard Holland, BSc MBCS
Operations and Delivery Director, Eagle Genomics Ltd
T: +44 (0)1223 654481 ext 3 | E: holland at eaglegenomics.com
http://www.eaglegenomics.com/





More information about the Biojava-l mailing list