Mercurial > repos > devteam > data_manager_build_kraken_database
changeset 10:1e701a731d48 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken_database/ commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author | iuc |
---|---|
date | Sun, 22 Nov 2020 12:41:47 +0000 |
parents | c668a45d8a55 |
children | f9a21d6dfe2c |
files | data_manager/make_json.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/make_json.py Tue Aug 18 15:35:38 2020 +0000 +++ b/data_manager/make_json.py Sun Nov 22 12:41:47 2020 +0000 @@ -10,14 +10,15 @@ data_manager_entry['name'] = args.database data_manager_entry['path'] = '.' data_manager_json = dict(data_tables=dict(kraken_databases=data_manager_entry)) - params = json.loads(open(args.output).read()) + with open(args.output) as fh: + params = json.load(fh) target_directory = params['output_data'][0]['extra_files_path'] os.mkdir(target_directory) output_path = os.path.join(os.getcwd(), 'kraken-database') for filename in os.listdir(output_path): shutil.move(os.path.join(output_path, filename), target_directory) - with open(args.output, 'w') as out: - out.write(json.dumps(data_manager_json, sort_keys=True)) + with open(args.output, 'w') as fh: + json.dump(data_manager_json, fh, sort_keys=True) if __name__ == '__main__':