- if ( input_part.length > 0 && file !~ /#{input_part}/ )
- next
- end
- vopts.each { |vopt|
- cmd = ""
- outputfile = file.to_str
- if REMOVE_SUFFIX
- if outputfile =~ /(.+)\..{1,5}/
- outputfile = $1
- end
- end
- if output_opt.length > 0
- cmd = prg + ' ' +
- output_opt + ' ' + PBS_O_WORKDIR + outputfile + suffix + ' ' +
- opt + ' ' +
- PBS_O_WORKDIR + file.to_str +
- ' > /dev/null'
- elsif vopt.length > 0
- cmd = prg + ' ' + opt + ' ' + vopt + ' ' + PBS_O_WORKDIR + file.to_str +
- ' > ' + PBS_O_WORKDIR + vopt + "_" + outputfile + suffix
- else
- cmd = prg + ' ' + opt + ' ' + PBS_O_WORKDIR + file.to_str +
- ' > ' + PBS_O_WORKDIR + outputfile + suffix
- end
- tmp_cmd_file = file.to_str + TMP_CMD_FILE_SUFFIX
- if File.exists?( tmp_cmd_file )
- File.delete( tmp_cmd_file )
- end
- open( tmp_cmd_file, 'w' ) do |f|
- f.write( cmd )
- end
- puts( '[' + NAME + '] > excuting ' + cmd )
- IO.popen( 'qsub ' + tmp_cmd_file , 'r+' ) do |pipe|
- pipe.close_write
- puts pipe.read
- end
- sleep( SLEEP )
- if File.exists?( tmp_cmd_file )
- File.delete( tmp_cmd_file )
- end
- }
+ if ( input_part.length > 0 && file !~ /#{input_part}/ )
+ next
+ end
+ vopts.each { |vopt|
+ cmd = ""
+ outputfile = file.to_str
+ if LIMIT_TO_TAX_CODE
+ if outputfile =~ /^([A-Z0-9]{3,5})[_\.]/
+ outputfile = $1
+ end
+ end
+ if REMOVE_SUFFIX
+ if outputfile =~ /(.+)\..{1,5}/
+ outputfile = $1
+ end