[BioRuby] Rake

Yannick Wurm yannick.wurm at unil.ch
Fri Jan 21 05:24:22 UTC 2011


Ciao Raoul,

mi dispiace, I was away from the computer during most of the irc thing.


On 20 Jan 2011, at 16:13, Raoul Bonnal wrote:
> Dear Yanninck,
> rake usually is used inside a project directory to provide common operations to the project.
> Which is the idea behind "rake for bioinformatics" ? I mean, you have to copy you rake file where your data are.
> 
> Looking at the code there are a lot of dependencies from command line softwares and that could be a problem in maintainability

That is true. My main worry here (and for most things) is rapidly getting a biological result. I'm still working on finding the optimal balance between quick hack and maintainability/reusability. Migrating from shell scripts to ruby hacks does probably save me some time because in ruby it's really simple to put in a few verifications by raising Errors if a tool I need isn't in the $PATH or if an input/output file is empty. Those mean that debugging and fixing is much faster if I decide to run things on the linux server instead of the macbook, or in 2 years time after a reinstall.


> What about spend some energy on wrapping that commands into BioRuby classes?
> In that way those application could be available to other scripts.
I have two answers.
  - right now I cannot dedicate the time required to learn how to do that well. I need understand how ants work first :)     (If I were developping a big uniprot-type web application that needs to be robust for users, making wrappers may be defendable.... for one-off hacks its not)
  - call me conservative, but I'm also generally scared of wrappers. First, I want to have the raw input & output files that the programs use, because I may need to read or edit or rerun them in the future... I know I'll be able to read a raw text file. Thus I've never used bioruby's wrappers for blast or codeml or multiple sequence alignment (However, I have recently discovered the amazingly timesaving Bio::Tree however -wow). Second, programs are constantly changing... and thus wrappers must too - they're a ton of work to maintain and -like the Boson thing- there is no guarantee that that will be done.
 

> If you want to keep the rake approach we should find a way to not replicate rakefiles.
> One idea could be to create a rakefile in your working directory, similar to Rails:
> 
> # Add your own tasks in files placed in lib/tasks ending in .rake,
> # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
> 
> require File.expand_path('../config/application', __FILE__)
> require 'rake'
> 
> #The user needs just to add the tasks he wants:
> Bio::SomeName.load_tasks
> Bio::SomeOtherName.load_tasks
> Bio::AnotherName.load_tasks


That sounds like a really cool approach. I want to hear more :)




-------------------------
 Ant Genomes & Evolution 
http://yannick.poulet.org
   skype://yannickwurm







More information about the BioRuby mailing list