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

[FIX] Correct manacc documentation and check for associated inputs #754

Merged
merged 1 commit into from
Jul 16, 2021
Merged
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
17 changes: 12 additions & 5 deletions tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,21 @@ def _get_parser():
dest='ctab',
metavar='FILE',
type=lambda x: is_valid_file(parser, x),
help=('File containing a component table from which '
'to extract pre-computed classifications.'),
help=(
'File containing a component table from which '
'to extract pre-computed classifications. '
"Requires --mix."
),
default=None)
rerungrp.add_argument('--manacc',
dest='manacc',
metavar='INT',
type=int,
nargs='+',
help='List of manually accepted components.',
help=(
'List of manually accepted components. '
"Requires --ctab and --mix."
),
default=None)

return parser
Expand Down Expand Up @@ -311,6 +317,7 @@ def tedana_workflow(data, tes, out_dir='.', mask=None,
manacc : :obj:`list` of :obj:`int` or None, optional
List of manually accepted components. Can be a list of the components
numbers or None.
If provided, this parameter requires ``mixm`` and ``ctab`` to be provided as well.
Default is None.

Other Parameters
Expand Down Expand Up @@ -458,8 +465,8 @@ def tedana_workflow(data, tes, out_dir='.', mask=None,
if ctab and not mixm:
LGR.warning('Argument "ctab" requires argument "mixm".')
ctab = None
elif manacc is not None and not mixm:
LGR.warning('Argument "manacc" requires argument "mixm".')
elif manacc is not None and (not mixm or not ctab):
LGR.warning('Argument "manacc" requires arguments "mixm" and "ctab".')
manacc = None
elif manacc is not None:
# coerce to list of integers
Expand Down