Use-syn-sdc and use-aroma use in fmriprep 24.0.1

Summary:

2024-07-25T16:00:00Z
Hi all friends:

Recently I am using the latest version of fmriprep-docker to complete preprocessing of task-related fMRI data with the codes that worked on fmriprep-docker 23.2.1. However, two important steps (--use-aroma and --use-syn-sdc) went wrong and errors occurred. :cold_sweat:

after checking the documentations and posts in forum, I already know that --use-aroma had been marked [ DEPRECATED] Usage Notes — fmriprep version documentation and removed from the pipeline (although I stick to the fact that it is essential or at least an option for fMRI preprocessing!), but I have no idea why the latest docker version fmriprep cannot recognize the --use-syn-sdc command, at least 23.2.1 this command works normally and no documentation said that it was banned in 24.0. My question is similar to this post Use-syn-sdc not working for fmriprep 22.0.2 but not quite the same.

Here are my codes run on 24.0.1 and 23.2.1:

#24.0.1,  aroma and SDC not working
#!/bin/bash
bids_root_dir=/media/weissley/HIKSEMI/MST
sublist=/media/weissley/HIKSEMI/listnum.txt
for sub in `cat $sublist`
do
  echo -e "\033[32m---running sub-${sub} fmriprep--- \033[0m"
docker run --security-opt seccomp=unconfined --rm -it \
-v $bids_root_dir:/data:ro \
-v $bids_root_dir/derivatives:/out \
-v $bids_root_dir/codes/license.txt:/opt/freesurfer/license.txt \
-v $bids_root_dir/derivatives/work:/work \
nipreps/fmriprep:latest \
 /data /out \
 participant \
 --participant-label ${sub} \
#--use-aroma \
#--slice-time-ref 0 \
 --use-syn-sdc \
 --fs-license-file /data/derivatives/license.txt \
 --fs-no-reconall \
 --output-spaces MNI152NLin2009cAsym:res-2 T1w\
 --dummy-scans 0 \
 -nifti \
 --stop-on-first-crash \
 -w /work
echo "all finished"
end
#23.2.1, aroma and SDC both works normally
docker run --security-opt seccomp=unconfined \
-v /expdata/jxh/data_LJ/4MI/BIDS/TG/:data \
-v /expdata/jxh/data_LJ/results/fmriprep/4MI/TG/:/out \
-v /expdata/jxh/data_LJ/results/fmriprep/4MI/TG/:/work \
-v /expdata/jxh/data_LJ/:/fs_licens \
nipreps/fmriprep:23.2.1 \
/data /out \
-w /work \
participant \
--participant-label 101 \
--use-aroma \
--use-syn-sdc \
--cifti-output \
--output-spaces MNI152NLin6Asym:res-2 T1w \
--fs-license-file /fs_licens/license.txt \

Version: 24.0.1

Environment: Docker, installed by pull images.

Data formatted

MST

Summary

* 204 Files, 2.76GB
* 10 - Subjects
* 1 - Session

Available Tasks

* MST

Available Modalities

* MRI

This is a valid BIDS dataset!

relevant information:

This is the information of error (apparently, the pipeline skipped the use-syn-sdc command and successfully finished):

240726-02:56:15,809 nipype.workflow IMPORTANT:
	 fMRIPrep finished successfully!
240726-02:56:15,811 nipype.workflow IMPORTANT:
	 Works derived from this fMRIPrep execution should include the boilerplate text found in <OUTPUT_PATH>/logs/CITATION.md.
Sentry is attempting to send 1 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
fmriprep.sh: 行 19: --use-syn-sdc: 未找到命令
all finished

Translation of Chinese: the line 19 of fmriprep.sh --use-syn-sdc command was not found or recognized.
Here, the report also shows that no SDC was performed.


However, .sh on 23.2.1 finished with no error, and the figure was successfully generated——as follow. I would appreciate a lot if anyone can tell the reason!


updating: how I fixed the bug manually 2024-07-25T16:00:00Z

  • First, I tried mv my folders to ubuntu desktop because I used to face similar situation: when I run resting state preprocessing (surface reconstruction), an error surprisingly jumped out:


    The reason? not due to incomplete install or loss of functions/packages, merely fmriprep on Linux could not process the files not in ext4! So the solution is so simple: storing the files in ext4. So, I wonder whether fmriprep --use-ETC comands could not be adopted to ntfs files either.

  • To conveniently compare the codes and outputs, I downloaded an old version: docker pull image fmriprep:23.2.1. After mv the folder from portable device (ntfs) to ubuntu desktop, the --use-syn-sdc and --use-aroma indeed started working. Reports generated normally! Moreover, -outspaces T1w images and --dummy-scans 0 settings also worked normally.

  • However, ICA-aroma would rise errors in 24.0.x, so this time I would use 23.2.1 rather than 24.0.x to preprocess my task fMRI images. I truly prefer the denosing concept in FSL. :stuck_out_tongue_winking_eye:

Hi @WeissleyCAS, and welcome to neurostars!

AROMA was removed in fmriprep beginning in release 23.1.0. Using later version, you will need to manually use AROMA after fmriprep, so make sure you have the FSL MNI as an output space (MNI152NLin6Asym).

Best,
Steven

Thanks! And I still have few more questions:

According to the documentations, after fmriprep preprocessing, the sub-xx_task-xx_run-xx_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz equals to an already slice-timing corrected, realigned, co-registered and normalized wra*.nii in SPM12, yet no de-noising/high-pass filter or smoothing process has been adopted to it, right? SO:

  1. Does this mean that to do task-state fMRI 1st level analyses, I can simply use XCP_d to complete the final steps of preprocessing like what we do in SPM12 (hpf 1/128hz and smooth 4)?

  2. To construct a GLM, SPM12 and FSL would use all 6 motion parameters as covariates, but with strong function in XCP_d and profound confounds extracted with fmriprep, can I initially denoise the sub-xx_task-xx_run-xx_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz with -p 36p and then construct a GLM without any cov (only conditions as X)? If not, how many covs should I settle in the GLM? Do they differ a lot in outputs?
    for example: all of 36p, all of 12/24p or just the 6p of motion?

  3. As for me, fmriprep+xcp_d are very convenient and powerful tools for processing rs-fMRI and calculating the rsFC/gradients. I would appreciate if devs could enable more optional fucntions in docker version——like manually choosing the slice-time-ref to 0-1. It would benefit task fMRI researchers.

Hi @WeissleyCAS,

Yes (I don’t know about SPM, but that fmriprep output has gone through minimal preprocessing and not denoising+filtering).

XCP_D is not best-suited for task-based fmri analysis. You’d be better off using FitLins or Nilearn to set up your task-based GLM.

This is not recommended. Task regressors and motion regressors should be included in the same GLM.

This will be based on the quality of the data and how many temporal degrees of freedom you are willing to spare. If you have a lot of TRs in your images, you can be more comfortable including more model regressors.

slice-time-ref is included in the Docker container.

Best,
Steven

1 Like

Thanks for your detailed answers full of patience! Later I would get to know how fitlins works.

Best wishes,
Weissley