From bd0f25745296be6f23fa1203cf8f50991af9bb2f Mon Sep 17 00:00:00 2001 From: Wolfgang Maier Date: Thu, 8 Feb 2024 16:43:39 +0100 Subject: [PATCH] Switch data_source.py to modern tool-provided metadata Allows moving all data source tools using the script to profile 20.09. For more recent profiles data_source.py would have to work outside of Galaxy's Python environment. --- tools/data_source/biomart.xml | 2 +- tools/data_source/biomart_test.xml | 2 +- tools/data_source/cbi_rice_mart.xml | 2 +- tools/data_source/data_source.py | 5 +++-- tools/data_source/ebi_sra.xml | 2 +- tools/data_source/eupathdb.xml | 2 +- tools/data_source/fly_modencode.xml | 2 +- tools/data_source/flymine.xml | 2 +- tools/data_source/flymine_test.xml | 2 +- tools/data_source/gramene_mart.xml | 2 +- tools/data_source/hapmapmart.xml | 2 +- tools/data_source/hbvar.xml | 2 +- tools/data_source/intermine.xml | 2 +- tools/data_source/metabolicmine.xml | 2 +- tools/data_source/modmine.xml | 2 +- tools/data_source/mousemine.xml | 2 +- tools/data_source/ratmine.xml | 2 +- tools/data_source/sra.xml | 2 +- tools/data_source/ucsc_tablebrowser.xml | 2 +- tools/data_source/ucsc_tablebrowser_archaea.xml | 2 +- tools/data_source/ucsc_tablebrowser_test.xml | 2 +- tools/data_source/worm_modencode.xml | 2 +- tools/data_source/wormbase.xml | 2 +- tools/data_source/wormbase_test.xml | 2 +- tools/data_source/yeastmine.xml | 2 +- tools/data_source/zebrafishmine.xml | 2 +- 26 files changed, 28 insertions(+), 27 deletions(-) diff --git a/tools/data_source/biomart.xml b/tools/data_source/biomart.xml index b79a01f6048..b8b819e5580 100644 --- a/tools/data_source/biomart.xml +++ b/tools/data_source/biomart.xml @@ -7,7 +7,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> - + Ensembl server operation_0224 diff --git a/tools/data_source/biomart_test.xml b/tools/data_source/biomart_test.xml index 5334b94fbc2..b9932752058 100644 --- a/tools/data_source/biomart_test.xml +++ b/tools/data_source/biomart_test.xml @@ -7,7 +7,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> - + Test server operation_0224 diff --git a/tools/data_source/cbi_rice_mart.xml b/tools/data_source/cbi_rice_mart.xml index 99763f5f178..658df685448 100644 --- a/tools/data_source/cbi_rice_mart.xml +++ b/tools/data_source/cbi_rice_mart.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + rice mart operation_0224 diff --git a/tools/data_source/data_source.py b/tools/data_source/data_source.py index f97538074bf..a2f25986276 100644 --- a/tools/data_source/data_source.py +++ b/tools/data_source/data_source.py @@ -81,10 +81,11 @@ def __main__(): ext = sniff.handle_uploaded_dataset_file(cur_filename, datatypes_registry, ext=data_dict["ext"]) except Exception as e: sys.exit(str(e)) - info = dict(type="dataset", dataset_id=data_dict["dataset_id"], ext=ext) + + tool_provided_metadata = {out_data_name: {"ext": ext}} with open(params["job_config"]["TOOL_PROVIDED_JOB_METADATA_FILE"], "w") as json_file: - json.dump(info, json_file) + json.dump(tool_provided_metadata, json_file) if __name__ == "__main__": diff --git a/tools/data_source/ebi_sra.xml b/tools/data_source/ebi_sra.xml index 11dbf6eef9b..5a1e946b815 100644 --- a/tools/data_source/ebi_sra.xml +++ b/tools/data_source/ebi_sra.xml @@ -1,5 +1,5 @@ - + ENA SRA operation_0224 diff --git a/tools/data_source/eupathdb.xml b/tools/data_source/eupathdb.xml index 9cb410ccaa9..7fe82b76564 100644 --- a/tools/data_source/eupathdb.xml +++ b/tools/data_source/eupathdb.xml @@ -1,4 +1,4 @@ - + server operation_0224 diff --git a/tools/data_source/fly_modencode.xml b/tools/data_source/fly_modencode.xml index f5e776ab775..2bcd60015a4 100644 --- a/tools/data_source/fly_modencode.xml +++ b/tools/data_source/fly_modencode.xml @@ -1,5 +1,5 @@ - + server operation_0224 diff --git a/tools/data_source/flymine.xml b/tools/data_source/flymine.xml index 6928cc1fb04..f7b7a2abd0c 100644 --- a/tools/data_source/flymine.xml +++ b/tools/data_source/flymine.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/flymine_test.xml b/tools/data_source/flymine_test.xml index 899b73969c7..ef0524499b8 100644 --- a/tools/data_source/flymine_test.xml +++ b/tools/data_source/flymine_test.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/gramene_mart.xml b/tools/data_source/gramene_mart.xml index 64feef7dbec..7abf0b06d1f 100644 --- a/tools/data_source/gramene_mart.xml +++ b/tools/data_source/gramene_mart.xml @@ -7,7 +7,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> - + Central server operation_0224 diff --git a/tools/data_source/hapmapmart.xml b/tools/data_source/hapmapmart.xml index c43fa5761e0..5ad6e0ac795 100644 --- a/tools/data_source/hapmapmart.xml +++ b/tools/data_source/hapmapmart.xml @@ -11,7 +11,7 @@ TODO: Hack to get biomart to work - the 'add_to_URL' param can be eliminated when the Biomart team encodes URL prior to sending, meanwhile everything including and beyond the first '&' is truncated from URL. They said they'll let us know when this is fixed at their end. --> - + HapMap Biomart operation_0224 diff --git a/tools/data_source/hbvar.xml b/tools/data_source/hbvar.xml index 74f926e8c13..b6867850995 100644 --- a/tools/data_source/hbvar.xml +++ b/tools/data_source/hbvar.xml @@ -1,5 +1,5 @@ - + Human Hemoglobin Variants and Thalassemias operation_0224 diff --git a/tools/data_source/intermine.xml b/tools/data_source/intermine.xml index 6f574b9b598..89c8b95e730 100644 --- a/tools/data_source/intermine.xml +++ b/tools/data_source/intermine.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/metabolicmine.xml b/tools/data_source/metabolicmine.xml index 17e2c7a0535..be4f1c9dd4d 100644 --- a/tools/data_source/metabolicmine.xml +++ b/tools/data_source/metabolicmine.xml @@ -1,5 +1,5 @@ - + server operation_0224 diff --git a/tools/data_source/modmine.xml b/tools/data_source/modmine.xml index 3fd3bc9595f..b7c7ee6ab4f 100644 --- a/tools/data_source/modmine.xml +++ b/tools/data_source/modmine.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/mousemine.xml b/tools/data_source/mousemine.xml index 508811f9aac..bbda4c1aef8 100644 --- a/tools/data_source/mousemine.xml +++ b/tools/data_source/mousemine.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/ratmine.xml b/tools/data_source/ratmine.xml index 69aca47743c..4a33f08cc75 100644 --- a/tools/data_source/ratmine.xml +++ b/tools/data_source/ratmine.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + server operation_0224 diff --git a/tools/data_source/sra.xml b/tools/data_source/sra.xml index 31b014e01cf..07f01e5fed5 100644 --- a/tools/data_source/sra.xml +++ b/tools/data_source/sra.xml @@ -1,4 +1,4 @@ - + server operation_0224 diff --git a/tools/data_source/ucsc_tablebrowser.xml b/tools/data_source/ucsc_tablebrowser.xml index 928ff6498fe..19852ecf6fc 100644 --- a/tools/data_source/ucsc_tablebrowser.xml +++ b/tools/data_source/ucsc_tablebrowser.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + table browser operation_0224 diff --git a/tools/data_source/ucsc_tablebrowser_archaea.xml b/tools/data_source/ucsc_tablebrowser_archaea.xml index 62258145892..a1707e441a1 100644 --- a/tools/data_source/ucsc_tablebrowser_archaea.xml +++ b/tools/data_source/ucsc_tablebrowser_archaea.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + table browser operation_0224 diff --git a/tools/data_source/ucsc_tablebrowser_test.xml b/tools/data_source/ucsc_tablebrowser_test.xml index e90bc6d14cd..9782f8d2b41 100644 --- a/tools/data_source/ucsc_tablebrowser_test.xml +++ b/tools/data_source/ucsc_tablebrowser_test.xml @@ -4,7 +4,7 @@ the initial response. If value of 'URL_method' is 'post', any additional params coming back in the initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --> - + table browser operation_0224 diff --git a/tools/data_source/worm_modencode.xml b/tools/data_source/worm_modencode.xml index 1c6f4be9c74..519430bbb40 100644 --- a/tools/data_source/worm_modencode.xml +++ b/tools/data_source/worm_modencode.xml @@ -1,5 +1,5 @@ - + server operation_0224 diff --git a/tools/data_source/wormbase.xml b/tools/data_source/wormbase.xml index d279bdf7f76..a1657018ebe 100644 --- a/tools/data_source/wormbase.xml +++ b/tools/data_source/wormbase.xml @@ -1,5 +1,5 @@ - + server operation_0224 diff --git a/tools/data_source/wormbase_test.xml b/tools/data_source/wormbase_test.xml index 9e2e9609471..a9fb4e05d70 100644 --- a/tools/data_source/wormbase_test.xml +++ b/tools/data_source/wormbase_test.xml @@ -1,5 +1,5 @@ - + test server operation_0224 diff --git a/tools/data_source/yeastmine.xml b/tools/data_source/yeastmine.xml index 87ff7fdf73e..6a669cd33f6 100644 --- a/tools/data_source/yeastmine.xml +++ b/tools/data_source/yeastmine.xml @@ -1,5 +1,5 @@ - + server operation_0224 diff --git a/tools/data_source/zebrafishmine.xml b/tools/data_source/zebrafishmine.xml index 18c51fce213..c3296167776 100644 --- a/tools/data_source/zebrafishmine.xml +++ b/tools/data_source/zebrafishmine.xml @@ -1,5 +1,5 @@ - + server operation_0224