diff uniprotxml_downloader.xml @ 6:a371252a2cf6 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/uniprotxml_downloader commit 0c5222345ace5054df44da29cab278f4a02e2b41
author galaxyp
date Thu, 06 Jul 2023 21:15:39 +0000
parents 265c35540faa
children
line wrap: on
line diff
--- a/uniprotxml_downloader.xml	Fri Nov 04 15:08:37 2022 +0000
+++ b/uniprotxml_downloader.xml	Thu Jul 06 21:15:39 2023 +0000
@@ -1,4 +1,4 @@
-<tool id="uniprotxml_downloader" name="UniProt" version="2.3.0" profile="21.01">
+<tool id="uniprotxml_downloader" name="UniProt" version="2.4.0" profile="21.01">
     <description>download proteome as XML or fasta</description>
     <macros>
         <import>macros.xml</import>
@@ -12,32 +12,32 @@
     <command>
 <![CDATA[
 python '$__tool_directory__/uniprotxml_downloader.py'
-#if $taxid.input_choice == 'common':
-    --taxon $taxid.organism
+#if $input_method.input_choice == 'common':
+    --search-id $input_method.organism
     --field taxonomy_id
-    #if $taxid.reviewed:
-        --reviewed=$taxid.reviewed
+    #if $input_method.reviewed:
+        --reviewed=$input_method.reviewed
     #end if
-#elif $taxid.input_choice == 'taxids':
-    --field $taxid.field
-    #for $id in $taxid.taxons.split(','):
-        -t '$id'
+#elif $input_method.input_choice == 'enter_ids':
+    --field $input_method.field
+    #for $id in $input_method.ids.split(','):
+        --search-id '$id'
     #end for
-#elif $taxid.input_choice == 'history':
-    --field $taxid.field
-    --input='${taxid.taxon_file}'
-    --column=#echo int(str($taxid.column)) - 1#
+#elif $input_method.input_choice == 'history':
+    --field $input_method.field
+    --input='${input_method.id_file}'
+    --column=#echo int(str($input_method.column)) - 1#
 #end if
 --format $format
 --output '${proteome}'
 ]]>
     </command>
     <inputs>
-        <conditional name="taxid">
+        <conditional name="input_method">
             <param name="input_choice" type="select" label="Select">
                 <option value="common">A Common Organism</option>
-                <option value="taxids">A manually entered list of Taxon IDs or names</option>
-                <option value="history">A history dataset with a column containing Taxon IDs or names</option>
+                <option value="enter_ids">A manually entered list of Uniprot IDs</option>
+                <option value="history">A history dataset with a column containing Uniprot IDs</option>
             </param>
             <when value="common">
                 <param name="organism" type="select" label="Common Organisms"
@@ -59,16 +59,16 @@
                     <option value="no">UniProtKB/TrEMBL (unreviewed only)</option>
                 </param>
             </when>
-            <when value="taxids">
-                <param name="taxons" type="text" label="NCBI Taxon IDs or names" 
-                       help="Enter one or more Organsim IDs (separated by commas) from http://www.uniprot.org/proteomes/">
+            <when value="enter_ids">
+                <param name="ids" type="text" label="Search ID values"
+                       help="Enter one or more IDs (separated by commas) from http://www.uniprot.org/proteomes/">
                     <validator type="regex" message="OrganismID[,OrganismID]">^\w+( \w+)*(,\w+( \w+)*)*$</validator>
                 </param>
                 <expand macro="query_field"/>
             </when>
             <when value="history">
-                <param name="taxon_file" type="data" format="tabular,txt" label="Dataset (tab separated) with Taxon ID/Name column"/>
-                <param name="column" type="data_column" data_ref="taxon_file" label="Column with Taxon ID/name"/>
+                <param name="id_file" type="data" format="tabular,txt" label="Dataset (tab separated) with ID column"/>
+                <param name="column" type="data_column" data_ref="id_file" label="Column with ID"/>
                 <expand macro="query_field"/>
             </when>
         </conditional>
