nipy / nipype

Workflows and interfaces for neuroimaging packages
https://nipype.readthedocs.org/en/latest/
Other
746 stars 529 forks source link

'ROIv_file' in Parcellate? #591

Closed JohnGriffiths closed 7 years ago

JohnGriffiths commented 11 years ago

Had an error come up in the Parcellate node when using a variant on the mrtrix connectivity workflow.

Exception: File ./ROIv_scale500.nii.gz does not exist. Interface Parcellate failed to run. Inputs: dilation = False freesurfer_dir = ignore_exception = False out_roi_file = parcellation_name = scale500 subject_id = CBU080541 subjects_dir = /work/imaging5/Freesurfer

There is an 'ROI_scale500.nii.gz' file, but not an 'ROIv_scale500.nii.gz'.

What are 'ROIv_files', as opposed to 'ROI_files' ? They only seem to come up in the parcellate node. Can't quite tell if it's a typo or if there's some functional significance that I am missing.

See here

https://github.com/nipy/nipype/blob/9595f272aa4086ea28f7534a8bd05690f60bf6b8/nipype/interfaces/cmtk/parcellation.py#L552

e.g. outputs['roiv_file'] = op.abspath(self._gen_outfilename( 'nii.gz', 'ROIv'))

So

a) is this a bug?

and if so

b) any simple things I can do to work around it without changing the code?

Ta.

John

satra commented 11 years ago

according to this:

https://github.com/nipy/nipype/blob/9595f272aa4086ea28f7534a8bd05690f60bf6b8/nipype/interfaces/cmtk/parcellation.py#L294

there should be a ROIv file.

JohnGriffiths commented 11 years ago

Thanks Satra.

I think I see the problem now.

Looks like there should only be an ROIv file if 'dilation == True'

I had it set to false (the default), and it was still being expected for some reason.

Re-running now with dilation=True...

rt1 commented 10 years ago

I have the same problem as @JohnGriffiths. I have FSL 5.0 and Freesurfer 5-20130513. Everything else is updated to the latest version. I am following the guide at:

http://www.mit.edu/~satra/nipype-nightly/users/examples/dmri_connectivity_advanced.html

I tried everything on a Linux Mint platform. When this didn't work, I then tried using the NeuroDebian 7.2.0 virtual machine. Same problem.

Crash file:

Node: connectivity.mapping.Parcellate.a0
Working directory: /usr/local/freesurfer/dmri_connectivity_advanced/connectivity/mapping/_subject_id_subj1/Parcellate

Node inputs:

dilation = False
freesurfer_dir = <undefined>
ignore_exception = False
out_roi_file = <undefined>
parcellation_name = scale500
subject_id = subj1
subjects_dir = /usr/local/freesurfer/subjects

Traceback: 
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/plugins/linear.py", line 37, in run
    node.run(updatehash=updatehash)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1282, in run
    self._run_interface()
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1380, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/lib/pymodules/python2.7/nipype/pipeline/engine.py", line 1504, in _run_command
    result = self._interface.run()
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/base.py", line 895, in run
    runtime = self._run_interface(runtime)
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/cmtk/parcellation.py", line 586, in _run_interface
    crop_and_move_datasets(self.inputs.subject_id, self.inputs.subjects_dir, self.inputs.freesurfer_dir, self.inputs.parcellation_name, self.inputs.out_roi_file)
  File "/usr/lib/pymodules/python2.7/nipype/interfaces/cmtk/parcellation.py", line 477, in crop_and_move_datasets
    raise Exception('File %s does not exist.' % d[0])
Exception: File ./ROIv_scale500.nii.gz does not exist.
Interface Parcellate failed to run. 

@satra If it helps, here is what is happening just before it fails:

     reading template info from volume /usr/local/freesurfer/subjects/subj1/mri/orig/001.mgz...
INFO     : 2013-11-28 01:38:49,337 : main       : reading template info from volume /usr/local/freesurfer/subjects/subj1/mri/orig/001.mgz...
INFO     : 2013-11-28 01:38:49,337 : main       : reading template info from volume /usr/local/freesurfer/subjects/subj1/mri/orig/001.mgz...
INFO     : 2013-11-28 01:38:49,337 : main       : reading template info from volume /usr/local/freesurfer/subjects/subj1/mri/orig/001.mgz...
INFO     : 2013-11-28 01:38:49,337 : main       : reading template info from volume /usr/local/freesurfer/subjects/subj1/mri/orig/001.mgz...
131128-01:38:49,337 main INFO:
     Reslicing using nearest
