[Biojava-l] BLAST/Java interface

Matthew Pocock matthew_pocock@yahoo.co.uk
Thu, 22 Aug 2002 22:12:23 +0100


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