Skip to content

nipype tbss pipeline error #1789

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

Closed
jnecus opened this issue Jan 27, 2017 · 10 comments
Closed

nipype tbss pipeline error #1789

jnecus opened this issue Jan 27, 2017 · 10 comments

Comments

@jnecus
Copy link

jnecus commented Jan 27, 2017

Summary

I am using the template: ' pipeline to do a TBSS analysis on the NKI rockland sample data' for use on my own data. The script succesfully passes the first stage, i.e. generation of FA maps. However, once it reaches the TBSS processing steps it fail on the node 'tbss1.prepfa'

Here is a copy of the crash file information:

Node: tbssproc.tbss_all.tbss1.prepfa
Working directory: /home/joe/Desktop/bliss_data_tbss_jan17_testing/tbss_example/l2/tbssproc/tbss_all/tbss1/prepfa


Node inputs:

args = <undefined>
environ = {'FSLOUTPUTTYPE': 'NIFTI'}
ignore_exception = False
in_file = <undefined>
in_file2 = <undefined>
op_string = <undefined>
out_data_type = <undefined>
out_file = <undefined>
output_type = NIFTI
suffix = _prep
terminal_output = stream



Traceback: 
Traceback (most recent call last):
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/linear.py", line 39, in run
    node.run(updatehash=updatehash)
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 295, in run
    self._get_inputs()
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 1264, in _get_inputs
    super(MapNode, self)._get_inputs()
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 480, in _get_inputs
    value)
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/utils.py", line 440, in evaluate_connect_function
    *list(args))
  File "<string>", line 5, in tbss1_op_string
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nibabel/loadsave.py", line 48, in load
    filename)
ImageFileError: Cannot work out file type of "/"

Platform details:

'nibabel_version': '2.1.0', 'networkx_version': '1.11', 'numpy_version': '1.11.1', 'sys_platform': 'linux2', 'sys_version': '2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jul 2 2016, 17:42:40) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]', 'commit_source': 'archive substitution', 'commit_hash': '%h', 'pkg_path': '/home/joe/anaconda2/lib/python2.7/site-packages/nipype', 'sys_executable': '/home/joe/anaconda2/bin/python', 'traits_version': '4.6.0', 'scipy_version': '0.18.1'}

@jnecus
Copy link
Author

jnecus commented Jan 27, 2017

Update

I wondered whether the issue was being caused by the fact that tbss1.prepfa might require more than on e subject in order to run as I was initially trialling the script with just one subject.

After re-running with 2 subjects it seems to pass this phase, however I now get a new crash file. Any ideas on the causes of this crash?

crash file:

File: crash-20170127-140130-joe-projectfa-36352785-a965-404f-a707-bbcc4af9879c.pklz
Node: tbssproc.tbss_MD.projectfa
Working directory: /home/joe/Desktop/bliss_data_tbss_jan17_testing/tbss_example/l2/tbssproc/tbss_MD/projectfa


Node inputs:

alt_data_file = /home/joe/Desktop/bliss_data_tbss_jan17_testing/tbss_example/l2/tbssproc/tbss_MD/maskgroup/bliss_mr_02_MD_warp_merged_masked.nii
alt_skeleton = <undefined>
args = <undefined>
data_file = <undefined>
distance_map = /home/joe/Desktop/bliss_data_tbss_jan17_testing/tbss_example/l2/tbssproc/tbss_all/tbss4/distancemap/bliss_mr_02_FA_prep_warp_merged_mask_inv_dstmap.nii
environ = {'FSLOUTPUTTYPE': 'NIFTI'}
ignore_exception = False
in_file = /home/joe/Desktop/bliss_data_tbss_jan17_testing/tbss_example/l2/tbssproc/tbss_all/tbss3/meanfa/bliss_mr_02_FA_prep_warp_merged_masked_mean.nii
output_type = NIFTI
project_data = True
projected_data = <undefined>
search_mask_file = <undefined>
skeleton_file = <undefined>
terminal_output = stream
threshold = 0.2
use_cingulum_mask = True



Traceback: 
Traceback (most recent call last):
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/linear.py", line 39, in run
    node.run(updatehash=updatehash)
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 394, in run
    self._run_interface()
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 504, in _run_interface
    self._result = self._run_command(execute)
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 620, in _run_command
    cmd = self._interface.cmdline
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py", line 1608, in cmdline
    self._check_mandatory_inputs()
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py", line 945, in _check_mandatory_inputs
    self._check_requires(spec, name, getattr(self.inputs, name))
  File "/home/joe/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base.py", line 915, in _check_requires
    raise ValueError(msg)
ValueError: TractSkeleton requires a value for input 'project_data' because one of threshold, distance_map, data_file is set. For a list of required inputs, see TractSkeleton.help()

Thanks,
Joe

@mgxd
Copy link
Member

mgxd commented Feb 8, 2017

Hi Joe,

The first problem is caused by what you said, running with multiple subjects fixes it.

As for the second problem, this seems to go back to #1033, where a new input all_FA_file for the workflow tbss_MD() was added. The script you're using wasn't updated for this fix. For the moment, you can install this branch which should workaround pip install --upgrade https://github.com/mgxd/nipype/archive/rev/tbss.zip.

@satra any ideas how we can update the dmri_tbss_nki.py to include this?

@jnecus
Copy link
Author

jnecus commented Feb 8, 2017

Hello,

Following your instruction of doing pip install --upgrade https://github.com/mgxd/nipype/archive/rev/tbss.zip. I am now unable to run nipype. I get the following error

ImportError: No module named configparser

However when entering pip install configparser

I get

Requirement already satisfied: configparser in /home/joe/anaconda2/lib/python2.7/site-packages

I'm confused. How can I revert to how things were previously?

Thanks,
Joe

@mgxd
Copy link
Member

mgxd commented Feb 8, 2017

@jnecus sounds like you still have two versions of nipype in your environment. I would suggest doing a fresh uninstall by clearing all of nipype's folders in /home/joe/anaconda2/lib/python2.7/site-packages/nipype* and then reinstalling.

Let me know if that helps

@jnecus
Copy link
Author

jnecus commented Feb 8, 2017

I have performed the following commands:

rm -r /home/joe/anaconda2/lib/python2.7/site-packages/nipype*
pip install nipype

Which has succesfully reinstalled nipype. But still getting the configparser no module installed error.
Also still getting

Requirement already satisfied: configparser in /home/joe/anaconda2/lib/python2.7/site-packages
When I pip install configparser

@mgxd
Copy link
Member

mgxd commented Feb 8, 2017

in that case, I would try pip install future==0.15.2 as seen in #1699

EDIT: sorry, when I said fresh install I meant of the verison I linked above. Please try that first to see if it fixes the problem without downgrading future.

1. rm -r /home/joe/anaconda2/lib/python2.7/site-packages/nipype*
2. pip install https://github.com/mgxd/nipype/archive/rev/tbss.zip.

@jnecus
Copy link
Author

jnecus commented Feb 10, 2017

Hi there,

Thanks, your method of installing https://github.com/mgxd/nipype/archive/rev/tbss.zip worked, the nipype tbss script ran to completion. I am now trying to figure out in which order the subjects have been merged onto the merged FA skeleton as nipype didn't seem to process the subjects in numerical order.

@mgxd
Copy link
Member

mgxd commented Mar 8, 2017

@jnecus are you still running into trouble with the pipeline?

@jnecus
Copy link
Author

jnecus commented Mar 8, 2017

Hello,

Thanks for the message. As I said the previous fix worked, but I haven't gotten around to figuring out whats going on further down the line. I would mark this issue as complete for now.

Thanks for all your help,
Joe

@mgxd
Copy link
Member

mgxd commented Mar 8, 2017

If you run into any other troubles, feel free to open a new issue

@mgxd mgxd closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants