Hi all,
Background/Use Case
I have a workflow where I am trying to iterate over two sources. One source is the betaseries_files, and the other is the rois. Essentially every roi has to be applied to every betaseries_file, or in other words I want the Cartesian product of roi x betaseries_file.
Problem/Road Block
The type of functionality I want sounds like it should be accomplished by iterables
, not MapNode
, but the problem is that I don’t know the lists I’m going to iterate over before runtime.
Question
- Can
iterables
be defined after runtime (e.g. after I start the script)?
Related: To supportiterables
, is the following syntax valid?:
inputnode = pe.Node(niu.IdentityInterface(fields=['betaseries_files',
'bold_mask',
'mni_roi_coords',
't1w_space_mni_mask',
'target_t1w_warp',
'target_mni_warp']),
name='inputnode')
betaseries_file = pe.Node(niu.IdentityInterface(fields=['betaseries_file']),
name='betaseries_file',
iterables=('betaseries_file', inputnode.inputs.betaseries_files))
Or should I figure out how to use nested MapNodes, and find a way to represent nesting rois within betaseries_files? Or is there another option I haven’t considered?
EDIT
iterables aren’t a solution
many thanks!
James