diff id_converter.xml @ 17:1e45ea50f145 draft

planemo upload commit 640429adac783e2354f5caf12d7b6b81b8ddf54f-dirty
author proteore
date Thu, 07 Mar 2019 07:49:18 -0500
parents b6607b7e683f
children 5252bbcfbdd7
line wrap: on
line diff
--- a/id_converter.xml	Mon Jan 28 11:08:47 2019 -0500
+++ b/id_converter.xml	Thu Mar 07 07:49:18 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="IDconverter" name="ID Converter" version="2019.01.28">
+<tool id="IDconverter" name="ID Converter" version="2019.03.07">
     <description>(Human, Mouse, Rat)
     </description>
     <requirements>
@@ -20,8 +20,11 @@
         #end if
         --target_ids="$species.idto.idtypeout"
         --output="$output"
-        --ref_file="$__tool_directory__/${ filter( lambda x: str( x[2] ) == str( $species.mapping_file ), $__app__.tool_data_tables['proteore_id_mapping'].get_fields() )[0][-1] }"
-        
+        #if "id_mapping" in str($species.mapping_file).split("/")
+            --ref_file="$species.mapping_file"
+        #else 
+            --ref_file="$__tool_directory__/$species.mapping_file"
+        #end if 
     ]]></command>
     <inputs>
         <conditional name="input" >
@@ -48,17 +51,21 @@
             <when value="file" >
                 <param name="file" type="data" format="txt,tabular" label="Select your file" help="" />
                 <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does file contain header?" />
-                <param name="ncol" type="text" value="c1" label="Column number of IDs to map" help='For example, fill in "c1" if it is the first column, "c2" if it is the second column and so on' />                
+                <param name="ncol" type="text" value="c1" label="Column number of IDs to map" help='For example, fill in "c1" if it is the first column, "c2" if it is the second column and so on'>
+                    <validator type="regex" message="Please enter a column number, for example: 'c1' for the first column">[c]{0,1}[0-9]+</validator>
+                </param>
             </when>
         </conditional>
         <conditional name="species">
-            <param name="mapping_file" type="select" label="Species" >
-                <options from_data_table="proteore_id_mapping"/>
-                <option value="Human"></option>
-                <option value="Mouse"></option>
-                <option value="Rat"></option>
+            <param name="species" type="select" label="Species">
+                <option value="Human" selected="True">Human (Homo sapiens)</option>
+                <option value="Mouse" selected="True">Mouse (Mus musculus)</option>
+                <option value="Rat" selected="True">Rat (Rattus norvegicus)</option>
             </param>
             <when value="Human">
+                <param name="mapping_file" type="select" label="Release" >
+                    <options from_data_table="proteore_id_mapping_Human"/>
+                </param>    
                 <param name="idtypein" type="select" label="Type/source of IDs" optional="false" >
                     <option value="neXtProt" >neXtProt ID (e.g. NX_P31946)</option>
                     <option value="UniProt-AC" selected="True" >UniProt accession number (e.g. P31946)</option>
@@ -101,6 +108,9 @@
                 </section>
             </when>
             <when value="Mouse">
+                <param name="mapping_file" type="select" label="Release" >
+                    <options from_data_table="proteore_id_mapping_Mouse"/>
+                </param>    
                 <param name="idtypein" type="select" label="Type/source of IDs" optional="false" >
                     <option value="UniProt-AC" selected="True" >UniProt accession number (e.g. P31946)</option>
                     <option value="UniProt-ID" >UniProt ID (e.g 1433B_HUMAN)</option>
@@ -140,6 +150,9 @@
                 </section>
             </when>
             <when value="Rat">
+                <param name="mapping_file" type="select" label="Release" >
+                    <options from_data_table="proteore_id_mapping_Rat"/>
+                </param>    
                 <param name="idtypein" type="select" label="Select type/source of identifier of your list" optional="false" >
                     <option value="UniProt-AC" selected="True" >UniProt accession number (e.g. P31946)</option>
                     <option value="UniProt-ID" >UniProt ID (e.g 1433B_HUMAN)</option>