Hi there. I believe the code used to be able to parse this kind of tree, but TIago recently rewrote it so I'm no longer certain.
Tiago - your new code doesn't seem to be coping with the insertion of a newline at random points in the Tree string. I think you might need to modify your tokenize() method to handle this better? Could you also add a unit test using this particular tree. cheers, Richard On 15 Dec 2009, at 05:04, [email protected] wrote: > Thanks for your reply > > Yes. > > But how to parse this kind of tree in BIOJava? > > > 2009/12/15 Hilmar Lapp <[email protected]> > >> >> On Dec 14, 2009, at 9:40 PM, Tiago Antão wrote: >> >> On Tue, Dec 15, 2009 at 2:19 AM, [email protected] >>> <[email protected]> wrote: >>> >>>> Hi all, >>>> >>>> I have a NexusFile like this: >>>> >>>> #NEXUS >>>> >>>> Begin TREES; >>>> tree test1 = (1,2); >>>> tree test2 = (B:6.0,(A:5.0,C:3.0,E:4.0) >>>> Ancestor1:5.0,D:11.0); >>>> End; >>>> How can I deal with this ? >>>> >>> >>> There is a comma missing after the ) closing E:4.0) ie, >>> >>>> tree test2 = (B:6.0,(A:5.0,C:3.0,E:4.0), <-- NOTE COMMA >>>> Ancestor1:5.0,D:11.0); >>>> >>> >> Actually no. Ancestor1 is the node label of the ancestor node of A, C, and >> E. Node labels follow after a parenthesis without a comma. >> >> -hilmar >> -- >> =========================================================== >> : Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net : >> =========================================================== >> >> >> >> >> > > _______________________________________________ > Biojava-l mailing list - [email protected] > http://lists.open-bio.org/mailman/listinfo/biojava-l -- Richard Holland, BSc MBCS Operations and Delivery Director, Eagle Genomics Ltd T: +44 (0)1223 654481 ext 3 | E: [email protected] http://www.eaglegenomics.com/ _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
