comparison data_manager/make_json.py @ 8:1d616842e1db draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken_database/ commit 8b77954efb8d46dfb3bec5421819076f3757ad06"
author iuc
date Sun, 26 Jan 2020 14:34:23 +0000
parents 6f0294046f41
children 1e701a731d48
comparison
equal deleted inserted replaced
7:5b0724200665 8:1d616842e1db
14 target_directory = params['output_data'][0]['extra_files_path'] 14 target_directory = params['output_data'][0]['extra_files_path']
15 os.mkdir(target_directory) 15 os.mkdir(target_directory)
16 output_path = os.path.join(os.getcwd(), 'kraken-database') 16 output_path = os.path.join(os.getcwd(), 'kraken-database')
17 for filename in os.listdir(output_path): 17 for filename in os.listdir(output_path):
18 shutil.move(os.path.join(output_path, filename), target_directory) 18 shutil.move(os.path.join(output_path, filename), target_directory)
19 file(args.output, 'w').write(json.dumps(data_manager_json)) 19 with open(args.output, 'w') as out:
20 out.write(json.dumps(data_manager_json, sort_keys=True))
20 21
21 22
22 if __name__ == '__main__': 23 if __name__ == '__main__':
23 parser = argparse.ArgumentParser(description='Create data manager json.') 24 parser = argparse.ArgumentParser(description='Create data manager json.')
24 parser.add_argument('--db', dest='database', action='store', help='Database name') 25 parser.add_argument('--db', dest='database', action='store', help='Database name')