Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b65c1c5
Work on incorporating xDF into XCP-D.
tsalo Jun 23, 2025
703bac4
Try this.
tsalo Jun 24, 2025
38e6672
Update connectivity.py
tsalo Jun 24, 2025
50943a5
Update connectivity.py
tsalo Jun 24, 2025
ed7c820
Update.
tsalo Jun 25, 2025
f19ad49
Update.
tsalo Jun 25, 2025
df4e931
Update.
tsalo Jun 25, 2025
35a1e17
Update outputs.py
tsalo Jun 25, 2025
90fd079
Update connectivity.py
tsalo Jun 25, 2025
fdd3a87
Fix.
tsalo Jun 25, 2025
cde6fe7
Update connectivity.py
tsalo Jun 25, 2025
c09b971
Update connectivity.py
tsalo Jul 3, 2025
b99ee90
Update.
tsalo Jul 14, 2025
ad21fb5
Whoops!
tsalo Jul 14, 2025
f172821
Whoops again.
tsalo Jul 14, 2025
1e09ab1
Update connectivity.py
tsalo Jul 14, 2025
442dbc0
Update connectivity.py
tsalo Jul 14, 2025
cccbfb7
Update utils.py
tsalo Jul 14, 2025
cd3df79
Update connectivity.py
tsalo Jul 15, 2025
10fcc86
Update connectivity.py
tsalo Jul 15, 2025
dfd0ddb
Update connectivity.py
tsalo Jul 15, 2025
9b8e523
Merge branch 'main' into chen-xdf
tsalo Jul 15, 2025
623f7f5
Update connectivity.py
tsalo Jul 15, 2025
e273873
Update connectivity.py
tsalo Jul 18, 2025
ecb8c12
Try this.
tsalo Jul 28, 2025
2b76731
Merge branch 'main' into chen-xdf
tsalo Jul 28, 2025
f3201f9
Update test_ds001419_cifti_outputs.txt
tsalo Jul 28, 2025
fc245d6
Work on tests.
tsalo Jul 28, 2025
ad2c736
Update test_cli_run.py
tsalo Jul 29, 2025
cde0f24
Try to support censored data.
tsalo Jul 29, 2025
c56a1f3
Update utils.py
tsalo Jul 29, 2025
8a9a640
Update README.rst
tsalo Jul 29, 2025
3eb92f1
Update test_ukbiobank_outputs.txt
tsalo Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Thus, with the development of *XCP-D*, data can be automatically preprocessed an
format, using NiPrep-style containerized code, all the way from the scanner to functional
connectivity matrices.

*XCP-D* picks up right where `fMRIprep <https://fmriprep.org>`_ ends, directly consuming the outputs
*XCP-D* picks up right where `fMRIPrep <https://fmriprep.org>`_ ends, directly consuming the outputs
of fMRIPrep.
*XCP-D* leverages the BIDS and NiPreps frameworks to automatically generate denoised BOLD images,
parcellated time series, functional connectivity matrices, and quality assessment reports.
Expand Down
29 changes: 29 additions & 0 deletions xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,19 @@ def _build_parser():
'Must be a value between zero and one, indicating proportion of the parcel.'
),
)
g_parcellation.add_argument(
'--correlation-outputs',
'--correlation_outputs',
dest='correlation_outputs',
required=False,
default=['auto'],
nargs='+',
choices=['auto', 'r', 'var_r', 'z', 'var_z'],
help=(
'Outputs to calculate correlations for. '
"If 'auto', the outputs will be inferred from the processing mode. "
),
)

g_dcan = parser.add_argument_group('abcd/hbcd mode options')
g_dcan.add_argument(
Expand Down Expand Up @@ -1068,6 +1081,9 @@ def _validate_parameters(opts, build_log, parser):
'36P' if (opts.confounds_config == 'auto') else opts.confounds_config
)
opts.correlation_lengths = opts.correlation_lengths if opts.correlation_lengths else []
if 'auto' in opts.correlation_outputs:
opts.correlation_outputs.remove('auto')
opts.correlation_outputs = sorted(set(['r'] + opts.correlation_outputs))
opts.despike = True if (opts.despike == 'auto') else opts.despike
opts.fd_thresh = 0.3 if (opts.fd_thresh == 'auto') else opts.fd_thresh
opts.file_format = 'cifti' if (opts.file_format == 'auto') else opts.file_format
Expand All @@ -1091,6 +1107,9 @@ def _validate_parameters(opts, build_log, parser):
'36P' if (opts.confounds_config == 'auto') else opts.confounds_config
)
opts.correlation_lengths = opts.correlation_lengths if opts.correlation_lengths else []
if 'auto' in opts.correlation_outputs:
opts.correlation_outputs.remove('auto')
opts.correlation_outputs = sorted(set(['r'] + opts.correlation_outputs))
opts.despike = True if (opts.despike == 'auto') else opts.despike
opts.fd_thresh = 0.3 if (opts.fd_thresh == 'auto') else opts.fd_thresh
opts.file_format = 'cifti' if (opts.file_format == 'auto') else opts.file_format
Expand All @@ -1113,6 +1132,9 @@ def _validate_parameters(opts, build_log, parser):
opts.confounds_config = (
'36P' if (opts.confounds_config == 'auto') else opts.confounds_config
)
if 'auto' in opts.correlation_outputs:
opts.correlation_outputs.remove('auto')
opts.correlation_outputs = sorted(set(['r', 'var_r'] + opts.correlation_outputs))
opts.despike = True if (opts.despike == 'auto') else opts.despike
opts.fd_thresh = 0 if (opts.fd_thresh == 'auto') else opts.fd_thresh
opts.file_format = 'cifti' if (opts.file_format == 'auto') else opts.file_format
Expand Down Expand Up @@ -1140,6 +1162,9 @@ def _validate_parameters(opts, build_log, parser):
'36P' if (opts.confounds_config == 'auto') else opts.confounds_config
)
opts.correlation_lengths = opts.correlation_lengths if opts.correlation_lengths else 'all'
if 'auto' in opts.correlation_outputs:
opts.correlation_outputs.remove('auto')
opts.correlation_outputs = sorted(set(['r'] + opts.correlation_outputs))
opts.despike = True if (opts.despike == 'auto') else opts.despike
opts.fd_thresh = 0 if (opts.fd_thresh == 'auto') else opts.fd_thresh
opts.file_format = 'nifti' if (opts.file_format == 'auto') else opts.file_format
Expand All @@ -1164,6 +1189,10 @@ def _validate_parameters(opts, build_log, parser):

opts.correlation_lengths = opts.correlation_lengths if opts.correlation_lengths else []

if 'auto' in opts.correlation_outputs:
opts.correlation_outputs.remove('auto')
opts.correlation_outputs = sorted(set(['r', 'var_r'] + opts.correlation_outputs))

if opts.despike == 'auto':
error_messages.append("'--despike' (y or n) is required for 'none' mode.")

Expand Down
2 changes: 2 additions & 0 deletions xcp_d/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,8 @@ class workflow(_Config):
"""Order of the band-pass filter."""
min_coverage = None
"""Coverage threshold to apply to parcels in each atlas."""
correlation_outputs = None
"""Correlation measures to output."""
correlation_lengths = None
"""Produce correlation matrices limited to each requested amount of time.
If this list includes 'all' then correlations from the full (censored) time series will
Expand Down
Loading