[Biojava-l] BLAST/Java interface

Schreiber, Mark mark.schreiber@agresearch.co.nz
Fri, 23 Aug 2002 10:52:36 +1200


Matthew and Keith,

Might this be a case for encapsulation of some of the common parsing
tasks in a single easy to use object or tools class. Most of the time if
you want to quickly parse a blast output you don't want have to
understand the entire event driven parsing framework. Much like creating
a DNA sequence with DNATools. Most of the ugliness is handled for you
and you don't really need to know whats going on.

Is it possible to have a class that contains an internal Process object
that points to the blast binary(s) (whose path could be passed as a File
reference). This object could then take seach strings as an InputStream
and return results as an OutputStream abstracting away the need to
understand whats happening under the hood.

Just a thought.

- Mark

> -----Original Message-----
> From: Matthew Pocock [mailto:matthew_pocock@yahoo.co.uk] 
> Sent: Friday, 23 August 2002 9:12 a.m.
> To: nathan whitehouse
> Cc: biojava-l@biojava.org
> Subject: Re: [Biojava-l] BLAST/Java interface
> 
> 
> Hi Nathan,
> 
> The solution depends on wether you want to do the processing of the 
> blast report client or server side. It sounds like you are using 
> servlets. If that's the case, then you can drop biojava.jar in as a 
> dependancy in your servlets .war (in the lib directory?) and use the 
> excelent blast handeling code from CAT. There's a tutorial at 
> http://biojava.org/tutorials/blastlikeParsingCookBook/index.ht
> ml to get 
> you started. You could stream the result to the applet as an XML 
> document and then parse that client-side with a SAX handler, 
> or perhaps 
> send over serialized simple-stupid objects - presumably you have an 
> object model for blast hits in the applet portion already. If the 
> servlet is spitting out static pages, then it's relatively easy to 
> consume the blast XML and emit a well formatted web page, 
> either using 
> your own code or using XSLT.
> 
> If the parsing needs to be done in the client-side applet, then I 
> sudgest you grab the source-code version of biojava (from 
> anonymous CVS 
> - http://cvs.biojava.org/) and try pulling the xml parser package out 
> into its own small jar. It would be bad to send the whole of 
> biojava to 
> the client unless you are using webstart and have a guaranteed good 
> connection to the clients (e.g. not over the web).
> 
> I hope that gives you some ideas. There are other ways to 
> skin this cat, 
> so if none of this hits the spot, post back a slightly more detailed 
> idea of what you are doing and we may be able to give a more focussed 
> answer.
> 
> Good luck,
> Matthew
> 
> ps if you have problems with the blast parser not handeling 
> your version 
> of blast then we can work together to sort this out
> 
> nathan whitehouse wrote:
> > Hello people at BioJava,
> > 
> >   I'm modifying an existing Java applet-servlet used
> > by this lab.
> > 
> >   People want us to add BLAST to this applet.
> >   
> >   Anybody know of a good way to do this?
> > 
> >    Are there convenient BLAST libraries to call from
> > the servlet?  We've talked about calling a C or C++
> > library using the JNI.  I've looked around and it
> > seems that there's no modularized BLAST lying around
> > that would make this easy.  
> >   The simple way to do it is just call BLASTAll from
> > the shell with its arguments.  But this is a hack; I
> > want to know if there is a better way to pass objects
> > in and out of BLAST.
> > 
> >   Thanks!
> >   Nathan
> > 
> >   Nathan Whitehouse
> >   Shaulsky Lab
> >   Baylor College of Medicine
> >   Houston, Texas, USA
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com 
> _______________________________________________
> > Biojava-l mailing list  -  Biojava-l@biojava.org
> > http://biojava.org/mailman/listinfo/biojava-l
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts http://uk.my.yahoo.com
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org 
> http://biojava.org/mailman/listinfo/biojava-l
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================