Method: CycleController#run_as_batch

Defined in:
lib/starter.rb

#run_as_batch(script, logpath) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/starter.rb', line 31

def run_as_batch(script, logpath)
  raise "#{script} missing" unless File.exist?(script)
  #raise "#{logpath} missing" unless File.exist?(logpath)
  raise "User Number of parsimony trees not set" unless @opts[:num_parsi_trees] > 0
  raise "Total Number of parsimony trees not set" unless @opts[:num_ptrees] > 0
  opts = @opts[:iter].to_s
  opts += " " + File.expand_path(@opts[:phy])
  opts += " " + parsimonator_requirements
  opts += " " + raxmllight_requirements
  opts += " " + @opts[:num_parsi_trees].to_s   # -N parameter -p for suer
  opts += " " + @opts[:num_ptrees].to_s # total number of parsimony trees
  opts += " " + @opts[:num_bestML_trees].to_s
  opts += " " + @opts[:exp_name].to_s
  opts += " " + @opts[:base_dir].to_s
  puts "./#{script} #{opts}"
  system "./#{script} #{opts} >> #{logpath}"
end