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.
The type of functionality I want sounds like it should be accomplished by
MapNode, but the problem is that I don’t know the lists I’m going to iterate over before runtime.
iterablesbe defined after runtime (e.g. after I start the script)?
Related: To support
iterables, 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?
iterables aren’t a solution