Questions about create session info for fMRI data

Hi there,
I am trying to process multimodal MRI data using HCPpipeline under Qunex(qunex_suite-0.93.2.sif). My bids data and process scrpts are as follows:
Bids data:


Batch script(rename sh file to txt for upload):
Step2_QuNexSingularity_sbatch.txt (1.6 KB)
Qunex script(rename sh file to txt for upload):
QuNexSingularity_Commands_sll.txt (3.8 KB)
Batch file:
batch_MCAD.txt (3.6 KB)
Mapping file:
mapping_MCAD.txt (97 Bytes)
Now the problem is that this pipeline works well with T1 data, but can not recongize fMRI data. I’ve checked the output in /home/u2010814497/AD_fMRI/MCAD/Qunex_Results/0189/sessions/0189_1/hcp/0189_1, there is no BOLD related subfolder, I can only find them in /home/u2010814497/AD_fMRI/MCAD/Qunex_Results/0189/sessions/0189_1/hcp/0189_1/unprocessed as shown in the following picture:

The output log in /home/u2010814497/AD_fMRI/MCAD/Qunex_Results/0189/processing/logs/comlogs showed done for create_study, import_bids, create_session_info, setup_hcp, create_batch, hcp_pre_freesurfer, hcp_freesurfer, hcp_post_freesurfer. But can not run hcp_fmri_volume and hcp_fmri_surface due to missing data in /home/u2010814497/AD_fMRI/MCAD/Qunex_Results/0189/sessions/0189_1/hcp/0189_1/MNINonLinear/Results/BOLD_1.
The batch file generated for subject 0189 were as follows:
batch.txt (4.5 KB)
It seems that something is wrong with create_session_info for fmri data. As a beginner, I don’t know how to debug this problem. I was wondering if I can get help for this.
Looking forward to your reply, best wishes!

Hey,
I have a couple of comments.
First, I suggest you tu use the latest version of Qunex container (currently 1.2.1). You can use the following command:

wget --show-progress -O qunex_suite-1.2.1.sif 'https://jd.mblab.si/qunex/qunex_suite-1.2.1.sif'

Second, your scripts are overly complicate. You don’t need sbatch.sh file, rather you should use qunex_container. I suggest you to read quick start, section Step 2. Basically, after pulling the qunex container (qunex_suite-1.2.1.sif) you need to run the following command:

# -- Download the script
wget http://jd.mblab.si/qunex/qunex_container

# -- Add to path
export PATH=${HOME}/qunex:${PATH}

# -- Add to profile to make it persistent when you logout
echo 'export PATH=${HOME}/qunex:${PATH}' >> ~/.profile

# -- Make executable
chmod a+x ${HOME}/qunex/qunex_container

These commands will download the qunex_container script and add it to your path (you may need to use .bash_profile or .zprofile instead of .profile, depending on your system). Then, check if the script is working by typing qunex_container in the console. After you have that, you can run the commands as follows (adapt to your needs):

qunex_container hcp_pre_freesurfer \
        --sessions="${study_folder}/processing/batch.txt" \
        --sessionsfolder="${study_folder}/sessions" \
        --overwrite="yes" \
        --container="${path_to_your_container}" \
        --scheduler="SLURM,time=02-00,cpus-per-task=2,mem-per-cpu=16G,jobname=qx_recipe"

Note that you don’t need to prepare a separate sbatch script for using SLURM; rather you should use parameter --scheduler. Also, you don’t need to make a for loop over subjects. Parallelization over subjects can be handled by using parameter parsessions, parjobs and parelements. (I suggest you to first use parsessions). Read more about the parallelization options here.

Third, can you please send me session.txt and session_hcp.txt for one subject? Your mapping file looks fine, and from the batch.txt it seems that the bolds have been mapped correctly, but I’d still like to check. Anyway, you seem to be missing fieldmap sequences, which you need for hcp_fmri_volume. Can you please attach logs for setup_hcp? What error does hcp_fmri_volume return?

Thanks for the quick reply and detailed solution, previously I tried to compute based on version 0.93.2 to match the results generated by a colleague. I tried again with the attached code and surprisingly found that most of the subjects can generate hcp_fmri_volume and hcp_fmri_surface results this time(I am not sure if the results was correctly generated).
I attached session.txt and session_hcp.txt below:
session.txt (406 Bytes)
session_hcp.txt (455 Bytes)
Also the running and comlogs for setup_hcp same subject attached:
done_setup_hcp_2025-06-12_13.38.59.059249.log (836 Bytes)
Log-setup_hcp_2025-06-12_13.38.59.059249.log (340 Bytes)
Thanks again for the kind help,
Best wishes

Can you check and attach the logs of hcp_fmri_volume and hcp_fmri_surface? Is there anything special happening with the subjects that weren’t processed?