Skip to content

Commit

Permalink
allow rewriting looper config even if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Nov 29, 2023
1 parent 557fbd5 commit 240222f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions looper/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,13 @@ def _get_pipestat_configuration(self, sample_name=None, project_level=False):
except KeyError:
flag_file_dir = None

if "record_identifier" in pipestat_config_dict:
pipestat_config_dict.update(
{"record_identifier": pipestat_config_dict["record_identifier"]}
)
elif sample_name:
pipestat_config_dict.update({"record_identifier": sample_name})

if project_level and "project_name" in pipestat_config_dict:
pipestat_config_dict.update(
{"project_name": pipestat_config_dict["project_name"]}
Expand Down Expand Up @@ -566,8 +573,7 @@ def _get_pipestat_configuration(self, sample_name=None, project_level=False):
looper_pipestat_config_path = os.path.join(
os.path.dirname(output_dir), "looper_pipestat_config.yaml"
)
if not os.path.exists(looper_pipestat_config_path):
write_pipestat_config(looper_pipestat_config_path, pipestat_config_dict)
write_pipestat_config(looper_pipestat_config_path, pipestat_config_dict)

ret[piface.pipeline_name] = {
"config_file": looper_pipestat_config_path,
Expand Down

0 comments on commit 240222f

Please sign in to comment.