Skip to content

Commit 546006c

Browse files
Add no_group_subjects in data desc
1 parent ef44bb5 commit 546006c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/data_descriptor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class DataDescriptor:
55
work_path: str = ""
66
task: str = ""
77
subjects: list = []
8+
no_group_subjects: list = []
89
slices_nb: int = 0
910
tr: float = 0.0
1011
units: str = ""
@@ -16,6 +17,7 @@ def __init__(self, data: {}):
1617
self.work_path = data["work_path"]
1718
self.task = data["task"]
1819
self.subjects = data["subjects"]
20+
self.no_group_subjects = data["no_group_subjects"]
1921
self.slices_nb = data["slices_nb"]
2022
self.tr = data["tr"]
2123
self.units = data["units"]

core/workflow_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def get_group_input(self, config: str, data_desc: DataDescriptor):
229229
)
230230
contrasts = []
231231
for subject in data_desc.subjects:
232-
contrasts.append(os.path.join(data_desc.result_path, config, f'_subject_id_{subject}', CONTRAST_NII))
232+
if subject not in data_desc.no_group_subjects:
233+
contrasts.append(os.path.join(data_desc.result_path, config, f'_subject_id_{subject}', CONTRAST_NII))
233234
group_input.inputs.contrasts = contrasts
234235
print(f"[{name}] added to workflow")
235236
return group_input

0 commit comments

Comments
 (0)