Description
Summary
The Bayesian estimation isn't fully implemented in nipype.
Actual behavior
Since the Bayesian implenetation writes Cbeta
imags instead of beta
images, the code runs into problems. For example it cannot find an entry in the SPM.ma
t with the name Vbeta
, and rightly so, because this is named VCbeta
. This is unfortunate, as I had to wait 4 days for this error to appear (since Bayesian estimation takes ~10 times longer).
Traceback (most recent call last):
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 49, in run_node
result['result'] = node.run(updatehash=updatehash)
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 394, in run
self._run_interface()
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 504, in _run_interface
self._result = self._run_command(execute)
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 630, in _run_command
result = self._interface.run()
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/interfaces/base.py", line 1044, in run
outputs = self.aggregate_outputs(runtime)
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/interfaces/base.py", line 1115, in aggregate_outputs
predicted_outputs = self._list_outputs()
File "//nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/interfaces/spm/model.py", line 228, in _list_outputs
for vbeta in spm['SPM'][0, 0].Vbeta[0]:
AttributeError: 'mat_struct' object has no attribute 'Vbeta'
Interface EstimateModel failed to run.
Furthermore, I think the contrast estimate implementation will also fail, since no beta images are written, but instead Cbeta_###.nii are written. Nipype won't look for these either.
Expected behavior
There should be a check if Bayesian estimation is selected, in order to select VCbeta
instead of Vbeta
in /spm/model.py
. Downstream processing should also account for the fact that Cbeta
images are written (instead of beta*.nii
). This ensures contrast estimation calculation using posterior probability maps (PPMs).
How to replicate the behavior
Run a first level Bayesian estimation with a really small mask (1mm sphere) in order to speed up the analysis.
Platform details:
I'm getting this error but I'm using nipype-0.12.1-py27_0:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/__init__.py", line 60, in <lambda>
get_info = lambda: _get_pkg_info(os.path.dirname(__file__))
File "/nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pkg_info.py", line 82, in get_pkg_info
src, hsh = pkg_commit_hash(pkg_path)
File "/nobackup/archimedes1/Glad/anaconda2_serverwide/lib/python2.7/site-packages/nipype/pkg_info.py", line 52, in pkg_commit_hash
archive_subst = cfg_parser.get('commit hash', 'archive_subst_hash')
File "/home/raid2/mihai/.local/lib/python2.7/site-packages/backports/configparser/__init__.py", line 811, in get
d)
File "/home/raid2/mihai/.local/lib/python2.7/site-packages/backports/configparser/__init__.py", line 384, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/home/raid2/mihai/.local/lib/python2.7/site-packages/backports/configparser/__init__.py", line 434, in _interpolate_some
"found: %r" % (rest,))
backports.configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: u'%h'