1# prepare 'fasta.output' 2 3def prepare_fasta_output n 4 filebase = File.join(File.dirname($0), 'fasta.output') 5 script = File.join(File.dirname($0), 'bm_so_fasta.rb') 6 file = "#{filebase}.#{n}" 7 8 unless FileTest.exist?(file) 9 STDERR.puts "preparing #{file}" 10 11 open(file, 'w'){|f| 12 ARGV[0] = n 13 $stdout = f 14 load script 15 $stdout = STDOUT 16 } 17 end 18end 19 20