diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-11-10 15:27:26 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-11-10 15:27:26 +0100 |
commit | 9a06f2ff5ae6bdbe7dc90555599e186f1585e0d2 (patch) | |
tree | c9cbb63f398c2937f3cba78a9976c7356a3f79a4 /lib/import.rb | |
parent | 85ef2c4982f72c811d5e9fa4ce22e238c512fe6e (diff) |
Model::NanoPrediction parameters
Diffstat (limited to 'lib/import.rb')
-rw-r--r-- | lib/import.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/import.rb b/lib/import.rb index 541c9b5..8f640b1 100644 --- a/lib/import.rb +++ b/lib/import.rb @@ -5,7 +5,12 @@ module OpenTox class Enanomapper include OpenTox - def self.mirror dir="." + def self.mirror dir=nil + # clean download dir + dir ||= File.join(File.dirname(__FILE__),"..","data","enm") + FileUtils.rm_rf dir + FileUtils.mkdir_p dir + #get list of bundle URIs bundles = JSON.parse(RestClientWrapper.get('https://data.enanomapper.net/bundle?media=application%2Fjson'))["dataset"] File.open(File.join(dir,"bundles.json"),"w+"){|f| f.puts JSON.pretty_generate(bundles)} |