[Biojava-dev] [Bug 2679] New: NEXUS parse fails on extraneous comma (TREES/TRANSLATE)

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Nov 21 10:48:59 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2679

           Summary: NEXUS parse fails on extraneous comma (TREES/TRANSLATE)
           Product: BioJava
           Version: live (CVS source)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: bio
        AssignedTo: biojava-dev at biojava.org
        ReportedBy: keesey at gmail.com


If the last item in a TRANSLATE command of a TREES node ends with a comma, the
parser fails with the following exception:

Error: org.biojava.bio.seq.io.ParseException: Found unexpected token = in TREES
block

A properly-formatted NEXUS file should not have a comma here, but there are
many files which do. The parser should see the semicolon and assume the command
is is ended.

Example TREES block (from TREEBase, accession M474):

BEGIN TREES;

[! 1 trees. TreeBASE accession#: Tree1118 ]
        TRANSLATE
                1       'Nyctereutes_procyonoides',
                2       'Urocyon_cinereoargenteus',
                3       'Pseudalopex_gymnocercus',
                4       'Chrysocyon_brachyurus',
                5       'Pseudalopex_sechurae',
                6       'Pseudalopex_culpaeus',
                7       'Pseudalopex_vetulus',
                8       'Atelocynus_microtis',
                9       'Pseudalopex_griseus',
                10      'Dusicyon_australis',
                11      'Urocyon_littoralis',
                12      'Vulpes_bengalensis',
                13      'Speothos_venaticus',
                14      'Otocyon_megalotis',
                15      'Vulpes_ferrilata',
                16      'Vulpes_rueppelli',
                17      'Canis_mesomelas',
                18      'Cerdocyon_thous',
                19      'Alopex_lagopus',
                20      'Vulpes_pallida',
                21      'Canis_simensis',
                22      'Vulpes_corsac',
                23      'Canis_latrans',
                24      'Lycaon_pictus',
                25      'Canis_adustus',
                26      'Vulpes_vulpes',
                27      'Vulpes_chama',
                28      'Vulpes_velox',
                29      'Vulpes_zerda',
                30      'Canis_aureus',
                31      'Cuon_alpinus',
                32      'Pseudalopex',
                33      'Canis_rufus',
                34      'Vulpes_cana',
                35      'Canis_lupus',
                36      'Canidae',
                37      'Canis',
        ;
        TREE 'Fig._9' =  [&R]
(((((((19,28),((22,15),(16,26))),(34,29)),(12,27,20)),(2,11)),14),((8,(((25,30),17),(23,(35,33),21)),18,4,31,(10,((6,9,3,5),7)),24,13),1));


END;


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the biojava-dev mailing list