[Biojava-l] ParseException when using interleaved Nexus file

Richard Holland holland at eaglegenomics.com
Fri Aug 7 09:57:37 UTC 2009


Thanks David. One more quick question - is this the exact file that is  
throwing the exception? I haven't tested it yet - but if I could test  
against the real file that is throwing the problem, that would help me  
find out exactly what's going wrong.

For what it's worth, the exception is normally thrown when more than  
one interleave=yes/no token is found in the header of the Data or  
Characters block, or when the interleave token appears in a line other  
than the Format line of the header.

cheers,
Richard

On 7 Aug 2009, at 10:28, David Johnson wrote:

> Hi Richard,
>
> Thanks for your mail. An example of an interleaved file can be found  
> here:
>
> http://www.molecularevolution.org/si/resources/fileformats/files/dna.nex
>
> where the link pointing to the example file is from
> http://www.molecularevolution.org/si/resources/fileformats/ and under
> the NEXUS section.
>
> The specific error message is: "org.biojava.bio.seq.io.ParseException:
> Found unexpected token interleave=yes in CHARACTERS block"
>
> So it looks like the error is thrown reading the "interleave"
> parameter in the top of the data block, and before reaching the actual
> interleaved matrix data. Full stacktrace in attached .txt.
>
> Cheers,
> -David
>
> 2009/8/7 Richard Holland <holland at eaglegenomics.com>:
>> Could you point me to an example of an interleaved file?
>>
>> And also the full stack trace of the exception that gets thrown?
>>
>> cheers,
>> Richard
>>
>> On 6 Aug 2009, at 18:03, David Johnson wrote:
>>
>>> Hi everyone,
>>>
>>> A quick question about the BioJava Nexus parser. I've been trying to
>>> use the Nexus file parser, simply by doing something like:
>>>
>>>       NexusFileBuilder builder = new NexusFileBuilder();
>>>       NexusFileFormat.parseFile(builder, f);
>>>
>>> However, when parsing Nexus files that are interleaved, I get a
>>> ParseException.
>>>
>>> Is there a way to setup the parser provided by BioJava to handle
>>> interleaved Nexus files?
>>>
>>> Thanks,
>>> -David
>>> --
>>> David Johnson
>>> School of Biological Sciences
>>> University of Reading
>>> _______________________________________________
>>> 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/
>>
>>
>
>
>
> -- 
> David Johnson
> Post-doc Research Assistant
> School of Biological Sciences
> 506, Philip Lyle Research Building
> University of Reading
> Whiteknights
> Reading, RG6 6BX
> UK
>
> Tel: +44 (0) 118 378 4415
> email: d.johnson at reading.ac.uk
> web: http://www.rdg.ac.uk/~sis07dj
> <nexusInterleavedParseException_stacktrace.txt>

--
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