I agree. I started with a real-world example, but the relevant interfaces I chose were so complex, e.g. ants.Registration, that the point was lost in the intricacies of making the example work.

I will try to come up with a clearer example later this week.

Fred

From: Michael Waskom <notifications@github.com<mailto:notifications@github.com>>
Reply-To: nipy/nipype <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Tuesday, September 17, 2013 3:45 PM
To: nipy/nipype <nipype@noreply.github.com<mailto:nipype@noreply.github.com>>
Cc: Me <loneyf@ohsu.edu<mailto:loneyf@ohsu.edu>>
Subject: Re: [nipype] Rebased version of JoinNode PR (#658)


In doc/users/joinnode_and_itersource.rst:

> +
> +  import nipype.pipeline.engine as pe
> +  a = pe.Node(interface=A(), name="a")
> +  b = pe.Node(interface=B(), name="b")
> +  b.iterables = ("in_file", images)
> +  c = pe.Node(interface=C(), name="c")
> +  d = pe.JoinNode(interface=D(), joinsource="b",
> +                  joinfield="in_files", name="d")
> +
> +  my_workflow = pe.Workflow(name="my_workflow")
> +  my_workflow.connect([(a,b,[('subject','subject')]),
> +                       (b,c,[('out_file','in_file')])
> +                       (c,d,[('out_file','in_files')])
> +                       ])
> +
> +This example assumes that interface "A" has one output *subject*,


Your point about the IdentityInterface graph surgery is well taken, I just felt lost in an alphabet soup while trying to parse the examples.

—
Reply to this email directly or view it on GitHub<https://github.com/nipy/nipype/pull/658/files#r6420476>.