[BioRuby] rails blast server
Yannick Wurm
yannick.wurm at unil.ch
Thu Sep 23 13:08:35 UTC 2010
Thanks for the feedback Frank and Trevor
While I do want something simple, something with a few extra fun features & that can be extended easily wouldn't hurt :)
Eg:
- autodetection of whether the use entered nucleotide or aminoacid sequence --> autolimited selection of what blast programs are appropriate
---> automatically populated list of available databases
- links in the results that let you fetch the original sequences of the database hits (by providing links to hits, and batch download of the database sequences).
I've never done any rails before, so its probably a good opportunity.
all the best,
yannick
On 23 Sep 2010, at 19:49, Frank Schwach wrote:
> What Trever describes is how I do it too. If this is all you want then a
> Rails app is a bit overkill because this is a very simple cgi script
> that doesn't even connect to a database.
> Basically, you just need some validation of input and then issue a
> system command (blsatall ....).
> As Trever pointed out, for larger databses this may be impractical
> because there will be no feedback until the search has completed and if
> your site is popular then many BLAST searches on a single server may
> quickly become a problem. Two possible solutions:
> 1) automatically send the results by email and just display a page
> showing that the search has been submitted. I use Perl for sending such
> messages but it should be just as easy in Ruby
> 2) use a job queueing system and run jobs in the background. The
> simplest solution is to use the Linux "batch" queue
> (http://linux.about.com/library/cmd/blcmdl1_batch.htm).
> You can just submit jobs to the queue and they are only run when system
> resources are available. Ensure that the results are written into a file
> with a unique job ID in the file name and display a results page with
> some AJAX which keeps querying for the BLAST result file (by its ID) and
> inserts it into the page as soon as it is available.
>
> Hope this helps.
>
> Frank
>
>
> On Thu, 2010-09-23 at 06:20 -0500, Trevor Wennblom wrote:
>> Hi Yannick,
>>
>> It's pretty straight-forward. Put your sequences into a blast database as usual with formatdb. Setup a page in Rails with a textarea or file upload submit form. Take the submitted text / sequence, use it to query against your blast database by saving the input to a file and running the commandline tool (such as blastn), and finally return the file containing results.
>>
>> This is assuming your queries run quickly since the page render will be delayed until blast is complete. If you need to search against a large database there's a bit more work to it.
>>
>> _______________________________________________
>> BioRuby Project - http://www.bioruby.org/
>> BioRuby mailing list
>> BioRuby at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioruby
>
>
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a
> company registered in England with number 2742969, whose registered
> office is 215 Euston Road, London, NW1 2BE.
More information about the BioRuby
mailing list