diff epost.xml @ 3:ae3a5d753d42 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit dae34e5e182b4cceb808d7353080f14aa9a78ca9"
author iuc
date Wed, 23 Sep 2020 09:51:06 +0000
parents 7d868844e952
children
line wrap: on
line diff
--- a/epost.xml	Wed Mar 11 03:59:36 2020 -0400
+++ b/epost.xml	Wed Sep 23 09:51:06 2020 +0000
@@ -6,29 +6,97 @@
   </macros>
   <expand macro="requirements"/>
   <version_command>python epost.py --version</version_command>
-  <command detect_errors="aggressive"><![CDATA[
-python '$__tool_directory__/epost.py'
-$db_select
+  <command detect_errors="aggressive">
+    <![CDATA[
+
+      python '$__tool_directory__/epost.py'
+
+      $db_select
+
+      @EMAIL_ARGUMENTS@
 
-@EMAIL_ARGUMENTS@
+      #if $query_source.qss == "id_file":
+        --id_list $query_source.id_file
+      #else if $query_source.qss == "id_list":
+        --id $query_source.id_list
+      #else if $query_source.qss == "id_xml":
+        --id_xml $query_source.id_xml
+      #else if $query_source.qss == "id_json":
+        --id_json $query_source.id_json
+      #end if
+
+      #if $update_history.history_type == "select" and $update_history.history_entry.history_select == "history_json":
+        --history_file "$update_history.history_entry.history_file"
+      #else if $update_history.history_type == "select" and $update_history.history_entry.history_select == "history_xml":
+        --history_xml "$update_history.history_entry.history_xml"
+      #else if $update_history.history_type == "paste":
+        --webenv "$update_history.webenv"
+      #end if
+
+      > $history
 
-@LIST_OR_HIST@
+    ]]>
+  </command>
+  <inputs>
+    <conditional name="query_source">
+      <param name="qss" type="select" label="Enter Query IDs by..." help="Files output by ELink or ESearch are acceptable.  Query IDs in an ELink result are ignored.">
+        <option value="id_file" selected="True">ID file (Tabular)</option>
+        <option value="id_xml">ID File (XML)</option>
+        <option value="id_json">ID File (JSON)</option>
+        <option value="id_list">Paste IDs</option>
+      </param>
+      <when value="id_file">
+        <param label="ID File (Text)" name="id_file" type="data" format="text,tabular" help="A Text file containing one ID per line"/>
+      </when>
+      <when value="id_xml">
+        <param label="ID File (XML)" name="id_xml" type="data" format="xml" help="ESearch or ELink Result XML file"/>
+      </when>
+      <when value="id_json">
+        <param label="ID File (JSON)" name="id_json" type="data" format="json" help="ESearch or ELink Result JSON file"/>
+      </when>
+      <when value="id_list">
+        <param label="Paste ID List" name="id_list" type="text" area="true" help="Newline/Comma separated list of IDs"/>
+      </when>
+    </conditional>
+
+    <expand macro="dbselect"/>
 
-> $history
-]]></command>
-  <inputs>
-    <expand macro="dbselect"/>
-    <expand macro="list_or_hist"/>
+    <conditional name="update_history">
+      <param name="history_type" type="select" label="Target History" help="IDs will be saved to a supplied or created history.">
+        <option value="create" selected="True">Create a new history</option>
+        <option value="select">Add to an existing history by file</option>
+        <option value="paste">Add to an existing history by history (WebEnv) ID</option>
+      </param>
+      <when value="create"/>
+      <when value="select">
+        <conditional name="history_entry">
+          <param name="history_select" type="select" label="Select an existing history">
+            <option value="history_json">History File (JSON)</option>
+            <option value="history_xml">History File (XML)</option>
+          </param>
+          <when value="history_json">
+            <param label="History File (JSON)" name="history_file" type="data" format="json" help="A JSON file containing the WebEnv ID referencing the history on the NCBI history server to which to add the IDs"/>
+          </when>
+          <when value="history_xml">
+            <param label="History File (XML)" name="history_xml" type="data" format="xml" help="An XML file containing the WebEnv ID referencing the history on the NCBI history server to which to add the IDs"/>
+          </when>
+        </conditional>
+      </when>
+      <when value="paste">
+        <param name="webenv" type="text" label="WebEnv History ID"/>
+      </when>
+    </conditional>
   </inputs>
   <outputs>
-    <expand macro="history_out"/>
+    <data format="json" name="history" label="NCBI History"/>
   </outputs>
   <tests>
     <test>
       <param name="db_select" value="nuccore"/>
       <param name="qss" value="id_list"/>
       <param name="id_list" value="126697566"/>
-      <output name="history" file="example.history.json" compare="sim_size" delta="10" ftype="json"/>
+      <param name="history_type" value="create"/>
+      <output name="history" file="example.history.json" compare="sim_size" delta="70" ftype="json"/>
     </test>
   </tests>
   <help><![CDATA[