I am new to XCP-D. I am trying to use my confound regressor strategy which is only a slight variation from the built-in ones. I wrote my custom.yml file which only includes regressors from fMRIPrep. But I am having trouble figuring out how to pass it in.
If you look at the changelog on the GitHub repo, you can see that the ability to pass confound configs was only introduced in the release candidate for version 0.10.0rc1 5 days ago, so you need to update. Description of the config files are here: Processing Pipeline Details — xcp_d 0.10.0rc2.dev5+gf54208a documentation
Additionally, it doesn’t look like you mounted your drives with the -B flag in your apptainer preamble. See more about that here: Executing with Singularity - NiPreps
I am trying out the custom confound regressor strategy (which only uses fMRIprep regressors) with the latest release candidate. I ran into a problem that I didn’t have with the previous version 0.8.3 (it all ran through with the older version with the default -p)
Command used (and if a helper script was used, a link to the helper script or the command generated):
2024-10-10 20:25:15,493 [ WARNING] WARNING: `sentry_sdk.Hub` is deprecated and will be removed in a future major release. Please consult our 1.x to 2.x migration guide for details on how to migrate `Hub` usage to the new API: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x
2024-10-10 20:25:15,733 [ WARNING] Framewise displacement-based scrubbing is disabled. The following parameters will have no effect:
--min-time
2024-10-10 20:25:26,902 [ WARNING] WARNING: sentry_sdk.configure_scope is deprecated and will be removed in the next major version. Please consult our migration guide to learn how to migrate to the new API: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x#scope-configuring
2024-10-10 20:25:39,324 [ WARNING] WARNING: `sentry_sdk.Hub` is deprecated and will be removed in a future major release. Please consult our 1.x to 2.x migration guide for details on how to migrate `Hub` usage to the new API: https://docs.sentry.io/platforms/python/migration/1.x-to-2.x
241010-20:25:41,509 nipype.workflow IMPORTANT:
Running XCP-D version 0.10.0rc1
2024-10-10 20:25:41,509 [IMPORTANT] Running XCP-D version 0.10.0rc1
241010-20:25:41,512 nipype.workflow WARNING:
Previous output generated by version 0+unknown found.
2024-10-10 20:25:41,512 [ WARNING] Previous output generated by version 0+unknown found.
241010-20:25:45,253 nipype.workflow IMPORTANT:
Building XCP-D's workflow:
* Preprocessing derivatives path: /xdisk/jandrewshanna/yuhua/ACHV/MRIS/derivatives.
* Participant list: ['74'].
* Run identifier: 20241010-202511_2a158dae-8a8c-4cb3-9a40-b13d6df5e31c.
* Searching for derivatives and atlases: {'xcpdatlases': PosixPath('/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/data/atlases'), 'xcpd4s': PosixPath('/AtlasPack')}.
2024-10-10 20:25:45,253 [IMPORTANT] Building XCP-D's workflow:
* Preprocessing derivatives path: /xdisk/jandrewshanna/yuhua/ACHV/MRIS/derivatives.
* Participant list: ['74'].
* Run identifier: 20241010-202511_2a158dae-8a8c-4cb3-9a40-b13d6df5e31c.
* Searching for derivatives and atlases: {'xcpdatlases': PosixPath('/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/data/atlases'), 'xcpd4s': PosixPath('/AtlasPack')}.
Process Process-2:
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/workflow.py", line 100, in build_workflow
retval["workflow"] = init_xcpd_wf()
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 81, in init_xcpd_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 127, in init_single_subject_wf
subj_data = collect_data(
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/utils/bids.py", line 209, in collect_data
raise FileNotFoundError(
FileNotFoundError: No BOLD data found in allowed spaces (fsLR).
Query: {'datatype': 'func', 'desc': ['preproc', None], 'suffix': 'bold', 'extension': '.dtseries.nii', 'space': 'fsLR'}
Found files:
You are right, overwrite the -file-format to nifti solved this problem. But now when it gets to pull the regressors, it seems cannot find AROMA, even though they are included in my fMRIPrep. So in the case of using a custom config, do I always need to provide my custom data, with -c?
FYI, my custom.yaml looks like this:
name: acompcor_aroma
description: |
Nuisance regressors were selected according to the ‘acompcor’ and ‘aroma’ combined strategy.
Process Process-2:
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/local/miniconda/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/cli/workflow.py", line 100, in build_workflow
retval["workflow"] = init_xcpd_wf()
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 81, in init_xcpd_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/workflows/base.py", line 426, in init_single_subject_wf
confounds_dict = collect_confounds(
File "/usr/local/miniconda/lib/python3.10/site-packages/xcp_d/utils/bids.py", line 724, in collect_confounds
raise ValueError(
ValueError: Missing dataset required by confound spec: *aroma*. Did you provide it with the `--datasets` flag?
Not required: xcpdatlases
Not required: xcpd4s
2
Do you not have your aroma confounds in the same confounds file as your other confounds? The way you structured this makes it sound like you have a aroma-specific confound file.