XCP_D error: 'resolution' is not a recognized entity

Hi experts,

I ran the following code in XCP_D:

disk="/home/jiayi/Desktop"
project_dir=$disk/“Control_EXCI_MRI”
data_dir=$project_dir/“data_fmriprep_fMRI_1”
output_dir=$project_dir/“data_XCPD”
scratch=$output_dir/“scratch”
plugin_file="/home/jiayi/Desktop/Intervention_EXCI_MRI/Codes/plugin.yml"

sudo docker run -it
-v /$data_dir:/fmriprep:ro
-v /$output_dir:/out
-v $data_dir/sourcedata/freesurfer:/freesurfer:ro
-v /$scratch:/scratch
-v /$project_dir/XCPD_filter.json:/filter_file:ro
pennlinc/xcp_d:0.3.0
/fmriprep /out participant -t rest --smoothing 6
-w /scratch
–despike
–head_radius 50
–input fmriprep
–nuissance-regressors acompcor
–lower-bpf 0.01 --upper-bpf 0.08
–dummytime 7.5
–omp-nthreads 4
–mem_gb 80
–verbose
–resource-monitor

and got the following message and error:

Argument ‘–nuissance-regressors’ is deprecated and will be removed in version 0.3.0. Please use ‘–nuisance-regressors’ or ‘-p’.
221204-03:17:32,450 nipype.workflow IMPORTANT:
Running xcp_d version 0.3.0+0.g5a726e9.dirty:
* fMRI directory path: /fmriprep.
* Participant list: [‘EXCI0134’].
* Run identifier: 20221204-031730_1295ce7f-2d32-4ed6-b051-768761741a32.

221204-03:17:32,536 nipype.workflow INFO:
Beginning the xcpd_wf workflow
Process Process-2:
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.8/multiprocessing/process.py”, line 315, in _bootstrap
self.run()
File “/usr/local/miniconda/lib/python3.8/multiprocessing/process.py”, line 108, in run
self._target(*self._args, **self._kwargs)
File “/usr/local/miniconda/lib/python3.8/site-packages/xcp_d/cli/run.py”, line 929, in build_workflow
retval[“workflow”] = init_xcpd_wf(
File “/usr/local/miniconda/lib/python3.8/site-packages/xcp_d/workflow/base.py”, line 164, in init_xcpd_wf
single_subj_wf = init_subject_wf(
File “/usr/local/miniconda/lib/python3.8/site-packages/xcp_d/workflow/base.py”, line 313, in init_subject_wf
layout, subj_data = collect_data(
File “/usr/local/miniconda/lib/python3.8/site-packages/xcp_d/utils/bids.py”, line 251, in collect_data
subj_data = {
File “/usr/local/miniconda/lib/python3.8/site-packages/xcp_d/utils/bids.py”, line 253, in
layout.get(
File “/usr/local/miniconda/lib/python3.8/site-packages/bids/layout/layout.py”, line 626, in get
raise ValueError(msg + "If you’re sure you want to impose "
ValueError: ‘resolution’ is not a recognized entity. Did you mean [‘reconstruction’, ‘direction’]? If you’re sure you want to impose this constraint, set invalid_filters=‘allow’.

Does anyone know what I did wrong? does this have to do with the recent updates with the --bids-filter-file option?

I tried using the --bids-filter-file option and I got :

xcp_d: error: unrecognized arguments: --bids-filter-file

This is the code I ran:

sudo docker run -it
-v /$data_dir:/fmriprep:ro
-v /$output_dir:/out
-v $data_dir/sourcedata/freesurfer:/freesurfer:ro
-v /$scratch:/scratch
-v /$project_dir/XCPD_filter.json:/filter_file:ro
pennlinc/xcp_d:0.3.0
/fmriprep /out participant -t rest --smoothing 6
-w /scratch
–despike
–bids-filter-file /filter_file
–head_radius 50
–input fmriprep
–nuissance-regressors acompcor
–lower-bpf 0.01 --upper-bpf 0.08
–dummytime 7.5
–omp-nthreads 4
–mem_gb 80
–verbose
–resource-monitor

Can anyone spot my mistakes?

Thank you!

regards,
Vae

I tried pennlinc/xcp_d:0.2.0 and it is running at the moment

Hi Vae,

Can you describe your fMRIprep outputs? That is, the version of fmriprep and flags you used when running it? Did fmriprep finish with errors?

Best,
Steven

Hi Steven,

Thanks for your reply!

I ran fmriprep 22.0.0 and it finished in the terminal with some error for about the reports. However, when I checked the reports and the files they were fine. I am currently running another subject through fmriprep, and when it finish I will be able to update more details on this error.

Here is the code that I ran:

disk="/home/jiayi/Desktop"
project_dir=“Control_EXCI_MRI”
bids_dir=“MRI_raw/NIFTI_renamed”
preprocessed_dir=“data_fmriprep_fMRI”
freesurfer_licence="/home/jiayi/Desktop/Intervention_EXCI_MRI/Codes/license.txt"
plugin_file="/home/jiayi/Desktop/Intervention_EXCI_MRI/Codes/plugin.yml"
##############################

#version 22.0.0
sudo docker run -ti \
-v $disk/$project_dir/$bids_dir:/data:ro \
-v $disk/$project_dir/$preprocessed_dir:/fMRI \
-v $freesurfer_licence:/opt/freesurfer/license.txt \
-v $plugin_file:/plugin.yml \
nipreps/fmriprep:22.0.0 \
/data /fMRI participant \
--error-on-aroma-warnings --use-aroma \
--output-spaces MNI152NLin6Asym:res-2 MNI152NLin6Asym:res-1 MNI152NLin2009cAsym:res-2 MNI152NLin2009cAsym:res-1 \
--fd-spike-threshold 0.5 \
--dvars-spike-threshold 20 \
--use-plugin /plugin.yml \
--dummy-scans 5 \
--write-graph \
--n_cpus '12' \
--omp-nthreads 4 \
--mem 40GB \
--verbose \
--resource-monitor

Thank you for your help!
I will update on the fmriprep error when the current analysis is done!

I would guess the problem is stemming from you having two output resolutions for the same space. What do you think @tsalo?

The current unstable version should work fine with multiple resolutions.

--bids-filter-file is available in pennlinc:xcp_d:unstable, but it should’t be around in 0.3.0… However, if you are using 0.3.1, then I think the problem is that you need to use res instead of resolution.