nipype
nipype copied to clipboard
FSL MultipleRegressDesign sorts regressors, causing unexpected ordering of regressors/contrasts.
Summary
MultipleRegressDesign takes in an argument for regressors, for which you provide a dictionary of keys (like group membership, strings) and lists of values (floats). But, the design matrix comes out sorted alphabetically.
Actual behavior
If I provide two regressors ('younger','older'), the design matrix comes out with the first column 'older' and the second column 'younger'.
Expected behavior
Design matrix is generated in the order provided by the regressors.
How to replicate the behavior
level3model = pe.Node( interface=fsl.MultipleRegressDesign(), name='l3model')
#List of contrasts with each contrast being a list of the form - [(‘name’, ‘stat’, [condition list], [weight list])] level3model.inputs.contrasts = [['younger>older', 'T',['younger','older'], [1,-1]], ['older>younger', 'T',['younger','older'], [-1,1]]] level3model.inputs.regressors = dict(younger=[1]*12 + [0]*12), older=[0]*12 + [1]*12)
Script/Workflow details
Platform details:
230208-16:22:48,783 nipype.utils WARNING:
A newer version (1.8.4) of nipy/nipype is available. You are using 1.8.3
{'commit_hash': '3b50532',
'commit_source': 'installation',
'networkx_version': '2.8.5',
'nibabel_version': '4.0.1',
'nipype_version': '1.8.3',
'numpy_version': '1.22.4',
'pkg_path': '/apps/python/3.10/lib/python3.10/site-packages/nipype',
'scipy_version': '1.8.1',
'sys_executable': '/apps/fsl/6.0.6/bin/python',
'sys_platform': 'linux',
'sys_version': '3.10.6 | packaged by conda-forge | (main, Aug 22 2022, '
'20:35:26) [GCC 10.4.0]',
'traits_version': '6.3.2'}
Execution environment
Choose one
- Container [Tag: ???]
- My python environment inside container [Base Tag: ???] X My python environment outside container