Skip to content

ENH: Add new dwifslpreproc interface for MRtrix3 #3278

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

Merged
merged 14 commits into from
Dec 8, 2020
Merged

ENH: Add new dwifslpreproc interface for MRtrix3 #3278

merged 14 commits into from
Dec 8, 2020

Conversation

axiezai
Copy link
Contributor

@axiezai axiezai commented Nov 30, 2020

Summary

Added new MRtrix3 dwifslpreproc interface.

Close #3276

List of changes proposed in this PR (pull-request)

  • Added new interface at interfaces/mrtrix3/preprocess.py named DWIPreproc, interfaces with the newly updated dwifslpreproc command.
  • make specs created new pytest
  • All pytests for mrtrix3 interfaces passed

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@axiezai
Copy link
Contributor Author

axiezai commented Nov 30, 2020

Seems like the CI is failing at

Downloading standalone SPM ...
curl: (7) Failed to connect to www.fil.ion.ucl.ac.uk port 80: Connection timed out

@effigies
Copy link
Member

effigies commented Dec 2, 2020

I've restarted the CI...

@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #3278 (a1c43ad) into master (35b7927) will increase coverage by 0.04%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3278      +/-   ##
==========================================
+ Coverage   64.69%   64.73%   +0.04%     
==========================================
  Files         302      302              
  Lines       39837    39869      +32     
  Branches     5286     5288       +2     
==========================================
+ Hits        25773    25810      +37     
  Misses      12974    12974              
+ Partials     1090     1085       -5     
Flag Coverage Δ
unittests 64.73% <75.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/interfaces/mrtrix3/__init__.py 100.00% <ø> (ø)
nipype/interfaces/mrtrix3/preprocess.py 82.83% <75.00%> (-2.46%) ⬇️
nipype/pipeline/plugins/base.py 59.72% <0.00%> (+1.64%) ⬆️
nipype/pipeline/plugins/legacymultiproc.py 68.81% <0.00%> (+3.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35b7927...a1c43ad. Read the comment docs.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good overall. Some comments and at least one question.


class DWIPreprocInputSpec(MRTrix3BaseInputSpec):
in_file = File(
exists=True, argstr="%s", position=-10, mandatory=True, desc="input DWI image"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these position arguments really necessary for all inputs?

Copy link
Contributor Author

@axiezai axiezai Dec 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, this was my lazy way of ensuring the interface command stayed consistent with the examples from the mrtrix documentation.

I think if position is left empty, the inputs appear right after dwifslpreproc? I was going for a format of dwifslpreproc in_file out_file -rpe_options -other_options to follow the examples here.

Is there a way to achieve that without specifying positions for everything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's necessary, I think you could set position of 0 for in_file, 1 for out_file, 2 for rpe_options, and leave it unset for the rest. If it's not actually necessary for an option, I would personally leave it unset, because you're indicating to future maintainers that they need to be very particular about this.

@effigies effigies changed the title ENH (enhancement): Add new dwifslpreproc interface for MRtrix3 ENH: Add new dwifslpreproc interface for MRtrix3 Dec 2, 2020
axiezai and others added 3 commits December 3, 2020 14:55
Moved `-rpe_` to `argstr` for simpler input.

Co-authored-by: Chris Markiewicz <[email protected]>
Fixed typos and improved `-eddy` and `-topup` optional inputs.

Co-authored-by: Chris Markiewicz <[email protected]>
@effigies
Copy link
Member

effigies commented Dec 6, 2020

Looks like you're going to need to re-make specs once you're done.

@effigies
Copy link
Member

effigies commented Dec 8, 2020

LGTM. Thanks!

@effigies effigies merged commit 47fe00b into nipy:master Dec 8, 2020
@effigies effigies added this to the 1.6.1 milestone May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add dwifslpreproc mrtrix3 interface
2 participants