Skip to content

Commit

Permalink
Switch data_source.py to modern tool-provided metadata
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wm75 committed Feb 8, 2024
1 parent c554023 commit bd0f257
Show file tree
Hide file tree
Showing 26 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion tools/data_source/biomart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="BioMart" id="biomart" tool_type="data_source" version="1.0.1">
<tool name="BioMart" id="biomart" tool_type="data_source" version="1.0.1" profile="20.09">
<description>Ensembl server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/biomart_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="BioMart" id="biomart_test" tool_type="data_source" version="1.0.1">
<tool name="BioMart" id="biomart_test" tool_type="data_source" version="1.0.1" profile="20.09">
<description>Test server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/cbi_rice_mart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="CBI Rice Mart" id="cbi_rice_mart" tool_type="data_source" version="1.0.1">
<tool name="CBI Rice Mart" id="cbi_rice_mart" tool_type="data_source" version="1.0.1" profile="20.09">
<description>rice mart</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
5 changes: 3 additions & 2 deletions tools/data_source/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/ebi_sra.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="EBI SRA" id="ebi_sra_main" tool_type="data_source" version="1.0.1">
<tool name="EBI SRA" id="ebi_sra_main" tool_type="data_source" version="1.0.1" profile="20.09">
<description>ENA SRA</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/eupathdb.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool name="EuPathDB" id="eupathdb" tool_type="data_source" url_method="post" version="1.0.0">
<tool name="EuPathDB" id="eupathdb" tool_type="data_source" url_method="post" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/fly_modencode.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="modENCODE fly" id="modENCODEfly" tool_type="data_source" version="1.0.1">
<tool name="modENCODE fly" id="modENCODEfly" tool_type="data_source" version="1.0.1" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/flymine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="Flymine" id="flymine" tool_type="data_source" version="1.0.0">
<tool name="Flymine" id="flymine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/flymine_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="Flymine test" id="flymine_test" tool_type="data_source" version="1.0.0">
<tool name="Flymine test" id="flymine_test" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/gramene_mart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="GrameneMart" id="gramenemart" tool_type="data_source" version="1.0.1">
<tool name="GrameneMart" id="gramenemart" tool_type="data_source" version="1.0.1" profile="20.09">
<description> Central server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/hapmapmart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="HapMapMart" id="hapmapmart" tool_type="data_source" version="0.0.01">
<tool name="HapMapMart" id="hapmapmart" tool_type="data_source" version="0.0.01" profile="20.09">
<description>HapMap Biomart</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/hbvar.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="HbVar" id="hbvar" tool_type="data_source" version="2.0.0">
<tool name="HbVar" id="hbvar" tool_type="data_source" version="2.0.0" profile="20.09">
<description>Human Hemoglobin Variants and Thalassemias</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/intermine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="InterMine" id="intermine" tool_type="data_source" version="1.0.0">
<tool name="InterMine" id="intermine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/metabolicmine.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="metabolicMine" id="metabolicmine" tool_type="data_source" version="1.0.0">
<tool name="metabolicMine" id="metabolicmine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/modmine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="modENCODE modMine" id="modmine" tool_type="data_source" version="1.0.0">
<tool name="modENCODE modMine" id="modmine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/mousemine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="MouseMine" id="mousemine" tool_type="data_source" version="1.0.0">
<tool name="MouseMine" id="mousemine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/ratmine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="Ratmine" id="ratmine" tool_type="data_source" version="1.0.0">
<tool name="Ratmine" id="ratmine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/sra.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool name="SRA" id="sra_source" tool_type="data_source" version="1.0.1" profile="16.04">
<tool name="SRA" id="sra_source" tool_type="data_source" version="1.0.1" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/ucsc_tablebrowser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="UCSC Main" id="ucsc_table_direct1" tool_type="data_source" version="1.0.0">
<tool name="UCSC Main" id="ucsc_table_direct1" tool_type="data_source" version="1.0.0" profile="20.09">
<description>table browser</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/ucsc_tablebrowser_archaea.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="UCSC Archaea" id="ucsc_table_direct_archaea1" tool_type="data_source" version="1.0.0">
<tool name="UCSC Archaea" id="ucsc_table_direct_archaea1" tool_type="data_source" version="1.0.0" profile="20.09">
<description>table browser</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/ucsc_tablebrowser_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<tool name="UCSC Test" id="ucsc_table_direct_test1" tool_type="data_source" version="1.0.1">
<tool name="UCSC Test" id="ucsc_table_direct_test1" tool_type="data_source" version="1.0.1" profile="20.09">
<description>table browser</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/worm_modencode.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="modENCODE worm" id="modENCODEworm" tool_type="data_source" version="1.0.1">
<tool name="modENCODE worm" id="modENCODEworm" tool_type="data_source" version="1.0.1" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/wormbase.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="WormBase" id="wormbase" tool_type="data_source" version="1.0.1">
<tool name="WormBase" id="wormbase" tool_type="data_source" version="1.0.1" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/wormbase_test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="Wormbase" id="wormbase_test" tool_type="data_source" version="1.0.0">
<tool name="Wormbase" id="wormbase_test" tool_type="data_source" version="1.0.0" profile="20.09">
<description>test server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/yeastmine.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="YeastMine" id="yeastmine" tool_type="data_source" version="1.0.0">
<tool name="YeastMine" id="yeastmine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down
2 changes: 1 addition & 1 deletion tools/data_source/zebrafishmine.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool name="ZebrafishMine" id="zebrafishmine" tool_type="data_source" version="1.0.0">
<tool name="ZebrafishMine" id="zebrafishmine" tool_type="data_source" version="1.0.0" profile="20.09">
<description>server</description>
<edam_operations>
<edam_operation>operation_0224</edam_operation>
Expand Down

0 comments on commit bd0f257

Please sign in to comment.