FSL-VBM Template Creation Errors After fMRIPrep Preprocessing

Dear all,

I preprocessed a set of MRI data using fmriprep, with the subjects divided into two groups, Patients and HC. I now want to continue with VBM analysis in FSL, including intracranial volume as a covariate, to compare the differences in whole-brain gray matter volume between the two groups and identify significant brain regions.

I am using the sub-ID_acq-HCP_label-GM_probseg.nii file output from fmriprep and skipped the fslvbm_1_bet step. However, I encountered the following error when running the fslvbm_2_template.sh script:

dhy@DESKTOP-3B6J8TQ:~/my_fsl_vbm/code$ ./step2_build_template.sh
=== Step 2: Building Custom Template ===
chmod: cannot access ‘fslvbm2a’: No such file or directory
Error submitting job - Array task definition file fault: Unable to read ‘./fslvbm2a’
Running segmentation: ID=
chmod: cannot access ‘fslvbm2b’: No such file or directory
usage: fsl_sub [-h] [-a ARCH] [-c COPROCESSOR]
[–coprocessor_multi COPROCESSOR_MULTI]
[–coprocessor_class COPROCESSOR_CLASS]
[–coprocessor_class_strict]
[–coprocessor_toolkit COPROCESSOR_TOOLKIT] [-F] [-j JOBHOLD]
[–not_requeueable] [–array_hold ARRAY_HOLD] [-l LOGDIR]
[-m MAILOPTIONS] [-M MAILTO] [-n] [-N NAME] [-p PRIORITY]
[-q QUEUE] [-r RESOURCE] [–delete_job DELETE_JOB]
[–extra EXTRA] [-R GB] [-s PARALLELENV,THREADS]
[-t ARRAY_TASK] [–array_native ARRAY_NATIVE] [-x NUMBER]
[–keep_jobscript] [–has_coprocessor COPROCESSOR_NAME]
[–has_queues] [–project PROJECT] [-S] [-T MINUTES]
[–show_config] [-v] [-V] [-z file]

fsl_sub: error: argument -j/–jobhold: expected one argument
Running initial registration: ID=
usage: fsl_sub [-h] [-a ARCH] [-c COPROCESSOR]
[–coprocessor_multi COPROCESSOR_MULTI]
[–coprocessor_class COPROCESSOR_CLASS]
[–coprocessor_class_strict]
[–coprocessor_toolkit COPROCESSOR_TOOLKIT] [-F] [-j JOBHOLD]
[–not_requeueable] [–array_hold ARRAY_HOLD] [-l LOGDIR]
[–m MAILOPTIONS] [-M MAILTO] [-n] [-N NAME] [-p PRIORITY]
[–q QUEUE] [-r RESOURCE] [–delete_job DELETE_JOB]

fsl_sub: error: argument -j/–jobhold: expected one argument
Creating first-pass template: ID=
chmod: cannot access ‘fslvbm2d’: No such file or directory
usage: fsl_sub [-h] [-a ARCH] [-c COPROCESSOR]
[–coprocessor_multi COPROCESSOR_MULTI]
[–coprocessor_class COPROCESSOR_CLASS]
[–coprocessor_class_strict]
[–coprocessor_toolkit COPROCESSOR_TOOLKIT] [-F] [-j JOBHOLD]
[–not_requeueable] [–array_hold ARRAY_HOLD] [-l LOGDIR]
[–m MAILOPTIONS] [-M MAILTO] [-n] [-N NAME] [-p PRIORITY]

fsl_sub: error: argument -j/–jobhold: expected one argument
Running registration to first-pass template: ID=
usage: fsl_sub [-h] [-a ARCH] [-c COPROCESSOR]
[–coprocessor_multi COPROCESSOR_MULTI]
[–coprocessor_class COPROCESSOR_CLASS]
[–coprocessor_class_strict]
[–coprocessor_toolkit COPROCESSOR_TOOLKIT] [-F] [-j JOBHOLD]
[–not_requeueable] [–array_hold ARRAY_HOLD] [-l LOGDIR]

fsl_sub: error: argument -j/–jobhold: expected one argument
Creating second-pass template: ID=
Study-specific template will be created, when complete, check results with:
fslview struc/template_4D_GM
and turn on the movie loop to check all subjects, then run:
fslview /home/dhy/fsl/data/standard/tissuepriors/avg152T1_gray struc/template_GM
to check general alignment of mean GM template vs. original standard space template.

I am encountering errors related to missing files (`fslvbm2a`, `fslvbm2b`, `fslvbm2d`) and issues with the `fsl_sub` command expecting arguments for `-j/--jobhold`. Could someone please help me troubleshoot these issues and provide advice on how to proceed?

Thank you for your help in advance!

Huiying Deng

Hi @Huiying_Deng, the FSL VBM scripts are quite primitive, and require you to organise your data in a very specific way, as described in the documentation. Can you describe/show how you have organised/named your data (e.g. with the output of ls -l)?

The VBM scripts also require you to be in the same directory in which your data is located - if you (or your step2_build_template.sh script) change directory at any point, this could be the cause of the error.