changeset 1:f10816a9dd0b draft

planemo upload commit dbc027f59706f5b7d3f9f9319f2652baa50e2df5-dirty
author proteore
date Mon, 04 Mar 2019 05:12:46 -0500
parents 1e856941a888
children 1dea4e5f638f
files add_protein_features_mouse.R add_protein_features_mouse.xml
diffstat 2 files changed, 17 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/add_protein_features_mouse.R	Fri Feb 08 08:46:04 2019 -0500
+++ b/add_protein_features_mouse.R	Mon Mar 04 05:12:46 2019 -0500
@@ -1,3 +1,5 @@
+options(warn=-1)  #TURN OFF WARNINGS !!!!!!
+
 # Read file and return file content as data.frame
 order_columns <- function (df,ncol,file){
   if (ncol==1){ #already at the right position
--- a/add_protein_features_mouse.xml	Fri Feb 08 08:46:04 2019 -0500
+++ b/add_protein_features_mouse.xml	Mon Mar 04 05:12:46 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="prot_features_mouse" name="Add protein features (Mouse)" version="2019.02.08">
+<tool id="prot_features_mouse" name="Add protein features (Mouse)" version="2019.02.21">
 <description>[UniProt]
 </description>
 <requirements>
@@ -16,11 +16,13 @@
   #if $inputtype.filetype == "file" 
     --column='$inputtype.column' 
     --header=$inputtype.header
+    --output='$output' 
+  #else
+    --output='$output2'
   #end if
 
   --pc_features='$pc_features'   
-  --output='$output'  
-  --uniprot_file=$__tool_directory__/tool-data/uniprot_features_mouse.tsv
+  --uniprot_file=$__tool_directory__/tool-data/uniprot_features_mouse.tsv 
     
 ]]></command>
 
@@ -48,12 +50,14 @@
     </when>
     <when value="file">
       <param name="genelist" type="data" format="txt,tabular" label="Select your file" help=""/>
-      <param name="column" type="text" label="Column IDs (e.g : Enter c1 for column n°1)" value="c1"/> 
+      <param name="column" type="text" label="Column IDs (e.g : Enter c1 for column n°1)" value="c1">
+        <validator type="regex" message="Please enter a column number, for example: 'c1' for the first column">[c]{0,1}[0-9]+</validator>
+      </param>
       <param name="header" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Does input file have header?" />
 
     </when>
   </conditional>
-    <param name="pc_features" type="select" label="Features/Annotation" multiple="true" help="" display="checkboxes" optional="true">
+    <param name="pc_features" type="select" label="Features/Annotation" multiple="true" help="" display="checkboxes" optional="false">
       <option value="Entry name" selected="false">Entry name (e.g. PLK3_MOUSE)</option>
       <option value="Protein names" selected="false">Protein names (e.g. Serine/threonine-protein kinase PLK3 (EC 2.7.11.21))</option>
       <option value="Length" selected="false">Sequence length</option>
@@ -74,10 +78,12 @@
 </inputs>
 
 <outputs>
-  <data name="output" format="tsv" label="Add_information_from_UniProt on ${inputtype.genelist.name}">
-    <filter>inputtype=="file"</filter>
+  <data name="output" format="tsv" label="Add_Mouse_ProteinFeatures_UP_on_${inputtype.genelist.name}">
+    <filter>inputtype['filetype'] == 'file'</filter>
   </data>
-  <data name="output" format="tsv" label="Add_information_from_UniProt"/>
+  <data name="output2" format="tsv" label="Add_Mouse_ProteinFeatures_UP">
+    <filter>inputtype['filetype'] == 'copy_paste'</filter>
+  </data>
 </outputs>
 
 <tests>
@@ -91,7 +97,7 @@
 
     <param name="pc_features" value='Entry name,Protein names,Length,Mass,Features,Intramembrane,Transmembrane,Topological domain,Pathway,Function [CC],Post-translational modification,Subcellular location [CC],Subunit structure [CC],Domain [CC],Tissue specificity,Involvement in disease'/> 
       
-    <output name="output" file="results_wilson-foie-souris-up.tsv"/>
+    <output name="output2" file="results_wilson-foie-souris-up.tsv"/>
   </test>
 </tests>