![]() ![]() Using a JoinNode for fsl.Merge() is another option, per Fixed-effects workflow for fmriprep outputs?, but from there it still looks like once you tell your JoinNode the joinsource input node, it will join over all the iterables if there are more than 1, again resulting in one giant list.Communication with customers is a key factor in growth of any business, specially in sales scenarios. If I were to set up a Node for utility.Merge(), I’m worried that, as above, it would merge all subjects/runs’ filenames into one giant list, instead of n lists with 8 files each. That all works well! then, for level 2, I want to run FSL FLAME, iterating over each subject (but combining the 8 cope and 8 varcope images of interest, one of each per run). To grab data such that my level 1 workflow (FSL FEAT/FILMGLS) iterates over subject (n subjects) and run (say, 8 runs per subject). I’ve got a BIDS-compliant dataset, and in nipype I’m using erables( Reviving this thread as it’s possible someone has found a nice fix for this since the last post! I’m dealing with a similar issue (have two iterables that get crossed, and I want to later join along only one of the iterables). If anyone has another solution I am of course still interested to see it! Thanks again for your comment! It pointed me in the right direction towards the Nipype utitlity interfaces. Wf.connect(merge, 'merged_file', datasink, 'merge') Wf.connect(select, 'out', merge, 'in_files') The nodes are connected as follows: wf.connect(susan, 'outputnode.smoothed_files', select, 'inlist') Merge = pe.Node(interface=Merge(), name='merge') Then I connect the Select node to my Merge node defined as: from import Merge Select = pe.Node(interface=util.Select(), name='select') Indices = [list(np.arange(level, n_runs * n_levels, n_levels)) I created a Select node that has the index input defined as an iterable: n_runs = 8 For anyone interested, here it is:įirst, I found that the outputs of the susan_smooth workflow came in the following order: etc.Īs stated above, my goal was to merge all runs smoothed by one of the respective fwhm levels together. It seems somewhat hacky to me but it works. I know this seems like a simple problem to solve, but I am stuck on this. So the JoinNode does not know which iterables to join? Could it be that the JoinNode only works if one iterable is defined per node? Because in the susan_smooth workflow the smooth node is defined as: smooth = pe.MapNode( ![]() I tried joinsource='susan', joinsource='', joinsource='susan.smooth' but nothing seems to work. However, it simply does not work and I suspect that it has to do with how the joinsource argument is defined. Merge = pe.JoinNode(interface=Merge(), name='merge', joinfield=, joinsource='?') I assumed that a JoinNode would be the way to do it, maybe similar to this: from import Merge Now I want to merge all 8 runs smoothed by each of the corresponding smoothing fwhm levels. This works fine and I get 8 (runs) x 3 (fwhm levels) = 24 files as a result of the smoothing node. Now I want to examine the effects of different smoothing kernels, which I define as follows: from import create_susan_smooth I use the susan_smooth workflow, on 8 functional task runs per subject.
0 Comments
Leave a Reply. |