diff elink.xml @ 3:55b3067762f9 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:50:37 +0000
parents 1ed9a99b9b1f
children 9b628ed09553
line wrap: on
line diff
--- a/elink.xml	Wed Mar 11 04:02:10 2020 -0400
+++ b/elink.xml	Wed Sep 23 09:50:37 2020 +0000
@@ -8,73 +8,103 @@
   <version_command>python elink.py --version</version_command>
   <command detect_errors="aggressive"><![CDATA[
 python '$__tool_directory__/elink.py'
-#if $cmd.cmd_select in ('neighbor', 'neighbor_score', 'neighbor_history'):
-    $cmd.db_select_to
-#else:
-    "none"
-#end if
 
-$db_select_from
-$cmd.cmd_select
+@LINK_TOKEN@
 
 @EMAIL_ARGUMENTS@
 
 @LIST_OR_HIST@
 
-#if $cmd.cmd_select == "neighbor_history":
-    --history_out $history
-#end if
-
 > $default]]></command>
   <inputs>
-    <expand macro="dbselect" name="db_select_from" label="From NCBI Database" />
-    <conditional name="cmd">
-      <param name="cmd_select" type="select" label="ELink command to execute">
-        <option value="neighbor">Neighbor: Fetch a set of UIDs in DB linked to input UIDs in DBFROM</option>
-        <option value="neighbor_score">Scored Neighbors: Fetch a set of UIDs within the same database as the input UIDs along with computed similarity scores</option>
-        <option value="neighbor_history">Neighbor (history): Fetch a set of UIDs in DB linked to input UIDs from DBFROM, and store on history server</option>
-        <option value="acheck">ACheck: List all links available from a set of UIDs</option>
-        <option value="ncheck">NCheck: Check for the existence of links within the same database for a set of UIDs</option>
-        <option value="lcheck">LCheck: Check for the existence of external links (LinkOuts) for a set of UIDs</option>
-        <option value="llinks">Links: For each input UID, list the URLs and attributes for the LinkOut providers that are not libraries</option>
-        <option value="llinkslib">LinksLib: For each input UID, list the URLs and attributes for the LinkOut providers (including libraries)</option>
-        <option value="prlinks">Provider Links: List the primary LinkOut provider for each input UID</option>
-      </param>
-      <when value="neighbor">
-        <expand macro="dbselect" name="db_select_to" label="To NCBI Database" />
-      </when>
-      <when value="neighbor_score">
-        <expand macro="dbselect" name="db_select_to" label="To NCBI Database" />
-      </when>
-      <when value="neighbor_history">
-        <expand macro="dbselect" name="db_select_to" label="To NCBI Database" />
-      </when>
-      <when value="acheck">
-        <expand macro="dbselect" name="db_select_to" label="To NCBI Database" />
-      </when>
-      <when value="ncheck"/>
-      <when value="lcheck"/>
-      <when value="llinks"/>
-      <when value="llinkslib"/>
-      <when value="prlinks"/>
-    </conditional>
     <expand macro="list_or_hist"/>
+    <expand macro="linkmacro"/>
   </inputs>
   <outputs>
-    <data format="xml" name="default" label="NCBI Linked IDs from $db_select_from"/>
-    <expand macro="history_out">
-      <filter>cmd['cmd_select'] == 'neighbor_history'</filter>
-    </expand>
+    <data format="xml" name="default" label="NCBI ${cmd.cmd_select} Links From ${cmd.db_from_link.db_select_from_link} To ${cmd.db_from_link.db_to.db_select_to} Via ${cmd.db_from_link.db_to.linkname}">
+      <change_format>
+        <when input="cmd.output_format" value="xml" format="xml" />
+        <when input="cmd.output_format" value="json" format="json" />
+        <when input="cmd.output_format" value="text" format="tabular" />
+      </change_format>
+      <filter>query_source['qss'] != 'history_json' and query_source['qss'] != 'history_xml'</filter>
+    </data>
+    <collection name="linksets" type="list" label="NCBI ${cmd.cmd_select} Links From ${cmd.db_from_link.db_select_from_link} To ${cmd.db_from_link.db_to.db_select_to} Via All">
+      <discover_datasets pattern="__designation_and_ext__" directory="downloads"/>
+      <filter>query_source['qss'] == 'history_json' or query_source['qss'] == 'history_xml'</filter>
+    </collection>
   </outputs>
   <tests>
     <test>
       <param name="cmd_select" value="neighbor"/>
       <param name="db_select_to" value="pubmed"/>
