Skip to content

Commit

Permalink
Improve documentation of new features (#1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Oct 7, 2024
1 parent 90dc40a commit e78e845
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 44 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: 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 e78e845

Please sign in to comment.