Skip to content

Commit

Permalink
Fix up documentation (PennLINC#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Jul 22, 2024
1 parent ee11c23 commit 08717be
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
7 changes: 5 additions & 2 deletions docs/outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
29 changes: 13 additions & 16 deletions xcp_d/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 "
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion xcp_d/utils/boilerplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
),
Expand Down

0 comments on commit 08717be

Please sign in to comment.