Mercurial > repos > devteam > data_manager_picard_index_builder
changeset 4:e1a567161eab draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_picard_index_builder commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author | iuc |
---|---|
date | Sun, 22 Nov 2020 12:52:20 +0000 |
parents | ae080ff506fd |
children | 7124d2c14e4b |
files | data_manager/picard_index_builder.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/picard_index_builder.py Mon Feb 03 17:27:33 2020 -0500 +++ b/data_manager/picard_index_builder.py Sun Nov 22 12:52:20 2020 +0000 @@ -2,11 +2,11 @@ # Dan Blankenberg from __future__ import print_function +import json import optparse import os import subprocess import sys -from json import dumps, loads DEFAULT_DATA_TABLE_NAME = "picard_indexes" @@ -58,7 +58,8 @@ filename = args[0] - params = loads(open(filename).read()) + with open(filename) as fh: + params = json.load(fh) target_directory = params['output_data'][0]['extra_files_path'] os.mkdir(target_directory) data_manager_dict = {} @@ -75,7 +76,8 @@ sequence_name, data_table_name=options.data_table_name or DEFAULT_DATA_TABLE_NAME) # save info to json file - open(filename, 'w').write(dumps(data_manager_dict, sort_keys=True)) + with open(filename, 'w') as fh: + json.dump(data_manager_dict, fh, sort_keys=True) if __name__ == "__main__":