- 论坛徽章:
- 0
|
本帖最后由 Agnes_ss 于 2014-12-02 16:12 编辑
- import os,sys,math,pickle
- import format_input
- def read_params(args):
- parser = argparse.ArgumentParser(description='LEfSe 1.0')
- parser.add_argument('input_file', metavar='INPUT_FILE', type=str, help="the input file")
- args = parser.parse_args()
-
- params = vars(args)
- if params['title'] == "": params['title'] = params['input_file'].split("/")[-1].split('.')[0]
- return params
- ...
- if __name__ == '__main__':
- #init()
- params = read_params(sys.argv)
- feats,cls,class_sl,subclass_sl,class_hierarchy = load_data(params['input_file'])
- ...
复制代码 报错如下:
NameError: global name 'argparse' is not defined
求解决啊! |
|