Skip to content

Commit

Permalink
Change linc mode default file format to CIFTI (PennLINC#1248)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Sep 4, 2024
1 parent de25e03 commit 8598d05
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
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

0 comments on commit 8598d05

Please sign in to comment.