Nipype Pipeline Pause or Break

41 views
Skip to first unread message

Eric

unread,
Feb 3, 2014, 12:00:47 PM2/3/14
to nipy...@googlegroups.com
Hello Nipype Users/Developers!

I am trying to imagine how I could put a pause or break in a single pipeline to save having to design two pipelines (a before and after pipeline, respectively).  Any ideas?  In this instance I would like to allow Nipype to iterate over many FSL BET options and then allow the user to select one of the brain masks to use for continuing through the rest of the pipeline.  Thanks for any thoughts!

Warm Regards,
~Eric

Satrajit Ghosh

unread,
Feb 3, 2014, 12:31:32 PM2/3/14
to nipy-user
hi eric,

mapnode and/or joinnode might be the answer to your question. i would either:

1. run a mapnode with the parameters and feed the output to a selector function 

or.

2. set up iterables on the node and then attach a joinnode later and then feed the output of the joinnode to a selector function.

the only difference between option 1 and 2 is when the parameter information is available. in (1), the parameters can be created during execution, for example as the output of some other node. in (2), the parameters have to be available at graph construction time and will get expanded out by the workflow engine.

cheers,

satra

--
 
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Eric

unread,
Feb 3, 2014, 12:48:05 PM2/3/14
to nipy...@googlegroups.com
Satra,

For (1), do you envision a selector function like this one:

Or something I would create that can somehow cause a pause in execution?

For (2), I didn't know you guys had this!  Thanks!

The parameters are available before execution, but I am still a little confused as to how I might be able to stop processing and make the user pick one output before continuing...

Maybe this?

Thanks!
~Eric

Satrajit Ghosh

unread,
Feb 3, 2014, 5:22:15 PM2/3/14
to nipy-user
hi eric,

in either case, i would envision the selector to be a Function node:

in that node you could:

0. check if a user generated file exists or has changed
1. if does not exist or changed, send an email to the user with the working directory and instructions
2. go into a while not file_exists: loop with sleep(60) 
3. the user could create a file with the right selection
4. and as soon as that is saved, the function returns

you could make it a little more sophisticated and do message passing if you wanted to

but within a function node you can do anything, even make coffee someday.

cheers,

satra

Eric

unread,
Feb 3, 2014, 6:08:26 PM2/3/14
to nipy...@googlegroups.com
Satra,

Brilliant!  Especially the coffee bit...  But seriously, I especially like Idea 2 there, to wait with a while not file_exists loop.

Many Thanks,
~Eric

Chris Filo Gorgolewski

unread,
Feb 3, 2014, 6:15:17 PM2/3/14
to nipy...@googlegroups.com
We should write this down on a website or create a special interface with the busy wait machinery. A few people have been asking about this!

Best,
Chris
Reply all
Reply to author
Forward
0 new messages