[Biojava-l] SAX2 support for Fasta

Keith James kdj@sanger.ac.uk
04 May 2001 14:10:40 +0100


Inspired by the bootcamp, I've added a SAX2 event emitter for Fasta
searches. This may be used in the same way as the others. It's backed
by the same Fasta parser as the
org.biojava.bio.program.search.FastaSearchBuilder, i.e. uses 'm 10'
output.

Thanks to the CAT team for making implementing this a relatively
painless task for an XML novice.

There's a Fasta2XML demo in demos/eventbasedparsing which I used to
generate an XML file. I verified this against the DTD using Xerces and
it's fine, apart from the biojava:HitId elements having whitespace in
them:

[Error] foo.xml:835:26: The content of element type "biojava:HitId"
must match "EMPTY"

It think this is just the SimpleXMLEmitter not calling the
writeEmptyElement() methods. The Blast XML output has the same symptom.

Documentation is on the way...

-- 

-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA