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.' ), ) 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,