[Biojava-l] A question about NexusFile and NewickTreeString
Thasso Griebel
thasso.griebel at uni-jena.de
Tue Dec 15 14:42:47 UTC 2009
Hi,
I wanted to take a look at the parser anyways, so I took the
opportunity.
As far as i see this, the newline is just a minor part of the problem.
I think the bigger issue here is parsing inner node labels. I attached
a patch that fixes the problem, at least for inner nodes with label
and inner nodes with label and weights. Wikipedia states that Newick
allows leaves without any labels, but in case of phylogenetic trees I
think one can safely ignore this, though the parser should maybe throw
an exception.
If you are interested I also updated the unit test.
hope it helps, cheers,
-thasso
On Dec 15, 2009, at 12:43 , Tiago Antão wrote:
> 2009/12/15 Richard Holland <holland at eaglegenomics.com>:
>> 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.
>
>
> Yep, will take care of this over the weekend. Maybe before, but no
> promises.
> _______________________________________________
> Biojava-l mailing list - Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TreesBlock.patch
Type: application/octet-stream
Size: 969 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biojava-l/attachments/20091215/9a37c8e8/attachment.obj>
-------------- next part --------------
More information about the Biojava-l
mailing list