antsApplyTransform error - output_image path does not exist

My nipype workflow keeps crashing at the output step of antsApplyTransforms - I keep getting the error:

traits.trait_errors.TraitError: The trait ‘output_image’ of an ApplyTransformsOutputSpec instance is an existing file name, but the path ‘/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t/mapflow/_a_t1/sub-1089678_ses-0_task-movie_bold_st_mcf_brain_trans.nii.gz’ does not exist.

I’m not sure what’s happening here, seeing as obviously the output image doesn’t exist before I run ApplyTransform so I can’t specify it myself…? I’m wondering if there is a problem with ANTs not saving my output image under the right name that nipype recognizes?

Here is some of the log output that specifically pertains to running antsApplyTransform:

[Node] Setting-up “_a_t1” in “/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t/mapflow/_a_t1”.
190715-12:53:52,961 nipype.workflow INFO:
[Node] Running “_a_t1” (“nipype.interfaces.ants.resampling.ApplyTransforms”), a CommandLine Interface with command:
antsApplyTransforms --default-value 0 --dimensionality 4 --float 0 --input /Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/bet/mapflow/_bet1/sub-1089678_ses-0_task-movie_bold_st_mcf_brain.nii.gz --input-image-type 3 --interpolation Linear --output sub-1089678_ses-0_task-movie_bold_st_mcf_brain_trans.nii.gz --reference-image /Users/ryanntansey/Documents/preprocessed_data/todo_functional/zEPI_edit.nii.gz --transform /Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/reg/mapflow/_reg0/transformComposite.h5 --transform /Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/reg/mapflow/_reg1/transformComposite.h5
190715-12:53:53,67 nipype.workflow WARNING:
[Node] Error on “_a_t1” (/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t/mapflow/_a_t1)
190715-12:53:53,72 nipype.workflow WARNING:
[Node] Error on “preprocWF_15.a_t” (/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t)Traceback (most recent call last):
File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/plugins/linear.py”, line 48, in run
node.run(updatehash=updatehash)
File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 473, in run
result = self._run_interface(execute=True)
File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 1253, in _run_interface
self.config[‘execution’][‘stop_on_first_crash’])))
File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 1175, in _collate_results
(self.name, ‘\n’.join(msg)))
Exception: Subnodes of node: a_t failed:
Subnode 0 failed
Error: Traceback (most recent call last):

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/utils.py”, line 99, in nodelist_runner
result = node.run(updatehash=updatehash)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 473, in run
result = self._run_interface(execute=True)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 557, in _run_interface
return self._run_command(execute)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 637, in _run_command
result = self._interface.run(cwd=outdir)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 377, in run
outputs = self.aggregate_outputs(runtime)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 478, in aggregate_outputs
raise error

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 471, in aggregate_outputs
setattr(outputs, key, val)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/traits_extension.py”, line 112, in validate
self.info_text, value))

traits.trait_errors.TraitError: The trait ‘output_image’ of an ApplyTransformsOutputSpec instance is an existing file name, but the path ‘/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t/mapflow/_a_t0/sub-1089676_ses-0_task-movie_bold_st_mcf_brain_trans.nii.gz’ does not exist.

Subnode 1 failed
Error: Traceback (most recent call last):

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/utils.py”, line 99, in nodelist_runner
result = node.run(updatehash=updatehash)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 473, in run
result = self._run_interface(execute=True)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 557, in _run_interface
return self._run_command(execute)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py”, line 637, in _run_command
result = self._interface.run(cwd=outdir)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 377, in run
outputs = self.aggregate_outputs(runtime)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 478, in aggregate_outputs
raise error

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py”, line 471, in aggregate_outputs
setattr(outputs, key, val)

File “/Users/ryanntansey/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/traits_extension.py”, line 112, in validate
self.info_text, value))

traits.trait_errors.TraitError: The trait ‘output_image’ of an ApplyTransformsOutputSpec instance is an existing file name, but the path ‘/Users/ryanntansey/Documents/preprocessed_data/complete/preprocWF_15/a_t/mapflow/_a_t1/sub-1089678_ses-0_task-movie_bold_st_mcf_brain_trans.nii.gz’ does not exist.

Thanks!

MANAGED BY INCF