[BioRuby] rails blast server

Yannick Wurm yannick.wurm at unil.ch
Thu Sep 23 17:14:39 UTC 2010


Dang I thought Rails would make AJAX stuff easier too? Or is that only if I need a database backend?
Sorry for the noob questions, I haven't done any web dev in a long time...

On 23 Sep 2010, at 20:44, Frank Schwach wrote:

> Hi Yannick,
> 
> Of course you can do this in Rails but even those additional
> requirements won't really get you started actually using Rails' features
> because you probably don't want a backend database just to hold a few
> names of FASTA files that you can BLAST against (you can either fetch
> them directly from a directory listing or a short config text file). The
> (simple) autodetection is just one relatively simple regex and to fetch
> the original sequences you will probably want to get them straight out
> of the flat (FASTA) files using BioRuby methods, so again no database.
> Anyway, I don't want to curb your enthusiasm for learning Rails, so good
> luck! :-)
> 
> Frank
> 
> 
> , so learning a new framework might reallz 
> 
> On Thu, 2010-09-23 at 20:08 +0700, Yannick Wurm wrote:
>> 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. 
>> 
> 
> 
> 
> -- 
> 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