# HG changeset patch # User iuc # Date 1606049393 0 # Node ID a04cebcd77f4acba17d744ce503d0401b646a05c # Parent 8eac26f44d292027627967ec34963ecb012b84f6 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_hisat2_index_builder commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165" diff -r 8eac26f44d29 -r a04cebcd77f4 data_manager/hisat2_index_builder.py --- a/data_manager/hisat2_index_builder.py Mon Nov 18 17:22:30 2019 -0500 +++ b/data_manager/hisat2_index_builder.py Sun Nov 22 12:49:53 2020 +0000 @@ -3,11 +3,11 @@ from __future__ import print_function import argparse +import json import os import shlex import subprocess import sys -from json import dumps, loads DEFAULT_DATA_TABLE_NAME = "hisat2_indexes" @@ -66,7 +66,8 @@ filename = options.output - params = loads(open(filename).read()) + with open(filename) as fh: + params = json.load(fh) data_manager_dict = {} if options.fasta_dbkey in [None, '', '?']: @@ -78,7 +79,8 @@ build_hisat_index(data_manager_dict, options, params, sequence_id, sequence_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__":