Sha256: f17c4cc876bcbd3943ffc9b4fee98b117cd7fecfc3df283c785ced1cc25587a1

Contents?: true

Size: 716 Bytes

Versions: 10

Compression:

Stored size: 716 Bytes

Contents

require File.join(File.dirname(__FILE__),'../lib/rake_helper')
require 'rbbt/sources/organism'

BIOGRID_URL = "http://thebiogrid.org/downloads/archives/Release%20Archive/BIOGRID-3.1.77/BIOGRID-ORGANISM-3.1.77.tab2.zip"

file 'source' do |t|
  FileUtils.mkdir_p t.name
  Misc.in_dir(t.name) do
    CMD::cmd("wget '#{BIOGRID_URL}' -O biogrid.zip")
    CMD::cmd('unzip biogrid.zip')
  end
end

rule /(\w+)\/protein_protein/ => 'source' do |t|
  org = t.name.match(/(\w+)\/protein_protein/)[1]
  FileUtils.mkdir_p File.dirname(t.name)
  name = Organism.name(org)
  source_file = Dir.glob(File.join(t.prerequisites.first, '*')).select{|file| file =~  /#{name.sub(' ', '_')}/}.first
  FileUtils.cp source_file, t.name
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbbt-phgx-3.0.0 share/install/Biogrid/Rakefile
rbbt-phgx-2.1.2 share/install/Biogrid/Rakefile
rbbt-phgx-2.1.1 share/install/Biogrid/Rakefile
rbbt-phgx-2.1.0 share/install/Biogrid/Rakefile
rbbt-phgx-2.0.1 share/install/Biogrid/Rakefile
rbbt-phgx-2.0.0 share/install/Biogrid/Rakefile
rbbt-phgx-1.0.0 share/install/Biogrid/Rakefile
rbbt-phgx-0.3.1 share/install/Biogrid/Rakefile
rbbt-phgx-0.3.0 share/install/Biogrid/Rakefile
rbbt-phgx-0.2.0 share/install/Biogrid/Rakefile