Hi! 
I know it had passed so many times from your question but I have the same issue, if you remember about it, kindly let me know.
As I understood, by symlinking ln -s X Y , Y will be a linkname to the X content and if we open Y, X content will be shown.
I am writing a workflow with galaxy in which there is a task named calcvol which needs .nii.gz file to calculate the brain volume. However, as galaxy tends to change the files to .dat, I have two steps now, in the first step I make this linkage, then the second step is calcvol and I use the Y (here brain.nii.gz). The first step runs but the error is that this file does not exist. (Though I havn’t figure out yet that how the steps must be precised.
So I have the first command as:
ln -s $nifti $(nifti.element_identifier)
and then the second command is:
/.../python -m calcvol --nifti_file '$nifti' --unit '$unit'
Also I have checked with this one too:
#import re
/.../python -m calcvol --nifti_file '${re.sub('(?:^|\W)dataset.*', '/'+str($nifti.element_identifier), str($nifti))}' --unit '$unit'
But in either of situation I have the error:
brain.nii.gz does not exist
Also I try to use the brain.nii.gz as a text and not a data in the second file, and the error was stranger, showing other text as the file name.
I would appreciate it if can kindly help me.
Thanks in advance 