-
Notifications
You must be signed in to change notification settings - Fork 536
EPI-derived workflows and interfaces revisited #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPI-derived workflows and interfaces revisited #662
Conversation
A new preprocess file will contain all workflows regarding preprocessing of EPI images.
Since I'm to replace this workflow, I rename it with its ``classic'' name. The new pipeline will be based on the latest versions of ```fsl_prepare``` and ```epi_reg``` of FSL. Additionally, my intention is to provide with an interface for the new tool ```topup``` and a new workflow for T2-to-B0 registration-based correction.
Created a new file for adding EPI-related interfaces.
Added base classes for interfaces fsl_prepare_fieldmap, topup and applytopup
Start testing
Still needed to check outputs
Susceptibility correction with fieldmap
Additionally: now fsl.PrepareFieldmap gives a 4D output, as it is requested by fugue.
Also, part of the ApplyTOPUP has been refined
Before proceeding to submit the PR. Close #661
Conflicts: nipype/interfaces/fsl/utils.py nipype/workflows/dmri/fsl/dti.py
return self._list_outputs()['out_file'] | ||
return None | ||
|
||
class EddyCorrectInputSpec(FSLCommandInputSpec): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you have time, could you also add eddy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, the new tool, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes .. eddy was introduced to deal with the human connectome project data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, it looks similar to applytopup interface, I think I can make it. At least a base version if I found something difficult to implement (e.i. there were 3 parameters in topup that are not interfaced because I don't know exactly how they work).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to ask the FSL mailing list for clarification if their latest documentation here doesn't explain things.
http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/TOPUP/TopupUsersGuide
http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Eddy/UsersGuide
In-place run of the standard tool. Ref nipy#662
Encoding direction and readout time were missing
this is looking great - i'll try to run it on some data this week and will merge over the weekend. i'll send PR's to your branch before that. |
Cool deal - let me know if it needs anything else! On Oct 2, 2013, at 8:02 AM, Satrajit Ghosh notifications@github.com wrote:
|
* New interface for eddy. NO TESTING HAS BEEN DONE, though * Added interface.cmdline on documentation comments
Added Eddy to __init__ Fixed minor typo in documentation comments.
I think most of the requirements are met:
Ready? |
This reverts commit 5f5b978.
@oesteban - there are several failing tests. please run: make test in the main directory. |
Ok, I'm currently running it. I'm sorry I did not know I should check for that. |
This would fix one of the failed tests
I started using Travis CI -> https://travis-ci.org/oesteban/nipype I have a question: on those errors regarding
|
Added skip command that I guess solve the problem
Probably I had to add |
create_dmri_preprocessing was still calling the epidewarp workflow with its former name
A TODO task would be to update the workflow that uses fieldmap correction. It should be able to perform fieldmap with the new fsl_prepare interface and reverse encoding with TOPUP. |
This reverts commit 8f08e1c. Conflicts: nipype/algorithms/misc.py This commit should not be here, sorry for that. If necessary, I will run autopep again on misc.py
@oesteban : here is how to do the command line fixes - https://github.com/nipy/nipype/blob/master/nipype/interfaces/ants/registration.py#L359 you paste the expected command line right after the interface.cmdline thanks for switching to travis - it's a good way of running some parts of the tests - we will soon have a mechanism to test across versions and platforms. |
Now, the tests are correctly implemented
@satra , one last question: what happens with absolute paths (especially in outputs)... I implemented everything, but of course absolute paths don't match... |
interfaces typically generate things in either the current working directory (1) or in the directory of some input file (2). nodes will want to generate all output in their local directory. if (2) above, we add the following metadata to the inputspec for that input (copyfile=True/False - True copies, False symlinks). then in gen_filename we will typically generate a name without the absolute path |
I never managed to use the gen_filename facilities... so I usually hard-code them (which I'm aware is not very nice). But still we are in the same problem: if I let the example automatically generate output names, then the test doesn't work... right?. The os.path.abspath(generated_name) in list_outputs breaks the test. |
Thank you all, I saw that I can use three dots (...) to get the abspath computed from an interface :) |
actually we really need to move towards more consistent file generation as available in PR #681 |
I refactored the structure, added new interfaces ( PrepareFieldmap, TOPUP, ApplyTOPUP) and corresponding workflows ( fieldmap_correct and topup_correct )