Population_template error

Hi everyone!

Could you possibly help me understand why I get the following error when I try to create a FOD population template?

population_template: [ERROR] Command failed: mrtransform /home/Fixel_Based_Analysis/fod_folder/subject.mif.gz -linear linear_transforms/subject.txt -datatype float32 input_transformed/subject_translated.mif

Cheers,
Vasiliki

I think we’ll need more information to answer that. What is the full error message?

Hi Max,

Please find below the script I run, and what appears on the terminal.

#!/bin/tcsh
# environment defaults
module load mrtrix/5.3.0
# working variables
set working_data=$HOME/COBRE_2/Fixel_Based_Analysis
population_template -verbose ${working_data}/fod_folder -mask_dir ${working_data}/upsampled_masks_folder ${working_data}/output_fod_template_image.mif.gz 



Command: mrregister /home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz average_header.mif.gz -mask1 /home/k1465455/COBRE_2/Fixel_Based_Analysis/upsampled_masks_folder/A00024932.mif.gz -rigid_scale 1  -rigid_niter 0  -type rigid  -noreorientation  -rigid_init_translation mass  -datatype float32 -rigid linear_transforms/A00024932.txt
mrregister: [100%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz"
mrregister: [100%] preloading data for "/home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz"
mrregister: [100%] uncompressing image "average_header.mif.gz"
mrregister: [100%] preloading data for "average_header.mif.gz"
mrregister: [  0%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/upsampled_masks_folder/A00024932.mif.mrregister: [ 50%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/upsampled_masks_folder/A00024932.mif.mrregister: [100%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/upsampled_masks_folder/A00024932.mif.mrregister: [100%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/upsampled_masks_folder/A00024932.mif.gz"
mrregister: running rigid registration
mrregister: initialising translation and centre of rotation using centre of mass
mrregister: multi-resolution level 1, scale factor 1
Command: mrtransform /home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz -linear linear_transforms/A00024932.txt -datatype float32 input_transformed/A00024932_translated.mif
mrtransform: SH series detected, performing apodised PSF reorientation
mrtransform: [100%] uncompressing image "/home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz"
mrtransform: [  0%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"mrtransform: [  1%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"mrtransform: [  2%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"mrtransform: [  3%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"mrtransform: [  4%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to 

....

"input_tran...ed/A00024932_translated.mif"mrtransform: [ 73%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"mrtransform: [ 74%] copying from "/home/k146...fod_folder/A00024932.mif.gz" to "input_tran...ed/A00024932_translated.mif"...... population_template: [ERROR] Command failed: mrtransform /home/k1465455/COBRE_2/Fixel_Based_Analysis/fod_folder/A00024932.mif.gz -linear linear_transforms/A00024932.txt -datatype float32 input_transformed/A00024932_translated.mif
population_template: Changing back to original directory (/home/k1465455/COBRE_2/Fixel_Based_Analysis)
population_template: Deleting temporary directory /tmp/population_template-tmp-BW8199/
[k1465455@nanlnx4 Fixel_Based_Analysis]1% 

Cheers,
Vasiliki

This seems to be an old version of the script. Can you update to a current version and try again?

Is it possible that you have run out of space in /tmp? You can change the location of the temporary directory with -tempdir

Also, I am not sure what module you are using. What is mrtrix/5.3.0? The latest version I can see is:

module load mrtrix/0.3.15
/software/system/mrtrix/mrtrix-0.3.15/scripts/population_template ...

Hi Max,

I tried to update the newest version on my unix account but git pull doesn’t work.

Vasilikis-MacBook-Pro:nan vasilikichatzi$ cd mrtrix-0.3.15/
Vasilikis-MacBook-Pro:mrtrix-0.3.15 vasilikichatzi$ git pull
fatal: Not a git repository (or any parent up to mount point /Users/vasilikichatzi/nan)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Vasilikis-MacBook-Pro:mrtrix-0.3.15 vasilikichatzi$

Then I copied the population_template script from my mac to my unix account and I got this error:

[k1465455@nanlnx4 Fixel_Based_Analysis]0% study-specific_unbiased_FOD_template_FBA
ModuleCmd_Load.c(208):ERROR:105: Unable to locate a modulefile for 'mrtrix/5.3.0’
Traceback (most recent call last):
File “/home/k1465455/mrtrix-0.3.15/scripts/population_template”, line 6, in
import lib.app, lib.cmdlineParser
ImportError: No module named cmdlineParser
[k1465455@nanlnx4 Fixel_Based_Analysis]1%

I should have enough space, I have 900 GB free.

I think I have to update mrtrix but I do not remember how to do it in unix.

Do you possibly remember how to update mrtrix in unix?

Cheers,
Vasiliki

For reference, here is what we did (following the instructions for static build) on my machine and then copied the folder mrtrix3 to your home directory:

git clone https://github.com/MRtrix3/mrtrix3.git
cd mrtrix3
ARCH='x86-64' ./configure -static -nogui
./build
./configure

Good luck!