Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change linc mode default file format to CIFTI #1248

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 docs/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Defaults
By default, the ``linc`` mode will apply the following parameters,
which may be overridden by the user:

- ``--file-format nifti``: NIFTI files are used as input.
- ``--file-format cifti``: CIFTI files are used as input.
- ``--despike``: Despiking is enabled by default.
- ``--fd-thresh 0``: Censoring is disabled by default.
- ``--input-type fmriprep``: fMRIPrep outputs are expected as input.
Expand Down
2 changes: 1 addition & 1 deletion xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ def _validate_parameters(opts, build_log, parser):
opts.combine_runs = False if opts.combine_runs == "auto" else opts.combine_runs
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
opts.file_format = "cifti" if (opts.file_format == "auto") else opts.file_format
opts.input_type = "fmriprep" if opts.input_type == "auto" else opts.input_type
opts.linc_qc = True if (opts.linc_qc == "auto") else opts.linc_qc
opts.output_correlations = True
Expand Down
2 changes: 2 additions & 0 deletions xcp_d/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def test_fmriprep_without_freesurfer(data_dir, output_dir, working_dir):
"participant",
"--mode=linc",
f"-w={work_dir}",
"--file-format=nifti",
"--nthreads=2",
"--omp-nthreads=2",
"--head_radius=40",
Expand Down Expand Up @@ -383,6 +384,7 @@ def test_fmriprep_without_freesurfer_with_main(data_dir, output_dir, working_dir
"participant",
"--mode=linc",
f"-w={work_dir}",
"--file-format=nifti",
"--nthreads=2",
"--omp-nthreads=2",
"--head_radius=40",
Expand Down
3 changes: 2 additions & 1 deletion xcp_d/tests/test_cli_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def test_validate_parameters_linc_mode(base_opts, base_parser, capsys):

assert opts.abcc_qc is False
assert opts.linc_qc is True
assert opts.file_format == "cifti"

# --create-matrices is not supported
opts.dcan_correlation_lengths = [300]
Expand Down Expand Up @@ -649,7 +650,7 @@ def test_build_parser_05(tmp_path_factory, mode, process_surfaces, expectation):
@pytest.mark.parametrize(
"mode,file_format,expectation",
[
("linc", "auto", "nifti"),
("linc", "auto", "cifti"),
("abcd", "auto", "cifti"),
("hbcd", "auto", "cifti"),
("linc", "nifti", "nifti"),
Expand Down