Repository 'data_manager_metaphlan2_database_downloader'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/data_manager_metaphlan2_database_downloader

Changeset 1:83f07f40b200 (2020-11-22)
Previous changeset 0:9c4ad82be5bd (2017-03-04)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_metaphlan2_database_downloader commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
modified:
data_manager/data_manager_metaphlan2_download.py
b
diff -r 9c4ad82be5bd -r 83f07f40b200 data_manager/data_manager_metaphlan2_download.py
--- a/data_manager/data_manager_metaphlan2_download.py Sat Mar 04 12:11:20 2017 -0500
+++ b/data_manager/data_manager_metaphlan2_download.py Sun Nov 22 12:51:11 2020 +0000
[
@@ -24,7 +24,8 @@
     to create it if necessary.
 
     """
-    params = json.loads(open(jsonfile).read())
+    with open(jsonfile) as fh:
+        params = json.load(fh)
     return (params['param_dict'],
             params['output_data'][0]['extra_files_path'])
 
@@ -36,7 +37,7 @@
 # >>> add_data_table(d,'my_data')
 # >>> add_data_table_entry(dict(dbkey='hg19',value='human'))
 # >>> add_data_table_entry(dict(dbkey='mm9',value='mouse'))
-# >>> print str(json.dumps(d))
+# >>> print(json.dumps(d))
 def create_data_tables_dict():
     """Return a dictionary for storing data table information
 
@@ -144,7 +145,6 @@
 
     # Write output JSON
     print("Outputting JSON")
-    print(str(json.dumps(data_tables)))
-    with open(jsonfile, 'wb') as out:
-        out.write(json.dumps(data_tables))
+    with open(jsonfile, 'w') as fh:
+        json.dump(data_tables, fh, sort_keys=True)
     print("Done.")