From 878554a5e7e5bd1ed55c37bb231f421798f1c3ea Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 23 Sep 2024 11:10:29 -0400 Subject: [PATCH 1/5] Only validate if raw data are provided. --- src/fmripost_aroma/cli/parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fmripost_aroma/cli/parser.py b/src/fmripost_aroma/cli/parser.py index 1603698..854b938 100644 --- a/src/fmripost_aroma/cli/parser.py +++ b/src/fmripost_aroma/cli/parser.py @@ -540,6 +540,7 @@ def parse_args(args=None, namespace=None): bids_dir = config.execution.bids_dir output_dir = config.execution.output_dir + derivatives = config.execution.derivatives work_dir = config.execution.work_dir version = config.environment.version @@ -571,8 +572,8 @@ def parse_args(args=None, namespace=None): 'Please modify the output path.' ) - # Validate inputs - if not opts.skip_bids_validation: + # Validate raw inputs if running in raw+derivatives mode + if derivatives and not opts.skip_bids_validation: from fmripost_aroma.utils.bids import validate_input_dir build_log.info( From b95063ae838897ef36ebd52d373c0c8a64c4df3d Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 23 Sep 2024 11:23:47 -0400 Subject: [PATCH 2/5] Install bids-validator 1.14.10. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb6a0e1..7aacd73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -102,7 +102,7 @@ RUN micromamba create -y -f /tmp/env.yml && \ # Check if this is still necessary when updating the base image. ENV PATH="/opt/conda/envs/fmripost_aroma/bin:$PATH" \ UV_USE_IO_URING=0 -RUN npm install -g svgo@^3.2.0 bids-validator@^1.14.0 && \ +RUN npm install -g svgo@^3.2.0 bids-validator@1.14.10 && \ rm -r ~/.npm # From 0fec2c5f5313049ef386c8c97020b8084031f68e Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 23 Sep 2024 11:29:04 -0400 Subject: [PATCH 3/5] Log the runs that were collected. --- src/fmripost_aroma/workflows/base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fmripost_aroma/workflows/base.py b/src/fmripost_aroma/workflows/base.py index ac82bc2..f8eb5b6 100644 --- a/src/fmripost_aroma/workflows/base.py +++ b/src/fmripost_aroma/workflows/base.py @@ -210,6 +210,13 @@ def init_single_subject_wf(subject_id: str): f"Please check your BIDS filters: {config.execution.bids_filters}." ) + config.loggers.workflow.info( + ( + 'Collected runs:\n' + f'{yaml.dump(subject_data, default_flow_style=False, indent=4)}' + ), + ) + bids_info = pe.Node( BIDSInfo( bids_dir=config.execution.bids_dir, From c1823b980b6e5a68991214643747459145e1d606 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 23 Sep 2024 11:29:17 -0400 Subject: [PATCH 4/5] Update base.py --- src/fmripost_aroma/workflows/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fmripost_aroma/workflows/base.py b/src/fmripost_aroma/workflows/base.py index f8eb5b6..7149275 100644 --- a/src/fmripost_aroma/workflows/base.py +++ b/src/fmripost_aroma/workflows/base.py @@ -212,7 +212,7 @@ def init_single_subject_wf(subject_id: str): config.loggers.workflow.info( ( - 'Collected runs:\n' + 'Collected subject data:\n' f'{yaml.dump(subject_data, default_flow_style=False, indent=4)}' ), ) From 35b35ae6d8e39b64fe0dde157cd4342328e10227 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 23 Sep 2024 11:31:15 -0400 Subject: [PATCH 5/5] Update base.py --- src/fmripost_aroma/workflows/base.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/fmripost_aroma/workflows/base.py b/src/fmripost_aroma/workflows/base.py index 7149275..94871ee 100644 --- a/src/fmripost_aroma/workflows/base.py +++ b/src/fmripost_aroma/workflows/base.py @@ -211,10 +211,7 @@ def init_single_subject_wf(subject_id: str): ) config.loggers.workflow.info( - ( - 'Collected subject data:\n' - f'{yaml.dump(subject_data, default_flow_style=False, indent=4)}' - ), + f'Collected subject data:\n{yaml.dump(subject_data, default_flow_style=False, indent=4)}', ) bids_info = pe.Node(