-
Notifications
You must be signed in to change notification settings - Fork 533
[ENH] Add afni.LocalStat and afni.ReHo, update afni.ROIStats inputs #2740
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2740 +/- ##
==========================================
- Coverage 67.42% 64.09% -3.34%
==========================================
Files 340 338 -2
Lines 43172 43187 +15
Branches 5353 5359 +6
==========================================
- Hits 29110 27679 -1431
- Misses 13363 14439 +1076
- Partials 699 1069 +370
Continue to review full report at Codecov.
|
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.
This looks good. Thanks for the contribution. A few suggestions.
mandatory=True, | ||
exists=True) | ||
mask = File(desc='input mask', argstr='-mask %s', position=3, exists=True) | ||
mask_file = File(desc='input mask', argstr='-mask %s', exists=True) |
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.
When renaming a field, you should use deprecated
and new_name
(see the developer guide) fields (in addition to the new trait).
mask = File(desc='input mask', argstr='-mask %s', position=3, exists=True,
deprecated='1.1.4', new_name='mask_file')
mask_file = File(desc='input mask', argstr='-mask %s', exists=True)
nipype/interfaces/afni/preprocess.py
Outdated
'zeromedian': '-median', | ||
'zerosigma': '-sigma', | ||
'zeromode': '-mode' | ||
} |
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.
We (try to) conform to PEP8. Can you restyle this as follows (4 space indentation, no double spaces, closing brace matching entries)?
_stat_dict = {
'mean': '-nzmean',
...
}
nipype/interfaces/afni/utils.py
Outdated
chi_sq = traits.Bool( | ||
argstr='-chi_sq', | ||
desc='Output the Friedman chi-squared value in addition to the ' | ||
'Kendall\'s W.') |
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.
Should there be an output that's defined when this is True
?
nipype/interfaces/afni/utils.py
Outdated
argstr='-chi_sq', | ||
desc='Output the Friedman chi-squared value in addition to the ' | ||
'Kendall\'s W.') | ||
mask = traits.File( |
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.
mask_file
for consistency?
nipype/interfaces/afni/utils.py
Outdated
'faces': 7, | ||
'edges': 19, | ||
'vertices': 27, | ||
} |
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.
Please reformat this dictionary as above.
nipype/interfaces/afni/utils.py
Outdated
output_spec = ReHoOutputSpec | ||
|
||
def _list_outputs(self): | ||
|
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.
No blank line here.
@rciric Could you update the deprecation to 1.1.4? We can't release until the circle builds are resolved, so might as well get this one in. |
Thanks! |
Summary
3dLocalstat
adds support for voxelwise (local) confounds, for use in ANATICOR-like denoising protocols.3dReHo
enables estimation of voxelwise and ROI-wise regional homogeneity.3dROIstats
has been reworked to support a broader range of parameters and regional statistics.List of changes proposed in this PR (pull-request)
Localstat
interface added for AFNI's3dLocalstat
.ReHo
interface added for AFNI's3dReHo
.ROIstats
input spec accepts new parameters:num_roi
,zerofill
,roisel
,debug
,nomeanout
,nobriklab
,format1D
,format1DR
, andstat
. This means that parameters to theROIstats
interface can now be used to specify computation of regional statistics other than the default zero-inclusive mean.ROIstats
are not backward-compatible; for instance, the output has been renamed fromstats
toout_file
. Software using the existingROIstats
interface will need to be updated accordingly.Questions
ROIstats
currently favour internal consistency, but it would be no trouble to change theROIstats
interface to be fully backward-compatible instead.Acknowledgment