Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into bidsuri-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Oct 7, 2024
2 parents 3a4e98e + 63641d0 commit c176f7c
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 45 deletions.
4 changes: 4 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ Again, the standard space is determined based on other files.
There are additional keys that control how mesh and morphometry files are selected.
Please refer to ``io_spec.yaml`` for more information on them.

``atlas`` selects atlases for parcellation.
This is primarily useful for specifying spaces or resolutions.
This field is not reflected in the ``io_spec.yaml`` file.


Example bids-filter-file
========================
Expand Down
88 changes: 44 additions & 44 deletions docs/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -580,54 +580,54 @@ Finally, there is the ``query`` field in each confound set.
This defines the BIDS entities that will be used to find the confounds file associated with the
preprocessed BOLD file that is being post-processed by XCP-D.

```yaml
name: aroma_gsr
description: |
Nuisance regressors were selected according to the 'aroma_gsr' strategy.
AROMA motion-labeled components [@pruim2015ica], mean white matter signal,
mean cerebrospinal fluid signal, and mean global signal were selected as
nuisance regressors [@benchmarkp;@satterthwaite_2013].
confounds:
preproc_confounds:
dataset: preprocessed
query:
space: null
cohort: null
res: null
den: null
desc: confounds
extension: .tsv
suffix: timeseries
columns:
- global_signal
- csf
- white_matter
aroma_confounds:
dataset: aroma
query:
space: null
cohort: null
res: null
den: null
desc: aroma
extension: .tsv
suffix: timeseries
columns:
- ^aroma_orth_motion_.*$
```
.. code-block:: yaml
name: aroma_gsr
description: |
Nuisance regressors were selected according to the 'aroma_gsr' strategy.
AROMA motion-labeled components [@pruim2015ica], mean white matter signal,
mean cerebrospinal fluid signal, and mean global signal were selected as
nuisance regressors [@benchmarkp;@satterthwaite_2013].
confounds:
preproc_confounds:
dataset: preprocessed
query:
space: null
cohort: null
res: null
den: null
desc: confounds
extension: .tsv
suffix: timeseries
columns:
- global_signal
- csf
- white_matter
aroma_confounds:
dataset: aroma
query:
space: null
cohort: null
res: null
den: null
desc: aroma
extension: .tsv
suffix: timeseries
columns:
- ^aroma_orth_motion_.*$
In addition to TSV-based confound files, XCP-D also supports the use of voxel-wise confound files.
Take this partial example:

```yaml
confounds:
rapidtide_slfo:
dataset: rapidtide
query:
desc: LFO
extension: .nii.gz
suffix: timeseries
```
.. code-block:: yaml
confounds:
rapidtide_slfo:
dataset: rapidtide
query:
desc: LFO
extension: .nii.gz
suffix: timeseries
Note in this case that the confounds definition includes a query section, but not a columns section.
This is because this query will return a 4D NIfTI file, rather than a TSV file.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
"scikit-learn <= 1.5.2",
"scipy >= 1.14.0,<= 1.14.1", # nipype needs networkx, which needs scipy > 1.8.0
"seaborn", # for plots
"sentry-sdk ~= 2.14.0", # for usage reports
"sentry-sdk ~= 2.15.0", # for usage reports
"templateflow ~= 24.2.0",
"toml",
]
Expand Down
2 changes: 2 additions & 0 deletions xcp_d/utils/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def collect_atlases(datasets, atlases, file_format, bids_filters={}):
The file format of the atlases.
bids_filters : dict
Additional filters to apply to the BIDS query.
Only the "atlas" key is used.
Returns
-------
Expand Down Expand Up @@ -101,6 +102,7 @@ def collect_atlases(datasets, atlases, file_format, bids_filters={}):
bids_filters = bids_filters or {}

atlas_filter = bids_filters.get("atlas", {})
atlas_filter["suffix"] = atlas_filter.get("suffix") or "dseg" # XCP-D only supports dsegs
atlas_filter["extension"] = [".nii.gz", ".nii"] if file_format == "nifti" else ".dlabel.nii"
# Hardcoded spaces for now
if file_format == "cifti":
Expand Down

0 comments on commit c176f7c

Please sign in to comment.