« Return to Thread: Rooted trees in nexus files

Re: Rooted trees in nexus files

by Richard Holland-6 :: Rate this Message:

Reply to Author | View in Thread

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@...>:
>> 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@...
http://www.eaglegenomics.com/


_______________________________________________
Biojava-l mailing list  -  Biojava-l@...
http://lists.open-bio.org/mailman/listinfo/biojava-l

 « Return to Thread: Rooted trees in nexus files