INFO     : 2013-11-28 01:38:49,337 : main       : Reslicing using nearest
INFO     : 2013-11-28 01:38:49,337 : main       : Reslicing using nearest
INFO     : 2013-11-28 01:38:49,337 : main       : Reslicing using nearest
INFO     : 2013-11-28 01:38:49,337 : main       : Reslicing using nearest
131128-01:38:49,337 main INFO:
     writing to ./ROI_HR_th.nii.gz...
INFO     : 2013-11-28 01:38:49,337 : main       : writing to ./ROI_HR_th.nii.gz...
INFO     : 2013-11-28 01:38:49,337 : main       : writing to ./ROI_HR_th.nii.gz...
INFO     : 2013-11-28 01:38:49,337 : main       : writing to ./ROI_HR_th.nii.gz...
INFO     : 2013-11-28 01:38:49,337 : main       : writing to ./ROI_HR_th.nii.gz...
131128-01:38:49,338 runCmd DEBUG:
     Return Value: 0
DEBUG    : 2013-11-28 01:38:49,338 : runCmd     : Return Value: 0
DEBUG    : 2013-11-28 01:38:49,338 : runCmd     : Return Value: 0
DEBUG    : 2013-11-28 01:38:49,338 : runCmd     : Return Value: 0
DEBUG    : 2013-11-28 01:38:49,338 : runCmd     : Return Value: 0
131128-01:38:49,338 interface INFO:
     Processing ./ROIv_scale500.nii.gz:
INFO     : 2013-11-28 01:38:49,338 : interface  : Processing ./ROIv_scale500.nii.gz:
INFO     : 2013-11-28 01:38:49,338 : interface  : Processing ./ROIv_scale500.nii.gz:
INFO     : 2013-11-28 01:38:49,338 : interface  : Processing ./ROIv_scale500.nii.gz:
INFO     : 2013-11-28 01:38:49,338 : interface  : Processing ./ROIv_scale500.nii.gz:
131128-01:38:49,339 workflow ERROR:
     ['Node Parcellate.a0 failed to run on host neurodebian.']
ERROR    : 2013-11-28 01:38:49,339 : workflow   : ['Node Parcellate.a0 failed to run on host neurodebian.']
ERROR    : 2013-11-28 01:38:49,339 : workflow   : ['Node Parcellate.a0 failed to run on host neurodebian.']
ERROR    : 2013-11-28 01:38:49,339 : workflow   : ['Node Parcellate.a0 failed to run on host neurodebian.']
ERROR    : 2013-11-28 01:38:49,339 : workflow   : ['Node Parcellate.a0 failed to run on host neurodebian.']
131128-01:38:49,364 workflow INFO:
     Saving crash info to /usr/local/freesurfer/crash-20131128-013849-brain-Parcellate.a0.npz
INFO     : 2013-11-28 01:38:49,364 : workflow   : Saving crash info to /usr/local/freesurfer/crash-20131128-013849-brain-Parcellate.a0.npz
INFO     : 2013-11-28 01:38:49,364 : workflow   : Saving crash info to /usr/local/freesurfer/crash-20131128-013849-brain-Parcellate.a0.npz
INFO     : 2013-11-28 01:38:49,364 : workflow   : Saving crash info to /usr/local/freesurfer/crash-20131128-013849-brain-Parcellate.a0.npz
INFO     : 2013-11-28 01:38:49,364 : workflow   : Saving crash info to /usr/local/freesurfer/crash-20131128-013849-brain-Parcellate.a0.npz

There is a _ROIscale500.nii.gz file located at:

./dmri_connectivity_advanced/connectivity/mapping/_subject_id_subj1/Parcellate/ROI_scale500.nii.gz

But there is no _ROIvscale500.nii.gz file anywhere.

Any suggestions would be very much appreciated.

satra commented 10 years ago

@swederik - hey erik, could you take a look at this to see if you can spot sth obvious?

rt1 commented 10 years ago

Thank you, I will try it.