[Biojava-l] A question about NexusFile and NewickTreeString

Richard Holland holland at eaglegenomics.com
Tue Dec 15 09:21:52 UTC 2009


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, huijieqiao at gmail.com wrote:

> Thanks for your reply
> 
> Yes.
> 
> But how to parse this kind of tree in BIOJava?
> 
> 
> 2009/12/15 Hilmar Lapp <hlapp at drycafe.net>
> 
>> 
>> On Dec 14, 2009, at 9:40 PM, Tiago Antão wrote:
>> 
>> On Tue, Dec 15, 2009 at 2:19 AM, huijieqiao at gmail.com
>>> <huijieqiao at gmail.com> 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  -  Biojava-l at lists.open-bio.org
> 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: holland at eaglegenomics.com
http://www.eaglegenomics.com/





More information about the Biojava-l mailing list