[BioRuby] rake

Yannick Wurm yannick.wurm at unil.ch
Wed Dec 22 10:06:20 UTC 2010

Hiro-san's comment about Pwrake for workflows convinced me to finally have a look at Rake. 

So I was trying to make a Rakefile that gives me a tree from the gblocks run on the codon alignment from the backtranslated protein alignment from the protein sequence from nucleotide squences.
But I think I quickly bumped into a killer limitation with rules: that they apparently only do one level of inference

And I quote from http://onestepback.org/articles/buildingwithrake/rulelimitations.html
> rule ".c" => [".y"] do |t| yacc(t.source) end
> rule ".o" => [".c"] do |t| compile_c(t.source) end
> If lex.y exists … Rake will not Build lex.c from lex.y and lex.o from lex.c.

Is this limitation still true? Or is something else wrong with my code?
Do you have a workaround?

And question two: lets say I want a generic rule that cleans up fasta sequences (so that if I require 'aasdflkjsalkfjasdlkj.fasta', the file aasdflkjsalkfjasdlkj should be run through Emboss' seqret. Is that possible? The following hasn't been working:
> rule ".fasta" => "" do |task|
>     sh "seqret -sequence #{task.prerequisites.join} -outseq #{task.name}"
> end

Thanks & kind regards,

More information about the BioRuby mailing list