Commit 97de99cf authored by Gerald Salin's avatar Gerald Salin
Browse files

make a copy instead of zcat| gzip if only one file is in the input

parent ba4da55f
......@@ -78,6 +78,7 @@ class ConcatenateFilesGroups (Component):
for prefix in self.group_prefix:
logging.getLogger("ConcatenateFilesGroups").debug("process. prefix = " + prefix)
logging.getLogger("ConcatenateFilesGroups").debug("process. outputs_path[prefix] = " + ", ".join(outputs_path[prefix]))
logging.getLogger("ConcatenateFilesGroups").debug("process. concat_groups[prefix] = " + ", ".join(concat_groups[prefix]))
# Sort list of files to concatenate
concat_groups[prefix].sort()
......@@ -93,7 +94,12 @@ class ConcatenateFilesGroups (Component):
logging.getLogger("ConcatenateFilesGroups").debug("process. command = " + 'zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}' + ", ".join(concat_groups[prefix]) + ", and ouput = "+", ".join(outputs_path[prefix]))
output = os.path.join(self.runobj.get_work_directory(),prefix+"."+".".join(os.path.basename(self.files_list[0]).split(".")[1:]))
out_files.append(output)
self.add_shell_execution('zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}',
if len(concat_groups[prefix])==1:
self.add_shell_execution('cp ' + cmd_inputs_pattern + ' ${' + str(next_arg_number) + '}',
cmd_format='{EXE} {IN} {OUT}', map=False,
inputs = concat_groups[prefix], outputs = outputs_path[prefix])
else:
self.add_shell_execution('zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}',
cmd_format='{EXE} {IN} {OUT}', map=False,
inputs = concat_groups[prefix], outputs = outputs_path[prefix])
# self.concat_files = out_files
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment