[NiPype] Setting path for ants interface..

608 views
Skip to first unread message

David Gutman

unread,
Oct 22, 2012, 4:41:39 PM10/22/12
to nipy...@googlegroups.com

Not sure why this is being flaky, as I could have sworn this pipeline was working a couple of weeks ago last time I ran it..

IOError: N4BiasFieldCorrection could not be found on host node15

 which N4BiasFieldCorrection 
/usr/lib/ants/N4BiasFieldCorrection

It definitely exists-- but I am guessing maybe the ants module doesn't know where to look?  How do I specify the location/search path for a given underlyinh module...


Actually same question would potentially apply for FSL... if I wanted to point to the fsl4.1 vs fsl4.1.4 or whatever.. does it do it based on my current path setup or is there a way to override it... (which I am guessing there is).




dg






Node inputs:

args = <undefined>
bspline_fitting_distance = 300.0
convergence_threshold = 1e-06
dimension = 3
environ = {'ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS': '1'}
ignore_exception = False
input_image = <undefined>
n_iterations = [50, 50, 30, 20]
num_threads = 1
output_image = <undefined>
shrink_factor = 3



Traceback: 
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/nipype/pipeline/plugins/multiproc.py", line 15, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/lib/python2.6/dist-packages/nipype/pipeline/engine.py", line 1128, in run
    self._run_interface()
  File "/usr/local/lib/python2.6/dist-packages/nipype/pipeline/engine.py", line 1226, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/local/lib/python2.6/dist-packages/nipype/pipeline/engine.py", line 1350, in _run_command
    result = self._interface.run()
  File "/usr/local/lib/python2.6/dist-packages/nipype/interfaces/base.py", line 820, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/lib/python2.6/dist-packages/nipype/interfaces/base.py", line 1097, in _run_interface
    runtime.hostname))
IOError: N4BiasFieldCorrection could not be found on host node15


--
David A Gutman, M.D. Ph.D.
Assistant Professor of Biomedical Informatics
Senior Research Scientist, Center for Comprehensive Informatics
Emory University School of Medicine

Chris Filo Gorgolewski

unread,
Oct 24, 2012, 9:46:11 AM10/24/12
to nipy...@googlegroups.com
Is the PATH variable correct (i.e. includes /usr/lib/ants/) in the
_report/report.rst? Did you try running this locally?

Best,
Chris
> --
>
>
>

David Gutman

unread,
Oct 24, 2012, 9:39:45 PM10/24/12
to nipy...@googlegroups.com
ill check now--- I am guessing it's a path problem... I just wasn't sure which file to look in/where to check... as it's run in the past...

so if i simply type bash command.txt it runs... but it doesn't look like the path is being sent to the module...

how / where is the global ANTS path explicitly set?


data/dgutman/GBM_WORKING_DATA/mayo_collab_gbm_reg_wf/_subject_id_TCGA-06-0129/n4bias_node_t2flair$ less 
_report/report.rst 
Node: n4bias_node_t2flair (ants)
================================

 Hierarchy : mayo_collab_gbm_reg_wf.n4bias_node_t2flair
 Exec ID : n4bias_node_t2flair.a09

Original Inputs
---------------

* args : <undefined>
* bspline_fitting_distance : 300.0
* convergence_threshold : 1e-06
* dimension : 3
* environ : {'ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS': '1'}
* ignore_exception : False
* input_image : /data/dgutman/GBM_WORKING_DATA/ASHLEE/BACKGROUNDS/TCGA-06-0129_AXIAL-T2-FLAIR_TARUN-FLAIR-ENV_BACKGROUND.nii.gz
* n_iterations : [50, 50, 30, 20]
* num_threads : 1
* output_image : <undefined>
* shrink_factor : 3

_report/report.rst (END) 


--



Chris Filo Gorgolewski

unread,
Oct 26, 2012, 9:17:46 AM10/26/12
to nipy...@googlegroups.com
there is not global ants path. Just make sure that in whatever bash
session you are using to run nipype script a full path to ants
binaries is in the $PATH variable. You can check that using echo
$PATH. Set it by executing "export
PATH=/path/to/my/ants/binaries:$PATH". I recommend adding it to your
.bashrc. Alternatively you can update the PATH variable inside your
nipype script using os.environ dictionary.

Best,
Chris
> --
>
>
>

David Gutman

unread,
Oct 26, 2012, 9:19:48 AM10/26/12
to nipy...@googlegroups.com
ok thanks Chris-- appreciate your feedback.

yeah I think I was running it form a "screen" and the path was funky...

thanks again
Reply all
Reply to author
Forward
0 new messages