Commit 99f4eebf authored by Gerald Salin's avatar Gerald Salin
Browse files

add logging

parent 22440680
......@@ -16,7 +16,7 @@
#
import os
import logging
from jflow.component import Component
from jflow.utils import get_argument_pattern
......
......@@ -16,6 +16,7 @@
#
import os
import logging
from jflow.utils import get_argument_pattern
from jflow.component import Component
......@@ -40,6 +41,7 @@ class ConcatenateFilesGroups (Component):
self.add_output_file_list( "concat_files", "concat_files", pattern='{basename_woext}.'+".".join(extensions), items= self.group_prefix)
def process(self):
logging.getLogger("ConcatenateFilesGroups").debug("process. entering")
# Create dictionary : key = prefix and value = list of files to concatenate
concat_groups = Utils.get_filepath_by_prefix(self.files_list, self.group_prefix)
......@@ -48,11 +50,13 @@ class ConcatenateFilesGroups (Component):
for prefix in self.group_prefix:
logging.getLogger("ConcatenateFilesGroups").debug("process. working on "+prefix+", concat_groups[prefix] = "+",".join(concat_groups[prefix]) + ", outputs_path[prefix] = "+ ",".join(outputs_path[prefix]))
# Sort list of files to concatenate
concat_groups[prefix].sort()
[cmd_inputs_pattern, next_arg_number] = get_argument_pattern(concat_groups[prefix], 1)
logging.getLogger("ConcatenateFilesGroups").debug("process. cmd_inputs_pattern = "+cmd_inputs_pattern + ", next_arg_number = "+str(next_arg_number))
#TODO : check if a cp would be OK in case there is only one file per group
# If the file is not zip
if not self.files_list[0].endswith(".gz"):
self.add_shell_execution('cat ' + cmd_inputs_pattern + ' > ${' + str(next_arg_number) + '}',
......
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