From c412db295c1ae1a2673d3c01227def4102b3fb86 Mon Sep 17 00:00:00 2001 From: Shivaram Karandikar Date: Thu, 6 Feb 2025 16:00:28 -0500 Subject: [PATCH 1/2] update config.py --- xcp_d/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xcp_d/config.py b/xcp_d/config.py index d00e811cf..6e0ae36aa 100644 --- a/xcp_d/config.py +++ b/xcp_d/config.py @@ -91,6 +91,7 @@ import os from multiprocessing import set_start_method +from bids.utils import listify from templateflow.conf import TF_LAYOUT # Disable NiPype etelemetry always @@ -421,7 +422,7 @@ class execution(_Config): participant_label = None """List of participant identifiers that are to be preprocessed.""" task_id = None - """Select a particular task from all available in the dataset.""" + """Select particular tasks from all available in the dataset.""" templateflow_home = _templateflow_home """The root folder of the TemplateFlow client.""" work_dir = Path('work').absolute() @@ -517,7 +518,7 @@ def _process_value(value): if cls.task_id: cls.bids_filters = cls.bids_filters or {} cls.bids_filters['bold'] = cls.bids_filters.get('bold', {}) - cls.bids_filters['bold']['task'] = cls.task_id + cls.bids_filters['bold']['task'] = listify(cls.task_id) dataset_links = { 'preprocessed': cls.fmri_dir, From 71604768f4b1fe1258d0ef6682dbf4d62c97a5ca Mon Sep 17 00:00:00 2001 From: Shivaram Karandikar Date: Thu, 6 Feb 2025 16:01:06 -0500 Subject: [PATCH 2/2] update parser.py --- xcp_d/cli/parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xcp_d/cli/parser.py b/xcp_d/cli/parser.py index 02f9c2826..4c8f01d27 100644 --- a/xcp_d/cli/parser.py +++ b/xcp_d/cli/parser.py @@ -102,11 +102,12 @@ def _build_parser(): '--task_id', dest='task_id', action='store', + nargs='*', help=( - 'The name of a specific task to postprocess. ' + 'The name(s) of specific task(s) to postprocess. ' 'By default, all tasks will be postprocessed. ' 'If you want to select more than one task to postprocess (but not all of them), ' - 'you can either run XCP-D with the --task-id parameter, separately for each task, ' + 'you can provide a space-delimited list of task names with the --task-id parameter, ' 'or you can use the --bids-filter-file to specify the tasks to postprocess.' ), )