Mercurial > repos > iuc > data_manager_gemini_database_downloader
comparison data_manager/data_manager_gemini_download.py @ 8:52b6a4d98009 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_gemini_database_downloader commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author | iuc |
---|---|
date | Sun, 22 Nov 2020 12:49:35 +0000 |
parents | 5bcf0e24f42c |
children | 27a6a256cd23 |
comparison
equal
deleted
inserted
replaced
7:5bcf0e24f42c | 8:52b6a4d98009 |
---|---|
14 yaml.dump(config, fo, allow_unicode=False, default_flow_style=False) | 14 yaml.dump(config, fo, allow_unicode=False, default_flow_style=False) |
15 | 15 |
16 | 16 |
17 def main(): | 17 def main(): |
18 today = datetime.date.today() | 18 today = datetime.date.today() |
19 params = json.loads(open(sys.argv[1]).read()) | 19 with open(sys.argv[1]) as fh: |
20 params = json.load(fh) | |
20 target_directory = params['output_data'][0]['extra_files_path'] | 21 target_directory = params['output_data'][0]['extra_files_path'] |
21 os.mkdir(target_directory) | 22 os.mkdir(target_directory) |
22 | 23 |
23 # Generate a minimal configuration file for GEMINI update | 24 # Generate a minimal configuration file for GEMINI update |
24 # to instruct the tool to download the annotation data into a | 25 # to instruct the tool to download the annotation data into a |
81 ] | 82 ] |
82 } | 83 } |
83 } | 84 } |
84 | 85 |
85 # ... and save it to the json results file | 86 # ... and save it to the json results file |
86 with open(sys.argv[1], 'w') as out: | 87 with open(sys.argv[1], 'w') as fh: |
87 out.write(json.dumps(data_manager_dict)) | 88 json.dump(data_manager_dict, fh, sort_keys=True) |
88 | 89 |
89 | 90 |
90 if __name__ == "__main__": | 91 if __name__ == "__main__": |
91 main() | 92 main() |