Skip to content

Commit

Permalink
[FIX] Correct manacc documentation and check for associated inputs (#754
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tsalo authored Jul 16, 2021
1 parent 2d6d91a commit d2c9e84
Showing 1 changed file with 12 additions and 5 deletions.
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

0 comments on commit d2c9e84

Please sign in to comment.