Permalink
Browse files

added wildcard for output copy

  • Loading branch information...
1 parent 9fe57c2 commit 6ea98fd1ea4136325988a74ebfb2f3702bdcf200 @fstrozzi committed Oct 12, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/bio/grid/job.rb
View
@@ -22,7 +22,7 @@ def set_commandline(cmd_line,inputs,input1,groups,index)
if commandline =~/<output>\.(\S+)/
extension = $1
commandline.gsub!(/<output>/,job_output)
- job_output << ".#{extension}"
+ #job_output << ".#{extension}"
else
self.options[:output_folder] = true
commandline.gsub!(/<output>/,job_output)
@@ -35,12 +35,12 @@ def append_options
if self.options[:copy]
self.instructions << ("mkdir -p #{self.options[:copy]}\n")
copy_type = (self.options[:output_folder]) ? "cp -r" : "cp"
- self.instructions << ("#{copy_type} #{self.job_output} #{self.options[:copy]}\n")
+ self.instructions << ("#{copy_type} #{self.job_output}* #{self.options[:copy]}\n")
end
if self.options[:clean]
rm_type = (self.options[:output_folder]) ? "rm -fr" : "rm -f"
- self.instructions << ("#{rm_type} #{self.job_output}\n")
+ self.instructions << ("#{rm_type} #{self.job_output}*\n")
end
end
@@ -62,11 +62,11 @@ def set_scheduler_options(type)
def execute(command_line,inputs,input1,groups,index)
self.set_scheduler_options(:pbs) # set script specific options for the scheduling system
- self.set_commandline(command_line,inputs,input1,groups,index)
+ self.set_commandline(command_line,inputs,input1,groups,index)
self.set_output_dir
- self.append_options
- job_filename = (self.options[:keep]) ? "job_#{index+1}#{self.options[:parameter_value]}.sh" : "job.sh"
- self.run(job_filename)
+ self.append_options
+ job_filename = (self.options[:keep]) ? "job_#{index+1}#{self.options[:parameter_value]}.sh" : "job.sh"
+ self.run(job_filename)
end

0 comments on commit 6ea98fd

Please sign in to comment.