[Biojava-dev] [Biojava-l] Newick parser

Tiago Antão tiagoantao at gmail.com
Tue Nov 17 19:54:21 UTC 2009


As this was all fresh in my head, I wrote a small tutorial:

http://tiago.org/cc/2009/11/17/reading-newicknexus-phylogenetic-trees-with-biojava/

As I don't follow the biojava mailing list regularly (or bug reports),
if some bug arises on this code, feel free to send me an email to my
personal account: If I have some time to spare, I will have a look at
it.

Tiago


2009/11/17 Richard Holland <holland at eaglegenomics.com>:
> Sorry - forgot to change the filenames in the test (under the new modular system they're in a different place than in the non-modular codebase that Tiago was working from). Fixed and committed.
>
> On 17 Nov 2009, at 19:23, Andreas Prlic wrote:
>
>> Hi Richard,
>>
>> I just did an update of my checkout and it seems the -phylo unit tests
>> don't compile any more. Can you take a look?
>>
>> Thanks,
>> Andreas
>>
>> Test set: org.biojavax.bio.phylo.io.nexus.TreesBlockTest
>> -------------------------------------------------------------------------------
>> Tests run: 9, Failures: 0, Errors: 9, Skipped: 0, Time elapsed: 0.063
>> sec <<< FAILURE!
>> testSimple(org.biojavax.bio.phylo.io.nexus.TreesBlockTest)  Time
>> elapsed: 0.021 sec  <<< ERROR!
>> java.lang.NullPointerException
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.getTreeNode(TreesBlockTest.java:160)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.getTree(TreesBlockTest.java:175)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.doVertexCount(TreesBlockTest.java:139)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.testSimple(TreesBlockTest.java:63)
>>
>> testThreeOffspring(org.biojavax.bio.phylo.io.nexus.TreesBlockTest)
>> Time elapsed: 0.002 sec  <<< ERROR!
>> java.lang.NullPointerException
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.getTreeNode(TreesBlockTest.java:160)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.getTree(TreesBlockTest.java:175)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.doVertexCount(TreesBlockTest.java:139)
>>       at org.biojavax.bio.phylo.io.nexus.TreesBlockTest.testThreeOffspring(TreesBlockTest.java:70
>>
>> 2009/11/16 Richard Holland <holland at eaglegenomics.com>:
>>> Patch applied to the trunk of biojava-live. Thanks for fixing it!
>>>
>>> cheers,
>>> Richard
>>>
>>> On 15 Nov 2009, at 23:19, Tiago Antão wrote:
>>>
>>>> Hi,
>>>>
>>>> I have made the changes as discussed, the code is attached to the
>>>> bugzilla bug concerning part of the issues that were found.
>>>> A few notes:
>>>>
>>>> 1. There is a ParserException raised on TreeBlock. Tough there is a
>>>> TreeBlockParser, most of the important parsing was (and still is!)
>>>> being made on TreeBlock. I would imagine that this is not the best
>>>> design, but I did not change it.
>>>> 2. I made some test cases. Also included.
>>>> 3. I don't mind producing some documentation, in case you accept the code.
>>>> 4. I noticed a few minor bugs more (like eating spaces in the names of
>>>> nodes). But they are really minor.
>>>> 5. The API was changed, but I suppose not many people were parsing
>>>> trees. If there were people parsing trees most probably the bug on not
>>>> being able to process trees that are not binary would have been
>>>> detected as it is pretty major.
>>>>
>>>> Tiago
>>>>
>>>> --
>>>> “Pessimism of the Intellect; Optimism of the Will” -Antonio Gramsci
>>>>
>>>> _______________________________________________
>>>> 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/
>>>
>>>
>>> _______________________________________________
>>> 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/
>
>



-- 
“Pessimism of the Intellect; Optimism of the Will” -Antonio Gramsci




More information about the biojava-dev mailing list