[Biojava-l] Blast-xml parser
Thomas Down
td2@sanger.ac.uk
Wed, 6 Mar 2002 17:52:15 +0000
On Wed, Mar 06, 2002 at 05:07:17PM +0000, Ewan Birney wrote:
> On Wed, 6 Mar 2002, Jason Stajich wrote:
>
> > #!/usr/bin/perl -w
> > use strict;
> >
> > use Bio::SearchIO;
> > use Bio::SearchIO::Writer::HTMLResultWriter;
> >
> > my $in = new Bio::SearchIO(-format => 'blastxml',
> > -file => shift @ARGV);
> >
> > my $writer = new Bio::SearchIO::Writer::HTMLResultWriter();
> > my $out = new Bio::SearchIO(-writer => $writer);
> > $out->write_result($in->next_result);
> >
>
> <sigh>. That's lovely code. I can't believe you Java guys would really
> want to have to make that an object.
It's got.... dollar-symbols. eeeeeeeeeee! ;-)
> <grin>
> Can you beat that BioJava?
> </grin>
http://cvs.biojava.org/cgi-bin/viewcvs/viewcvs.cgi/biojava-live/demos/eventbasedparsing/Blast2HTML.java?rev=1.3&cvsroot=biojava&content-type=text/vnd.viewcvs-markup
I'm not actually going to paste it in here -- it's slightly
too long to do that sensibly. That said, most of the lines
are just defining the colours to use for different parts of
the document, etc.
Give it a whirl, anyway,
Thomas.