Error of running population_template

Dear Mrtrix3 Expert,

I used 18 subjects to create the template.

mkdir transformed_dir
population_template -transformed_dir transformed_dir -mask_dir upsampled_dwi_mask upsampled_FOD fod_template.mif -force

After long time running I got following error.

There was no input_transformed directory after long time population_template command. I also got wronging of disk space, it said I have 1.6 G left. I guess the process using tmp directory, but don’t know if this is the issue.

Thanks in advance for the help.

Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_002.mif -template nl_template7.mif -warp_full warps_8/C_ALL_002.mif masks_transformed/C_ALL_002.mif -interp nearest  -force
Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_003.mif nl_template7.mif -type nonlinear -nl_niter 5 -nl_warp_full warps_8/L_ALL_003.mif -transformed input_transformed/L_ALL_003.mif -nl_update_smooth 2.0 -nl_disp_smooth 1.0 -nl_grad_step 0.5 -force  -nl_init warps_7/L_ALL_003.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_003.mif -mask2 nl_template_mask7.mif -datatype float32 -nl_lmax 4
Command: rm warps_7/L_ALL_003.mif
Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_003.mif -template nl_template7.mif -warp_full warps_8/L_ALL_003.mif masks_transformed/L_ALL_003.mif -interp nearest  -force
Command: mrmath input_transformed/L_ALL_026.mif input_transformed/C_ALL_031.mif input_transformed/C_ALL_079.mif input_transformed/L_ALL_011.mif input_transformed/L_ALL_043.mif input_transformed/C_ALL_002.mif input_transformed/C_ALL_065.mif input_transformed/L_ALL_038.mif input_transformed/L_ALL_016.mif input_transformed/L_ALL_014.mif input_transformed/L_ALL_025.mif input_transformed/L_ALL_037.mif input_transformed/L_ALL_003.mif input_transformed/C_ALL_067.mif input_transformed/L_ALL_001.mif input_transformed/L_ALL_023.mif input_transformed/C_ALL_066.mif input_transformed/L_ALL_012.mif mean nl_template8.mif
population_template:
population_template: [ERROR] Command failed: mrmath input_transformed/L_ALL_026.mif input_transformed/C_ALL_031.mif input_transformed/C_ALL_079.mif input_transformed/L_ALL_011.mif input_transformed/L_ALL_043.mif input_transformed/C_ALL_002.mif input_transformed/C_ALL_065.mif input_transformed/L_ALL_038.mif input_transformed/L_ALL_016.mif input_transformed/L_ALL_014.mif input_transformed/L_ALL_025.mif input_transformed/L_ALL_037.mif input_transformed/L_ALL_003.mif input_transformed/C_ALL_067.mif input_transformed/L_ALL_001.mif input_transformed/L_ALL_023.mif input_transformed/C_ALL_066.mif input_transformed/L_ALL_012.mif mean nl_template8.mif
population_template: Output of failed command:
population_template: Changing back to original directory (/isilon/data/jianc/ALL/mrtrix/FBA)
population_template: Deleting temporary directory /tmp/population_template-tmp-LIYMTQ/
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_026.mif average_header.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_026.mif -rigid_scale 1  -rigid_niter 0  -type rigid  -noreorientation  -rigid_init_translation mass  -datatype float32 -rigid linear_transforms_initial/L_ALL_026.txt
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_026.mif -linear linear_transforms_initial/L_ALL_026.txt -datatype float32 input_transformed/L_ALL_026_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_026.mif -linear linear_transforms_initial/L_ALL_026.txt -datatype float32 masks_transformed/L_ALL_026_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrregister /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_001.mif average_header.mif -mask1 /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_001.mif -rigid_scale 1  -rigid_niter 0  -type rigid  -noreorientation  -rigid_init_translation mass  -datatype float32 -rigid linear_transforms_initial/L_ALL_001.txt
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_FOD/L_ALL_001.mif -linear linear_transforms_initial/L_ALL_001.txt -datatype float32 input_transformed/L_ALL_001_translated.mif
Command:: command not found
jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/L_ALL_001.mif -linear linear_transforms_initial/L_ALL_001.txt -datatype float32 masks_transformed/L_ALL_001_translated.mif
Command:: command not found

Hi Jian,

I’d suggest that you’ve encountered the same problem as Manuel: The drive hosting the script temporary directory contents is running out of space. Unfortunately it’s not actually giving a useful error to inform you of such. You can use the -tempdir option when calling the script to manually specify the location of the temporary directory.

It looks like the subsequent errors are arising because you have copy&pasted lines from the terminal output of the script; e.g. from this exerpt:

jian.chen@MCRI.EDU.AU@mcri-n0186:/isilon/data/jianc/ALL/mrtrix/FBA$ Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif
Command:: command not found

, the system sees the following as the instruction that you are trying to execute:

Command: mrtransform /isilon/data/jianc/ALL/mrtrix/FBA/upsampled_dwi_mask/C_ALL_065.mif -linear linear_transforms_initial/C_ALL_065.txt -datatype float32 masks_transformed/C_ALL_065_translated.mif

It’s therefore looking for a program on your system called “Command:”, and can’t find it.

Cheers
Rob

Thanks Rob! I have another try.

Jian

I had the same issue when working on my data on the servers at The Austin. @Dave managed to figure out a workaround: I think either memory was cleared or we specified own temporary directory.
I’ll be running this again soon and can let you know if I run into the same issues on different servers.

Hi Bob

It works. Thank you.

Jian