comparison data_manager/kma_build_index.py @ 2:2c532a6eee3f draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kma_index/ commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author iuc
date Sun, 22 Nov 2020 12:45:39 +0000
parents 8c2e674a93bb
children
comparison
equal deleted inserted replaced
1:8c2e674a93bb 2:2c532a6eee3f
45 45
46 return data_table_entry 46 return data_table_entry
47 47
48 48
49 def main(args): 49 def main(args):
50 50 with open(args.data_manager_json) as fh:
51 data_manager_input = json.loads(open(args.data_manager_json).read()) 51 data_manager_input = json.load(fh)
52 52
53 target_directory = data_manager_input['output_data'][0]['extra_files_path'] 53 target_directory = data_manager_input['output_data'][0]['extra_files_path']
54 54
55 try: 55 try:
56 os.mkdir(target_directory) 56 os.mkdir(target_directory)
76 kma_index_args, 76 kma_index_args,
77 args.index_name, 77 args.index_name,
78 target_directory, 78 target_directory,
79 ) 79 )
80 80
81 open(args.data_manager_json, 'w').write(json.dumps(data_manager_output)) 81 with open(args.data_manager_json, 'w') as fh:
82 json.dump(data_manager_output, fh, sort_keys=True)
82 83
83 84
84 if __name__ == "__main__": 85 if __name__ == "__main__":
85 parser = argparse.ArgumentParser() 86 parser = argparse.ArgumentParser()
86 parser.add_argument('data_manager_json') 87 parser.add_argument('data_manager_json')