【发布时间】:2020-06-15 15:53:20
【问题描述】:
我在我的脚本中使用以下 args 和 docopt
Usage:
GaussianMixture.py --snpList=File --callingRAC=File
Options:
-h --help Show help.
snpList list snp txt
callingRAC results snp
我想添加一个对我的脚本有条件结果的参数:更正我的数据或不更正我的数据。类似的东西:
Usage:
GaussianMixture.py --snpList=File --callingRAC=File correction(--0 | --1)
Options:
-h --help Show help.
snpList list snp txt
callingRAC results snp
correction 0 : without correction | 1 : with correction
我想在我的脚本中的某些函数中添加if
def func1():
if args[correction] == 0:
datas = non_corrected_datas
if args[correction] == 1:
datas = corrected_datas
但我不知道如何在我的脚本中使用它。
【问题讨论】: