I am attempting to analyze resting state fMRI data using CPAC. I have preprocessed my data using fMRIPrep, resulting in fMRI data registered in MNI space.
I understand that CPAC supports analysis of data preprocessed with fMRIPrep. Following the instructions on this page, I configured the data_config file as follows:
Example of how to include fMRIPrep outputs in the data config:
However, upon running CPAC as a test, I encountered the following error:
if isinstance(sub.get(‘anat’), dict):
AttributeError: ‘str’ object has no attribute ‘get’
I suspect the issue lies with the data_config file.
My questions are:
Is there an error in my data_config file setup?
Is it correct to use the pipeline configuration file as-is?
The preconfigured pipeline file for fMRIPrep has options like anatomical preprocessing set to “On”. My understanding is that these should be “Off” since fMRIPrep has already completed these preprocessing steps.
If anyone has experience using CPAC with fMRIPrep processed data, your insights would be greatly appreciated.
Hi, thank you for reaching out! There is a field in the pipeline file that needs to be switched on in order to pull fMRIPrep outputs into C-PAC. I recommend using the fMRIPrep-ingress preconfigured pipeline file, which will have all of the necessary and compatible options configured already. However, you can also add that field into the pipeline file you are using. It would look like this: pipeline_setup > outdir_ingress > run: On . Let me know if you have any trouble or if this doesn’t fix your problem!
I am currently running a C-PAC analysis pipeline using the provided pipeline file and encountered the following error message:
Traceback (most recent call last):
File "/code/CPAC/pipeline/cpac_pipeline.py", line 1514, in build_workflow
wf = connect_pipeline(wf, cfg, rpool, pipeline_blocks)
File "/code/CPAC/pipeline/cpac_pipeline.py", line 1127, in connect_pipeline
wf = nb.connect_block(wf, cfg, rpool)
File "/code/CPAC/pipeline/engine.py", line 1499, in connect_block
for pipe_idx, strat_pool in rpool.get_strats(
File "/code/CPAC/pipeline/engine.py", line 558, in get_strats
raise LookupError('\n\n[!] C-PAC says: None of the listed '
LookupError: When trying to connect node block 'ingress_regressors' to workflow 'cpac_sub-c0253_ses-01' after node block 'nuisance_regressors_generation_T1w':
[!] C-PAC says: None of the listed resources in the node block being connected exist in the resource pool.
Resources:
['pipeline-ingress_desc-confounds_timeseries']
I would appreciate any guidance on how to resolve this issue. The pipeline is configured to use outputs from fMRIPrep, and I am utilizing the pipeline_config_fmriprep-ingress.yml file.
Could there be a missing resource in my configuration file, or is there an issue with the current pipeline setup? Any advice on how to troubleshoot or correct this problem would be greatly appreciated.
That error message indicates that C-PAC is trying to do nuisance regression and can’t find the regressors in your fMRIPrep output directory. Is there a desc-confounds_timeseries file in your fMRIPrep outputs?
Hi, sorry for the delay. I wonder if it’s not a problem with that specific file, but instead C-PAC isn’t properly pulling in the output directory. Which subdirectory is the derivatives_dir field pointing to?