comparison data_manager/data_manager.py @ 2:4af4e175db0d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_ncbi_taxonomy/ commit 04825a097d217d30deb5fcb6906fe718023e25b6"
author iuc
date Tue, 28 Apr 2020 03:57:59 -0400
parents 926847693e4d
children bdd8632fa9fb
comparison
equal deleted inserted replaced
1:926847693e4d 2:4af4e175db0d
54 target_directory = params['output_data'][0]['extra_files_path'] 54 target_directory = params['output_data'][0]['extra_files_path']
55 os.mkdir(target_directory) 55 os.mkdir(target_directory)
56 output_path = os.path.abspath(os.path.join(os.getcwd(), 'taxonomy')) 56 output_path = os.path.abspath(os.path.join(os.getcwd(), 'taxonomy'))
57 for filename in os.listdir(workdir): 57 for filename in os.listdir(workdir):
58 shutil.move(os.path.join(output_path, filename), target_directory) 58 shutil.move(os.path.join(output_path, filename), target_directory)
59 file(args.output, 'w').write(json.dumps(data_manager_json)) 59 with open(args.output, 'w') as out:
60 out.write(json.dumps(data_manager_json, sort_keys=True))
60 61
61 62
62 if __name__ == '__main__': 63 if __name__ == '__main__':
63 parser = argparse.ArgumentParser(description='Create data manager json.') 64 parser = argparse.ArgumentParser(description='Create data manager json.')
64 parser.add_argument('--out', dest='output', action='store', help='JSON filename') 65 parser.add_argument('--out', dest='output', action='store', help='JSON filename')