You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the documentation for the Threshold method within the nipype SPM interface it shows use_vox_fdr_correction as an optional input with description "Whether to use voxel-based FDR correction for initial threshold (height_threshold_type has to be set to q-value)." Whenever I set this to True and set height_threshold_type to 'q-value' I get the error TraitError: Cannot set the undefined 'use_vox_fdr_correction' attribute of a 'ThresholdInputSpec' object.
I tried importing ThresholdInputSpec directly and creating an instance to check its available attributes via dir and did not see use_vox_fdr_correction. I also tried setting the height_threshold_type to 'q-value' without including the use_vox_fdr_correction and got an error stating that 'q-value' was not a valid value for height_threshold_type. My workflow works perfectly if I use Topographical FDR or FWE. I can replicate the error using the code snippet below.
Using the inspect module to look at the Threshold definition (i.e., inspect.getsource(spm.Threshold) I can see that there is no use_vox_fdr_correction attribute but when I look through the github it appears in the Threshold class definition. Should I be using a different NiPyPe version to use this capability or should I clone the github instead of installing NiPyPe via pip? Any help is appreciated!
Actual behavior
TraitError
Expected behavior
Voxel-wise FDR correction of contrast images with significance level set via q-value.
NA
Please put URL to code or code here (if not too long).
import nipype.interfaces.spm as spm
matlab_cmd = 'path/to/standalone/SPM12 path/to/mcr script'
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)
spm.Threshold(height_threshold=0.05, height_threshold_type='q-value', use_vox_fdr_correction=True)
Summary
In the documentation for the Threshold method within the nipype SPM interface it shows use_vox_fdr_correction as an optional input with description "Whether to use voxel-based FDR correction for initial threshold (height_threshold_type has to be set to q-value)." Whenever I set this to True and set height_threshold_type to 'q-value' I get the error
TraitError: Cannot set the undefined 'use_vox_fdr_correction' attribute of a 'ThresholdInputSpec' object.
I tried importing ThresholdInputSpec directly and creating an instance to check its available attributes via
dir
and did not see use_vox_fdr_correction. I also tried setting the height_threshold_type to 'q-value' without including the use_vox_fdr_correction and got an error stating that 'q-value' was not a valid value for height_threshold_type. My workflow works perfectly if I use Topographical FDR or FWE. I can replicate the error using the code snippet below.Using the
inspect
module to look at theThreshold
definition (i.e.,inspect.getsource(spm.Threshold)
I can see that there is nouse_vox_fdr_correction
attribute but when I look through the github it appears in theThreshold
class definition. Should I be using a different NiPyPe version to use this capability or should I clone the github instead of installing NiPyPe viapip
? Any help is appreciated!Actual behavior
TraitError
Expected behavior
Voxel-wise FDR correction of contrast images with significance level set via q-value.
How to replicate the behavior
import nipype.interfaces.spm as spm
matlab_cmd = 'path/to/standalone/SPM12 path/to/mcr script'
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)
spm.Threshold(height_threshold=0.05, height_threshold_type='q-value', use_vox_fdr_correction=True)
Script/Workflow details
NA
Please put URL to code or code here (if not too long).
import nipype.interfaces.spm as spm
matlab_cmd = 'path/to/standalone/SPM12 path/to/mcr script'
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)
spm.Threshold(height_threshold=0.05, height_threshold_type='q-value', use_vox_fdr_correction=True)
Platform details:
SPM version: 12.7771
MCR: v910
Python: 3.10.14
NiPyPe: 1.8.6
OS: Linux
Execution environment
Choose one
The text was updated successfully, but these errors were encountered: