Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update task-id #1385

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
),
)
Expand Down
5 changes: 3 additions & 2 deletions xcp_d/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down