diff erecord_file.xml @ 0:27e7e4d38e44 draft

planemo upload for repository https://forgemia.inra.fr/nathalie.rousse/erecord-deploy/-/tree/main/galaxy-tools/erecord_file commit 88beb443a737b4c4d42bb0011a26a0acf535c366
author siwaa
date Tue, 12 Dec 2023 17:33:05 +0000
parents
children 9f7e56f56079
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/erecord_file.xml	Tue Dec 12 17:33:05 2023 +0000
@@ -0,0 +1,201 @@
+<tool id="erecord_file" name="erecord_file" version="1.0.0">
+
+  <description>erecord returning .json + maybe .zip or .xls</description>
+
+  <requirements>
+
+    <!-- singularity -->
+    <container type="singularity">oras://registry.forgemia.inra.fr/nathalie.rousse/erecord-deploy/erecord_rep0_vle2:82d8fea607be20851e194828125785fb0f7e96d0</container>
+
+  </requirements>
+
+  <command detect_errors="aggressive">
+    <![CDATA[
+
+    echo "action_name VAUT $request_condition.action_name";
+    #if $request_condition.action_name == 'post_vpz_experiment':
+        /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder} -experimentfile ${experimentfile}";
+    #elif $request_condition.action_name == 'post_vpz_report':
+        /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
+    #elif $request_condition.action_name == 'post_vpz_output':
+        /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
+    #elif $request_condition.action_name == 'post_vpz_inout':
+        /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json} -datafolder ${datafolder}";
+    #else:
+        /bin/bash -c "python3 $__tool_directory__/main_file.py -action ${request_condition.action_name} -data ${input_json}";
+    #end if
+
+    cp WS/OUT/output.json ${output_json};
+
+    #if $request_condition.action_name == 'get_vpz_experiment':
+        cp WS/OUT/experiment.xls ${experiment};
+    #elif $request_condition.action_name == 'post_vpz_experiment':
+        cp WS/OUT/experiment.xls ${experiment};
+    #elif $request_condition.action_name == 'get_vpz_report_conditions':
+        cp WS/OUT/conditions.xls ${conditions};
+    #elif $request_condition.action_name == 'post_vpz_report_conditions':
+        cp WS/OUT/conditions.xls ${conditions};
+    #elif $request_condition.action_name == 'get_vpz_report':
+        cp WS/OUT/report.zip ${report};
+    #elif $request_condition.action_name == 'post_vpz_report':
+        cp WS/OUT/report.zip ${report};
+    #end if
+
+    ]]>
+  </command>
+
+  <inputs>
+
+    <param name="input_json" optional="true" type="data" format="json"
+           label="Input json file"/>
+
+    <conditional name="request_condition">
+
+      <param name="action_name" type="select" label="Select action">
+          <option value="help" selected="true">help</option>
+          <option value="get_pkg_list">get_pkg_list</option>
+          <option value="get_pkg_vpz_list">get_pkg_vpz_list</option>
+          <option value="get_pkg_data_list">get_pkg_data_list</option>
+          <option value="get_vpz_input">get_vpz_input</option>
+          <option value="post_vpz_input">post_vpz_input</option>
+          <option value="get_vpz_output">get_vpz_output</option>
+          <option value="post_vpz_output">post_vpz_output</option>
+          <option value="get_vpz_inout">get_vpz_inout</option>
+          <option value="post_vpz_inout">post_vpz_inout</option>
+          <option value="get_vpz_experiment">get_vpz_experiment</option>
+          <option value="post_vpz_experiment">post_vpz_experiment</option>
+          <option value="get_vpz_report">get_vpz_report</option>
+          <option value="post_vpz_report">post_vpz_report</option>
+          <option value="get_vpz_report_conditions">get_vpz_report_conditions</option>
+          <option value="post_vpz_report_conditions">post_vpz_report_conditions</option>
+      </param>
+
+      <when value="post_vpz_experiment">
+            
+          <param name="experimentfile" type="data" format="csv,xls"
+                 label="Add a experiment xls (csv) file"
+                 help="experimentfile from gest_vpz_experiment + modifications"/>
+          <param name="datafolder" optional="true" type="data" format="zip"
+                 label="Add a datafolder zip file"
+                 help="Precisions sur forme du dossier..."/>
+      </when>
+
+      <when value="post_vpz_report">
+          <param name="datafolder" optional="true" type="data" format="zip"
+                 label="Add a datafolder zip file"
+                 help="Precisions sur forme du dossier..."/>
+      </when>
+      <when value="post_vpz_output">
+          <param name="datafolder" optional="true" type="data" format="zip"
+                 label="Add a datafolder zip file"
+                 help="Precisions sur forme du dossier..."/>
+      </when>
+      <when value="post_vpz_inout">
+          <param name="datafolder" optional="true" type="data" format="zip"
+                 label="Add a datafolder zip file"
+                 help="Precisions sur forme du dossier..."/>
+      </when>
+
+      <when value="get_vpz_experiment" />
+      <when value="get_vpz_report_conditions" />
+      <when value="post_vpz_report_conditions"/>
+      <when value="get_vpz_report" />
+      <when value="get_vpz_input" />
+      <when value="post_vpz_input" />
+      <when value="get_vpz_output" />
+      <when value="get_vpz_inout" />
+      <when value="get_pkg_list" />
+      <when value="get_pkg_vpz_list" />
+      <when value="get_pkg_data_list" />
+      <when value="help" />
+
+    </conditional>
+
+  </inputs>
+
+  <outputs>
+
+    <data name="output_json" format="json" label="output_json"/>
+
+    <data name="experiment" format="xls" label="experiment">
+        <filter>request_condition['action_name'] == 'get_vpz_experiment' or request_condition['action_name'] == 'post_vpz_experiment'</filter>
+    </data>
+
+    <data name="conditions" format="xls" label="conditions.xls file">
+        <filter>request_condition['action_name'] == 'get_vpz_report_conditions' or request_condition['action_name'] == 'post_vpz_report_conditions'</filter>
+    </data>
+
+    <data name="report" format="zip" label="report">
+        <filter>request_condition['action_name'] == 'get_vpz_report' or request_condition['action_name'] == 'post_vpz_report'</filter>
+    </data>
+
+  </outputs>
+
+  <tests>
+  </tests>
+
+  <help><![CDATA[
+
+erecord_file.xml
+
+================
+
+Actions:
+
+-------
+
+- 'help'
+- 'get_pkg_list' 'get_pkg_vpz_list' 'get_pkg_data_list'
+- 'get_vpz_input' 'post_vpz_input'
+- 'get_vpz_output' 'post_vpz_output'
+- 'get_vpz_inout' 'post_vpz_inout'
+- 'get_vpz_experiment' 'post_vpz_experiment'
+- 'get_vpz_report_conditions' 'post_vpz_report_conditions'
+- 'get_vpz_report' 'post_vpz_report'
+
+Code:
+
+----
+
+- main_file.py
+
+Inputs:
+
+-------
+
+- action value (mandatory)
+
+- data json file (optional) (json file, param type="data")
+  An action value that would be into data would be ignored
+
+- experiment.xls (only in 'post_vpz_experiment' case)
+
+- datafolder (optional) (only in cases : 
+  'post_vpz_experiment', 'post_vpz_report', 'post_vpz_output', 'post_vpz_inout')
+
+Outputs:
+
+--------
+
+- data json file 
+
+- 1 other file (xls or zip) :
+  - if 'action' == get_vpz_experiment, post_vpz_experiment :
+    experiment.xls file
+  - if 'action' == get_vpz_report_conditions, post_vpz_report_conditions :
+    conditions.xls file
+  - if 'action' == get_vpz_report, post_vpz_report :
+    report.zip file
+
+Credits:
+
+--------
+
+-  Author: Nathalie Rousse nathalie.rousse@inrae.fr
+-  Copyright: INRAE
+
+  ]]>
+  </help>
+
+</tool>
+