def parse_args(
subparser: argparse.ArgumentParser,
script_desc: str,
common_args: argparse.ArgumentParser) -> argparse.ArgumentParser:
"""
Parse the command line arguments.
:param subparser: the subparser object.
:type subparser: argparse.ArgumentParser
:param script_desc: the description of the script.
:type script_desc: str
:param common_args: the common arguments.
:type common_args: argparse.ArgumentParser
:return: the parser.
:rtype: argparse.ArgumentParser
"""
parser = subparser.add_parser(
'yeast_min_responsive',
help=script_desc,
prog='yeast_min_responsive',
parents=[common_args]
)
parser.set_defaults(func=main)
parser.add_argument(
'--data_path_list',
nargs='+',
type=list,
help='A list of paths to expression dataframes',
required=True
)
parser.add_argument(
'--identifier_col_list',
nargs='+',
type=list,
help='A list of column names for the feature identifier '
'in each DataFrame',
required=True
)
parser.add_argument(
'--effect_col_list',
nargs='+',
type=list,
help='A list of column names for the effect in each DataFrame',
required=True
)
parser.add_argument(
'--effect_thres_list',
nargs='+',
type=list,
help='A list of effect thresholds in each DataFrame. '
'Enter `None` for no threshold on the effect for the dataframe '
'at the same index',
required=True
)
parser.add_argument(
'--pval_col_list',
nargs='+',
type=list,
help='A list of column names for the p-value in each DataFrame',
required=True
)
parser.add_argument(
'--pval_thres_list',
nargs='+',
type=list,
help='A list of p-value thresholds in each DataFrame. '
'Enter `None` for no threshold on the pvalue for the dataframe '
'at the same index',
required=True
)
return subparser