changeset 6:fa8c605bf385 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_picard_index_builder commit 096286097ed5cdf189a1b68c3fc34d10f4142e54
author iuc
date Sun, 16 Apr 2023 08:28:16 +0000
parents acaa6719a478
children
files data_manager/picard_index_builder.py data_manager_conf.xml
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/picard_index_builder.py	Mon Feb 03 22:27:13 2020 +0000
+++ b/data_manager/picard_index_builder.py	Sun Apr 16 08:28:16 2023 +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__":
--- a/data_manager_conf.xml	Mon Feb 03 22:27:13 2020 +0000
+++ b/data_manager_conf.xml	Sun Apr 16 08:28:16 2023 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <data_managers>
 
-    <data_manager tool_file="data_manager/picard_index_builder.xml" id="picard_index_builder" version="0.0.1">
+    <data_manager tool_file="data_manager/picard_index_builder.xml" id="picard_index_builder">
         <data_table name="picard_indexes">
             <output>
                 <column name="value" />