Skip to content

Commit 2ff28c4

Browse files
committed
buildtemplateparallel.sh - issue with input files
If I have an array of inputs like: in_files = ['~/data/subject_1/struct.nii','~/data/subject_2/struct.nii','~/data/subject_3/struct.nii'] The current code would turn this into the command: buildtemplateparallel.sh -d 3 -n 1 -g 0.250000 -i 3 -m 30x90x20 -j 4 -o PREFIX -c 2 -r 1 -s PR -t GR struct.nii struct.nii struct.nii Like this, I'm not able to run the buildtemplateparallel interface with Nipype. I think it crashes because it can't find the files. My commit changes the command to the following: buildtemplateparallel.sh -d 3 -n 1 -g 0.250000 -i 3 -m 30x90x20 -j 4 -o PREFIX -c 2 -r 1 -s PR -t GR ~/data/subject_1/struct.nii ~/data/subject_2/struct.nii ~/data/subject_3/struct.nii Like this the full path to structural images is passed to the command and it works.
1 parent 2cfa242 commit 2ff28c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/interfaces/ants/legacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _format_arg(self, opt, spec, val):
213213
start = '-z '
214214
else:
215215
start = ''
216-
return start + ' '.join([os.path.split(name)[1] for name in val])
216+
return start + ' '.join(name for name in val)
217217
return super(buildtemplateparallel, self)._format_arg(opt, spec, val)
218218

219219
def _list_outputs(self):

0 commit comments

Comments
 (0)