-      <param name="db_select_from" value="taxonomy"/>
+      <param name="db_select_from_link" value="taxonomy"/>
       <param name="qss" value="id_list"/>
       <param name="id_list" value="510899"/>
+      <param name="output_format" value="xml"/>
+      <param name="linkname" value="None"/>
       <output name="default" file="pm-tax-neighbor.xml" ftype="xml"/>
     </test>
+    <test>
+      <param name="cmd_select" value="neighbor"/>
+      <param name="db_select_to" value="nuccore"/>
+      <param name="db_select_from_link" value="gene"/>
+      <param name="qss" value="id_xml"/>
+      <param name="id_xml" value="elink.esearch_in_xmlid.xml"/>
+      <param name="output_format" value="text"/>
+      <param name="linkname" value="gene_nuccore"/>
+      <output name="default" file="elink.esearch_in_xmlid_1link.tabular" ftype="tabular"/>
+    </test>
+    <test>
+      <param name="cmd_select" value="neighbor"/>
+      <param name="db_select_to" value="nuccore"/>
+      <param name="db_select_from_link" value="gene"/>
+      <param name="qss" value="id_json"/>
+      <param name="id_json" value="elink.esearchin_id.json"/>
+      <param name="output_format" value="json"/>
+      <param name="linkname" value="None"/>
+      <output name="default" file="elink.esearchin_id_alllinks.json" ftype="json"/>
+    </test>
+    <test>
+      <param name="cmd_select" value="neighbor"/>
+      <param name="db_select_to" value="nuccore"/>
+      <param name="db_select_from_link" value="gene"/>
+      <param name="qss" value="id_file"/>
+      <param name="id_file" value="elink.esearchin_id.tabular"/>
+      <param name="output_format" value="xml"/>
+      <param name="linkname" value="gene_nuccore_refseqrna"/>
+      <output name="default" file="elink.esearchin_id_1link.xml" ftype="xml"/>
+    </test>
+    <test>
+      <param name="cmd_select" value="neighbor_history"/>
+      <param name="db_select_to" value="gene"/>
+      <param name="db_select_from_link" value="nuccore"/>
+      <param name="qss" value="id_json"/>
+      <param name="id_json" value="elink.elinkin_1link.json"/>
+      <param name="output_format" value="json"/>
+      <param name="linkname" value="nuccore_gene"/>
+      <output name="default" file="elink.elinkin_1link_hist.json" ftype="json" lines_diff="2"/>
+    </test>
+    <test>
+      <param name="cmd_select" value="neighbor_history"/>
+      <param name="db_select_to" value="gene"/>
+      <param name="db_select_from_link" value="nuccore"/>
+      <param name="qss" value="id_xml"/>
+      <param name="id_xml" value="elink.elinkin_alllinks_id.xml"/>
+      <param name="output_format" value="xml"/>
+      <param name="linkname" value="nuccore_gene"/>
+      <output name="default" file="elink.elinkin_allalllinks_id.xml" ftype="xml" lines_diff="2"/>
+    </test>
+    <test>
+      <param name="cmd_select" value="neighbor_score"/>
+      <param name="db_select_to" value="gene"/>
+      <param name="db_select_from_link" value="nuccore"/>
+      <param name="qss" value="id_list"/>
+      <param name="id_list" value="1899688395"/>
+      <param name="output_format" value="text"/>
+      <param name="linkname" value="nuccore_gene"/>
+      <output name="default" file="elink.elinkin_1link_id.tabular" ftype="tabular"/>
+    </test>
   </tests>
   <help><![CDATA[
 NCBI Entrez ELink