@@ -86,8 +86,8 @@
     </outputs>
     <tests>
         <test>
-            <param name="input_choice" value="taxids"/>
-            <param name="taxons" value="1566990"/>
+            <param name="input_choice" value="enter_ids"/>
+            <param name="ids" value="1566990"/>
             <param name="format" value="xml"/>
             <output name="proteome">
                 <assert_contents>
@@ -96,8 +96,8 @@
             </output>
         </test>
         <test>
-            <param name="input_choice" value="taxids"/>
-            <param name="taxons" value="765963,512562"/>
+            <param name="input_choice" value="enter_ids"/>
+            <param name="ids" value="765963,512562"/>
             <param name="field" value="taxonomy_id"/>
             <param name="format" value="fasta"/>
             <output name="proteome">
@@ -108,8 +108,8 @@
             </output>
         </test>
         <test>
-            <param name="input_choice" value="taxids"/>
-            <param name="taxons" value="Shi470,PeCan4"/>
+            <param name="input_choice" value="enter_ids"/>
+            <param name="ids" value="Shi470,PeCan4"/>
             <param name="field" value="taxonomy_name"/>
             <param name="format" value="fasta"/>
             <output name="proteome">
@@ -120,8 +120,20 @@
             </output>
         </test>
         <test>
+            <param name="input_choice" value="enter_ids"/>
+            <param name="ids" value="E1Q2I0,E1Q3C4"/>
+            <param name="field" value="accession"/>
+            <param name="format" value="fasta"/>
+            <output name="proteome">
+                <assert_contents>
+                    <has_text text="E1Q2I0" />
+                    <has_text text="E1Q3C4" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
             <param name="input_choice" value="history"/>
-            <param name="taxon_file" value="Helicobacter_strains.tsv" ftype="tabular"/>
+            <param name="id_file" value="Helicobacter_strains.tsv" ftype="tabular"/>
             <param name="column" value="1"/>
             <param name="field" value="taxonomy_name"/>
             <param name="format" value="fasta"/>
@@ -134,7 +146,7 @@
         </test>
         <test>
             <param name="input_choice" value="history"/>
-            <param name="taxon_file" value="Helicobacter_strains_ids.tsv" ftype="tabular"/>
+            <param name="id_file" value="Helicobacter_strains_ids.tsv" ftype="tabular"/>
             <param name="column" value="2"/>
             <param name="field" value="taxonomy_id"/>
             <param name="format" value="fasta"/>
@@ -145,6 +157,19 @@
                 </assert_contents>
             </output>
         </test>
+        <test>
+            <param name="input_choice" value="history"/>
+            <param name="id_file" value="Helicobacter_protein_accessions.tsv" ftype="tabular"/>
+            <param name="column" value="1"/>
+            <param name="field" value="accession"/>
+            <param name="format" value="fasta"/>
+            <output name="proteome">
+                <assert_contents>
+                    <has_text text="E1Q2I0" />
+                    <has_text text="E1Q3C4" />
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help>
 <![CDATA[
@@ -160,7 +185,11 @@
 
 Example taxon: http://www.uniprot.org/taxonomy/512562
 
-Taxon IDs or names can be entered as text or read from a column in a tabular dataset from your history.
+Example protein: https://www.uniprot.org/uniprotkb/E1Q2I0/entry
+
+Description of query fields: https://www.uniprot.org/help/query-fields
+
+IDs can be entered as text or read from a column in a tabular dataset from your history.
 
 Example IDs and names releated to the Bacteria Helicobacter pylori (strain Shi470) ::
 
@@ -171,6 +200,11 @@
  - Helicobacter
  - Helicobacteraceae
 
+ Example protein accession numbers from Helicobacter pylori:
+
+ - E1Q2I0
+ - E1Q3C4
+
 
 UniProtKB help: http://www.uniprot.org/help/uniprotkb