Skip to content

Commit

Permalink
80GC group analysis select files using 3dTCat
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Apr 3, 2024
1 parent 7651709 commit 68e5e3e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions narps_open/pipelines/team_80GC.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 68e5e3e

Please sign in to comment.