From 574b237cb249b0f0ccc0c364dc1e3be2a481a85f Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 9 Mar 2026 22:33:07 +0000 Subject: [PATCH 1/3] change taskflow parms --- .../utils/dag50_olink_reveal_nextflow_utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py index 9d9685e1..2b99fa1b 100644 --- a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py +++ b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py @@ -38,7 +38,7 @@ retry_delay=timedelta(minutes=5), retries=4, queue='hpc_4G', - multiple_outputs=False) + multiple_outputs=True) def prepare_olink_nextflow_script( design_dict: dict, work_dir: str, @@ -138,7 +138,7 @@ def prepare_olink_nextflow_script( WORKDIR=work_dir ) ) - return nf_script_file.as_posix() + return {"run_script": nf_script_file.as_posix()} except Exception as e: log.error(e) send_airflow_failed_logs_to_channels( @@ -153,13 +153,13 @@ def prepare_olink_nextflow_script( queue='hpc_8G4t72hr', pool='batch_job', retries=4) -def run_olink_nextflow_script(run_script: str): +def run_olink_nextflow_script(run_script: str) -> str: try: script_dir = os.path.dirname(run_script) bash_cmd = f"""set -eo pipefail; -cd {script_dir}; -chmod u+x {run_script}; -bash {run_script}""" +cd {script_dir} ; +chmod u+x {run_script} ; +bash {run_script} ;""" return bash_cmd except Exception as e: log.error(e) From 0b012fb513a70c98f1db6e2ac8b71d79695514e7 Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 9 Mar 2026 22:41:26 +0000 Subject: [PATCH 2/3] updated unit test --- test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py index 113787fd..a63b48a5 100644 --- a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py +++ b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py @@ -54,10 +54,11 @@ def test_prepare_olink_nextflow_script(self, *args): with open(design_yaml_file, "w") as fp: fp.write(design_yaml) design_dict = {"analysis_design": design_yaml_file} - analysis_script = prepare_olink_nextflow_script.function( + analysis_script_conf = prepare_olink_nextflow_script.function( design_dict=design_dict, work_dir=self.temp_dir ) + analysis_script = analysis_script_conf["run_script"] assert os.path.exists(analysis_script) with open(analysis_script, "r") as fp: script_data = fp.read() ## small file From ef8e08a5714189ebf5388edf0d6613b5678333fa Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Mon, 9 Mar 2026 22:47:32 +0000 Subject: [PATCH 3/3] updated unit test for bash task --- igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py | 1 + test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py index 2b99fa1b..d1757f63 100644 --- a/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py +++ b/igf_airflow/utils/dag50_olink_reveal_nextflow_utils.py @@ -157,6 +157,7 @@ def run_olink_nextflow_script(run_script: str) -> str: try: script_dir = os.path.dirname(run_script) bash_cmd = f"""set -eo pipefail; +## Move to the script dir cd {script_dir} ; chmod u+x {run_script} ; bash {run_script} ;""" diff --git a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py index a63b48a5..6146dfbd 100644 --- a/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py +++ b/test/igf_airflow/test_dag50_olink_reveal_nextflow_utils.py @@ -85,7 +85,11 @@ def test_run_olink_nextflow_script(self): analysis_cmd = run_olink_nextflow_script.function( script_file ) - assert analysis_cmd == f"set -eo pipefail;\ncd {os.path.dirname(script_file)};\nchmod u+x {script_file};\nbash {script_file}" + assert analysis_cmd == f"""set -eo pipefail; +## Move to the script dir +cd {os.path.dirname(script_file)} ; +chmod u+x {script_file} ; +bash {script_file} ;""" if __name__=='__main__': unittest.main() \ No newline at end of file