From 08717be9d9a7a7b24907610672ddbb14d691341c Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Mon, 22 Jul 2024 15:59:46 -0400 Subject: [PATCH] Fix up documentation (#1209) --- docs/outputs.rst | 7 +++++-- docs/usage.rst | 1 + xcp_d/cli/parser.py | 29 +++++++++++++---------------- xcp_d/utils/boilerplate.py | 5 ++++- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/outputs.rst b/docs/outputs.rst index 1333b9d43..78ac50126 100644 --- a/docs/outputs.rst +++ b/docs/outputs.rst @@ -58,8 +58,11 @@ The atlases currently used in *XCP-D* can be separated into three groups: subcor and combined cortical/subcortical. The two subcortical atlases are the Tian atlas :footcite:p:`tian2020topographic` and the CIFTI subcortical parcellation :footcite:p:`glasser2013minimal`. -The cortical atlases are the Glasser :footcite:p:`Glasser_2016` and the -Gordon :footcite:p:`Gordon_2014`. +The cortical atlases are the Glasser :footcite:p:`Glasser_2016`, the +Gordon :footcite:p:`Gordon_2014`, +the MIDB precision brain atlas derived from ABCD data and thresholded at 75% probability +:footcite:p:`hermosillo2022precision`, +and the Myers-Labonte infant atlas thresholded at 50% probability :footcite:`myers2023functional`. The combined cortical/subcortical atlases are 10 different resolutions of the 4S (Schaefer Supplemented with Subcortical Structures) atlas. diff --git a/docs/usage.rst b/docs/usage.rst index dbea403e2..5bb3523a8 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -51,6 +51,7 @@ Command-Line Arguments .. argparse:: :ref: xcp_d.cli.parser._build_parser :prog: xcp_d + :func: _build_parser --band-stop-min : @after For the "notch" filter option, we recommend the following values. diff --git a/xcp_d/cli/parser.py b/xcp_d/cli/parser.py index b95400412..7e5580058 100644 --- a/xcp_d/cli/parser.py +++ b/xcp_d/cli/parser.py @@ -65,7 +65,6 @@ def _build_parser(): ) # Required "mode" argument - optional = parser._action_groups.pop() required = parser.add_argument_group("required arguments") required.add_argument( "--mode", @@ -82,9 +81,9 @@ def _build_parser(): ) # optional arguments - optional.add_argument("--version", action="version", version=verstr) + parser.add_argument("--version", action="version", version=verstr) - g_bids = optional.add_argument_group("Options for filtering BIDS queries") + g_bids = parser.add_argument_group("Options for filtering BIDS queries") g_bids.add_argument( "--participant-label", "--participant_label", @@ -137,7 +136,7 @@ def _build_parser(): ), ) - g_perfm = optional.add_argument_group("Options for resource management") + g_perfm = parser.add_argument_group("Options for resource management") g_perfm.add_argument( "--nprocs", "--nthreads", @@ -195,7 +194,7 @@ def _build_parser(): help="Increases log verbosity for each occurence. Debug level is '-vvv'.", ) - g_outputoption = optional.add_argument_group("Input flags") + g_outputoption = parser.add_argument_group("Input flags") g_outputoption.add_argument( "--input-type", "--input_type", @@ -224,7 +223,7 @@ def _build_parser(): ), ) - g_param = optional.add_argument_group("Postprocessing parameters") + g_param = parser.add_argument_group("Postprocessing parameters") g_param.add_argument( "--dummy-scans", "--dummy_scans", @@ -320,7 +319,7 @@ def _build_parser(): help="After denoising, concatenate each derivative from each task across runs.", ) - g_motion_filter = optional.add_argument_group( + g_motion_filter = parser.add_argument_group( title="Motion filtering parameters", description=( "These parameters enable and control a filter that will be applied to motion " @@ -388,7 +387,7 @@ def _build_parser(): help="Number of filter coeffecients for the motion parameter filter.", ) - g_censor = optional.add_argument_group("Censoring and scrubbing options") + g_censor = parser.add_argument_group("Censoring and scrubbing options") g_censor.add_argument( "-r", "--head-radius", @@ -437,7 +436,7 @@ def _build_parser(): """, ) - g_temporal_filter = optional.add_argument_group( + g_temporal_filter = parser.add_argument_group( title="Data filtering parameters", description=( "These parameters determine whether a bandpass filter will be applied to the BOLD " @@ -491,7 +490,7 @@ def _build_parser(): help="Number of filter coefficients for the Butterworth bandpass filter.", ) - g_parcellation = optional.add_argument_group("Parcellation options") + g_parcellation = parser.add_argument_group("Parcellation options") g_atlases = g_parcellation.add_mutually_exclusive_group(required=False) all_atlases = select_atlases(atlases=None, subset="all") @@ -529,7 +528,7 @@ def _build_parser(): ), ) - g_dcan = optional.add_argument_group("abcd/hbcd mode options") + g_dcan = parser.add_argument_group("abcd/hbcd mode options") g_dcan.add_argument( "--create-matrices", "--create_matrices", @@ -571,7 +570,7 @@ def _build_parser(): """, ) - g_linc = optional.add_argument_group("linc mode options") + g_linc = parser.add_argument_group("linc mode options") g_linc.add_argument( "--abcc-qc", "--abcc_qc", @@ -586,7 +585,7 @@ def _build_parser(): """, ) - g_other = optional.add_argument_group("Other options") + g_other = parser.add_argument_group("Other options") g_other.add_argument( "--aggregate-session-reports", dest="aggr_ses_reports", @@ -703,7 +702,7 @@ def _build_parser(): ), ) - g_experimental = optional.add_argument_group("Experimental options") + g_experimental = parser.add_argument_group("Experimental options") g_experimental.add_argument( "--warp-surfaces-native2std", @@ -723,8 +722,6 @@ def _build_parser(): **IMPORTANT**: This parameter can only be run if the --file-format flag is set to cifti. """, ) - # Add the optional parameters back in - parser._action_groups.append(optional) latest = check_latest() if latest is not None and currentv < latest: diff --git a/xcp_d/utils/boilerplate.py b/xcp_d/utils/boilerplate.py index aafb388f1..892321a40 100644 --- a/xcp_d/utils/boilerplate.py +++ b/xcp_d/utils/boilerplate.py @@ -261,7 +261,10 @@ def describe_atlases(atlases): "Gordon": "the Gordon atlas [@Gordon_2014]", "Tian": "the Tian subcortical atlas [@tian2020topographic]", "HCP": "the HCP CIFTI subcortical atlas [@glasser2013minimal]", - "MIDB": "the MIDB precision brain atlas [@hermosillo2022precision]", + "MIDB": ( + "the MIDB precision brain atlas derived from ABCD data and thresholded at 75% " + "probability [@hermosillo2022precision]" + ), "MyersLabonte": ( "the Myers-Labonte infant atlas thresholded at 50% probability [@myers2023functional]" ),