lib/genomer/runtime.rb in genomer-0.0.6 vs lib/genomer/runtime.rb in genomer-0.0.7
- old
+ new
@@ -85,12 +85,25 @@
def init
project_name = arguments.first
if File.exists?(project_name)
raise Genomer::Error, "Directory '#{project_name}' already exists."
- else
- Dir.mkdir project_name
- Dir.mkdir File.join(project_name,'assembly')
+ end
+
+ require 'genomer/files'
+
+ Dir.mkdir project_name
+ Dir.mkdir File.join(project_name,'assembly')
+
+
+ File.open(File.join(project_name,'Gemfile'),'w') do |file|
+ file.print Genomer::Files.gemfile
+ end
+
+ ['scaffold.yml','sequence.fna','annotations.gff'].each do |name|
+ File.open(File.join(project_name,'assembly',name),'w') do |file|
+ file.print Genomer::Files.send(name.gsub('.','_').to_sym)
+ end
end
end
def run_plugin
Genomer::Plugin[command].new(arguments,flags).run