我在docopt中为脚本使用以下参数
Usage:
GaussianMixture.py --snpList=File --callingRAC=File
Options:
-h --help Show help.
snpList list snp txt
callingRAC results snp
我想添加一个对脚本有条件结果的参数:correct my datas or don't correct my datas。比如:
^{pr2}$我想在我的脚本中添加一个if
在一些函数中
def func1():
if args[correction] == 0:
datas = non_corrected_datas
if args[correction] == 1:
datas = corrected_datas
但是我不知道怎么写,也不知道怎么写。在
谢谢你的帮助
编辑: 我最初的回答并没有考虑到OP要求更正是强制性的。我最初的回答中的语法不正确。下面是一个经过测试的工作示例:
请告诉我这对你是否有用。在
相关问题 更多 >
编程相关推荐