From 68e5e3ed2039e251a05918d7f979277654d575fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= Date: Wed, 3 Apr 2024 15:54:58 +0200 Subject: [PATCH] 80GC group analysis select files using 3dTCat --- narps_open/pipelines/team_80GC.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/narps_open/pipelines/team_80GC.py b/narps_open/pipelines/team_80GC.py index 4fb3e7a0..8477e5f5 100644 --- a/narps_open/pipelines/team_80GC.py +++ b/narps_open/pipelines/team_80GC.py @@ -7,7 +7,7 @@ from itertools import product from nipype import Workflow, Node, MapNode -from nipype.interfaces.utility import IdentityInterface, Function +from nipype.interfaces.utility import IdentityInterface, Function, Merge from nipype.interfaces.io import SelectFiles, DataSink from nipype.interfaces.afni import Deconvolve, MaskTool, TCatSubBrick @@ -482,15 +482,9 @@ def get_group_level_analysis(self): # #2 equalIndiffe_Zscr # Create a function to select the subbrick index of 3dttest++ output file - select_subbrick = MapNode(Function( - function = lambda a, b : (a, b), - input_names = ['a', 'b'], - output_names = ['out'] - ), - name = 'select_subbrick', iterfield = 'b' - ) - select_subbrick.inputs.b = ['\'[0]\'', '\'[1]\'', '\'[2]\''] - group_level.connect(t_test, 'out_file', select_subbrick, 'a') + select_subbrick = MapNode(Merge(2), name = 'select_subbrick', iterfield = 'in2') + select_subbrick.inputs.in2 = ['\'[0]\'', '\'[1]\'', '\'[2]\''] + group_level.connect(t_test, 'out_file', select_subbrick, 'in1') # SELECT DATASET - Split output of 3dttest++ select_output = Node(TCatSubBrick(), name = 'select_output', iterfield = 'in_files')