diff --git a/docs/workflows.rst b/docs/workflows.rst index 45f3111f0..f18adb49e 100644 --- a/docs/workflows.rst +++ b/docs/workflows.rst @@ -32,7 +32,7 @@ Starting in version 0.8.0, XCP-D includes a required ``--mode`` parameter. The ``mode`` parameter automatically defines sets of other parameters, based on recommended processing pipelines for different studies. -XCP-D can be run in one of three modes: ``linc``, ``abcd``, or ``hbcd``. +XCP-D can be run in one of four modes: ``linc``, ``abcd``, ``hbcd``, or ``nichart``. Each mode is designed by a different group, and has different requirements. Users may also run XCP-D in ``none`` mode, in which case almost all of the parameters must be @@ -66,6 +66,8 @@ which may be overridden by the user: - ``--fd-thresh 0``: Censoring is disabled by default. - ``--input-type fmriprep``: fMRIPrep outputs are expected as input. - ``--linc-qc``: The LINC QC file will be created by default. +- ``--min-coverage 0.5``: The default coverage threshold is 0.5. +- ``--smoothing 6``: Smoothing is enabled by default. Optional Parameters ------------------- @@ -116,6 +118,8 @@ which may be overridden by the user: - ``--combine-runs``: Runs will be concatenated by default. - ``--warp-surfaces-native2std``: Surfaces will be warped to standard space by default. - ``--linc-qc``: The LINC QC file will be created by default. +- ``--min-coverage 0.5``: The default coverage threshold is 0.5. +- ``--smoothing 6``: Smoothing is enabled by default. Required Parameters ------------------- @@ -167,6 +171,8 @@ which may be overridden by the user: - ``--combine-runs``: Runs will be concatenated by default. - ``--warp-surfaces-native2std``: Surfaces will be warped to standard space by default. - ``--linc-qc``: The LINC QC file will be created by default. +- ``--min-coverage 0.5``: The default coverage threshold is 0.5. +- ``--smoothing 6``: Smoothing is enabled by default. Required Parameters ------------------- @@ -189,6 +195,30 @@ Optional Parameters as well as the special value "all", which uses all of the low-motion data from the run. +nichart Mode +============ + +The ``nichart`` mode is used by the `NiChart project `_. + +This mode is very similar to ``linc`` mode, with the exception that it processes NIfTI files +by default and has smoothing disabled. + +Defaults +-------- + +By default, the ``nichart`` mode will apply the following parameters, +which may be overridden by the user: + +- ``--file-format nifti``: NIfTI files are used as input. +- ``--despike``: Despiking is enabled by default. +- ``--fd-thresh 0``: Motion-based censoring is disabled by default. +- ``--input-type fmriprep``: fMRIPrep outputs are expected as input. +- ``--linc-qc``: The LINC QC file will be created by default. +- ``--min-coverage 0.4``: The default coverage threshold is 0.4 instead of the more common 0.5. +- ``--output-type censored``: Censored data are the primary output. +- ``--smoothing 0``: Smoothing is disabled by default. + + Major Differences Between Modes =============================== diff --git a/xcp_d/cli/parser.py b/xcp_d/cli/parser.py index 0a28734c3..d23d80740 100644 --- a/xcp_d/cli/parser.py +++ b/xcp_d/cli/parser.py @@ -982,11 +982,8 @@ def _validate_parameters(opts, build_log, parser): if opts.output_type == 'censored': error_messages.append(f"'--output-type' cannot be 'censored' for '{opts.mode}' mode.") opts.output_type = 'interpolated' + opts.process_surfaces = True if opts.process_surfaces == 'auto' else opts.process_surfaces opts.smoothing = 6 if opts.smoothing == 'auto' else opts.smoothing - opts.confounds_config = '36P' if opts.confounds_config == 'auto' else opts.confounds_config - opts.process_surfaces = ( - True if (opts.process_surfaces == 'auto') else opts.process_surfaces - ) # Remove "all" from the list of correlation lengths opts.dcan_correlation_lengths = [c for c in opts.dcan_correlation_lengths if c != 'all'] elif opts.mode == 'hbcd': @@ -1010,11 +1007,8 @@ def _validate_parameters(opts, build_log, parser): if opts.output_type == 'censored': error_messages.append(f"'--output-type' cannot be 'censored' for '{opts.mode}' mode.") opts.output_type = 'interpolated' + opts.process_surfaces = True if opts.process_surfaces == 'auto' else opts.process_surfaces opts.smoothing = 6 if opts.smoothing == 'auto' else opts.smoothing - opts.confounds_config = '36P' if opts.confounds_config == 'auto' else opts.confounds_config - opts.process_surfaces = ( - True if (opts.process_surfaces == 'auto') else opts.process_surfaces - ) # Remove "all" from the list of correlation lengths opts.dcan_correlation_lengths = [c for c in opts.dcan_correlation_lengths if c != 'all'] elif opts.mode == 'linc': @@ -1035,9 +1029,8 @@ def _validate_parameters(opts, build_log, parser): f"'--output-type' cannot be 'interpolated' for '{opts.mode}' mode." ) opts.output_type = 'censored' - opts.smoothing = 6 if opts.smoothing == 'auto' else opts.smoothing - opts.confounds_config = '36P' if opts.confounds_config == 'auto' else opts.confounds_config opts.process_surfaces = False if opts.process_surfaces == 'auto' else opts.process_surfaces + opts.smoothing = 6 if opts.smoothing == 'auto' else opts.smoothing if opts.dcan_correlation_lengths is not None: error_messages.append(f"'--create-matrices' is not supported for '{opts.mode}' mode.") elif opts.mode == 'nichart': @@ -1057,9 +1050,8 @@ def _validate_parameters(opts, build_log, parser): opts.min_coverage = 0.4 if opts.min_coverage == 'auto' else opts.min_coverage opts.output_correlations = True if 'all' in opts.dcan_correlation_lengths else False opts.output_type = 'censored' if opts.output_type == 'auto' else opts.output_type - opts.smoothing = 0 if opts.smoothing == 'auto' else opts.smoothing - opts.confounds_config = '36P' if opts.confounds_config == 'auto' else opts.confounds_config opts.process_surfaces = False if opts.process_surfaces == 'auto' else opts.process_surfaces + opts.smoothing = 0 if opts.smoothing == 'auto' else opts.smoothing # Remove "all" from the list of correlation lengths opts.dcan_correlation_lengths = [c for c in opts.dcan_correlation_lengths if c != 'all'] elif opts.mode == 'none':