Skip to content

ENH: Updates interface for FSL's eddy command #3008

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

Closed
wants to merge 87 commits into from

Conversation

josephmje
Copy link
Contributor

Summary

Adds a new interface for Mrtrix3's mrresize command and updates inputs and outputs for FSL's eddy command

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

  • MRResize added
  • Mrtrix3 tests updated after MRTrix3BaseInputSpec modified to take either grad_file or grad_fsl
  • Eddy
    • field now requires a file instead of string
    • add additional options to inputspec for outlier replacement, intra-volume motion correction and susceptibility-by-movement correction
    • add additional output files to outputspec (EddyQuad fails to provide outlier metrics if outlier maps are missing)

Acknowledgment

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

@josephmje
Copy link
Contributor Author

TO DO

For mrresize, voxel_size and scale_factor are able to accept a single number if rescaling to isotropic voxels. I'm not sure how to incorporate this into nipype.

For eddy the outputs change depending on the FSL version used. How should this be accounted for?

@josephmje josephmje changed the title [WIP] Adds a new interface for Mrtrix3's mrresize command and updates interface for FSL's eddy command WIP: Adds a new interface for Mrtrix3's mrresize command and updates interface for FSL's eddy command Aug 28, 2019
@codecov
Copy link

codecov bot commented Aug 29, 2019

Codecov Report

Merging #3008 into master will decrease coverage by 0.52%.
The diff coverage is 66.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3008      +/-   ##
==========================================
- Coverage    67.5%   66.97%   -0.53%     
==========================================
  Files         344      343       -1     
  Lines       44039    44105      +66     
  Branches     5554     5560       +6     
==========================================
- Hits        29727    29541     -186     
- Misses      13560    13806     +246     
- Partials      752      758       +6
Flag Coverage Δ
#smoketests 50.4% <57.69%> (-0.01%) ⬇️
#unittests 64.16% <66.15%> (-0.79%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/mrtrix3/__init__.py 100% <ø> (ø) ⬆️
nipype/interfaces/mrtrix3/utils.py 83.7% <100%> (+1.28%) ⬆️
nipype/interfaces/fsl/epi.py 62.23% <57.69%> (-1%) ⬇️
nipype/interfaces/nilearn.py 40% <0%> (-56.67%) ⬇️
nipype/testing/fixtures.py 77.33% <0%> (-21.34%) ⬇️
nipype/interfaces/freesurfer/base.py 61.01% <0%> (-19.5%) ⬇️
nipype/workflows/smri/freesurfer/autorecon2.py 65.9% <0%> (-9.2%) ⬇️
nipype/workflows/smri/freesurfer/ba_maps.py 91.66% <0%> (-8.34%) ⬇️
nipype/workflows/smri/freesurfer/recon.py 66.66% <0%> (-7.81%) ⬇️
nipype/workflows/smri/freesurfer/autorecon3.py 68.4% <0%> (-6.95%) ⬇️
... and 12 more

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 23300e9...699f8d1. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 29, 2019

Codecov Report

Merging #3008 into master will increase coverage by 0.69%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3008      +/-   ##
==========================================
+ Coverage    67.5%   68.19%   +0.69%     
==========================================
  Files         344      344              
  Lines       44039    46004    +1965     
  Branches     5554     6199     +645     
==========================================
+ Hits        29727    31374    +1647     
- Misses      13560    13827     +267     
- Partials      752      803      +51
Flag Coverage Δ
#smoketests 50.4% <58.49%> (-0.01%) ⬇️
#unittests 65.88% <66.66%> (+0.93%) ⬆️
Impacted Files Coverage Δ
nipype/interfaces/mrtrix3/__init__.py 100% <ø> (ø) ⬆️
nipype/interfaces/mrtrix3/utils.py 83.7% <100%> (+1.28%) ⬆️
nipype/interfaces/fsl/epi.py 62.23% <58.49%> (-1%) ⬇️
nipype/info.py 90.09% <0%> (-4.27%) ⬇️
nipype/utils/filemanip.py 78.85% <0%> (-0.87%) ⬇️
nipype/interfaces/afni/preprocess.py 81.59% <0%> (-0.43%) ⬇️
nipype/interfaces/io.py 54.94% <0%> (ø) ⬆️
nipype/interfaces/freesurfer/preprocess.py 66.11% <0%> (ø) ⬆️
nipype/interfaces/dynamic_slicer.py 17.47% <0%> (ø) ⬆️
nipype/interfaces/nipy/preprocess.py 45.79% <0%> (ø) ⬆️
... and 6 more

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 23300e9...6fd6c5a. Read the comment docs.

@effigies effigies added this to the 1.2.2 milestone Aug 30, 2019
satra and others added 20 commits September 10, 2019 15:14
Co-Authored-By: Oscar Esteban <code@oscaresteban.es>
ENH: replace portalocker with filelock
Prevents nipy#3009 and nipy#3014 from happening - although this might not solve those issues,
this patch will help find their origin by making ``load_resultfile`` more strict (and
letting it raise exceptions).

The try .. except structure is moved to the only place is was being used within the Node code.
FIX: Disallow returning ``None`` in ``pipeline.utils.load_resultfile``
Generating the hashvalue when outputs are not ready at cache check stage
when the node's directory does not exist (or no results file is in
there) leads to nipy#3014.

This PR preempts those problems by delaying the hashval calculation.
Minimize the access to the ``result`` property when writing
pre/post-execution reports.

This modification should particularly preempt nipy#3009 (comment)
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
ENH: Avoid loading result from file when writing reports
ENH: Lightweight node cache checking
@oesteban
Copy link
Contributor

Hi @josephmje sorry for duplicating requests, hopefully git is making it easy for you.

Could you split this PR in two? One for the changes in eddy and the other for the new interface? That will make review and investigation of regressions much easier.

@josephmje josephmje changed the title WIP: Adds a new interface for Mrtrix3's mrresize command and updates interface for FSL's eddy command ENH: Updates interface for FSL's eddy command Sep 16, 2019
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.

10 participants