diff cpm_tpm_rpk.xml @ 2:563337e780ce draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cpm_tpm_rpk commit 4ade64ddb1b4e2c62cd153bee13c7ce4ff2d249d
author artbio
date Wed, 06 Feb 2019 19:31:57 -0500
parents b74bab5157c4
children 8b1020c25f0f
line wrap: on
line diff
--- a/cpm_tpm_rpk.xml	Tue Feb 05 19:51:38 2019 -0500
+++ b/cpm_tpm_rpk.xml	Wed Feb 06 19:31:57 2019 -0500
@@ -1,9 +1,10 @@
-<tool id="cpm_tpm_rpk" name="Generate CPM, TPM, RPK" version="0.2.0">
+<tool id="cpm_tpm_rpk" name="Generate CPM, TPM, RPK" version="0.3.0">
     <description>from raw counts expression values</description>
     <requirements>
         <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement>
         <requirement type="package" version="0.13=r3.3.2_0">r-rtsne</requirement>
         <requirement type="package" version="2.2.1=r3.3.2_0">r-ggplot2</requirement>
+        <requirement type="package" version="0.4.1=r3.3.2_0">r-ggfortify</requirement>
     </requirements>
     <stdio>
         <exit_code range="1:" level="fatal" description="Tool exception" />
@@ -30,12 +31,18 @@
             #else if $log == "TRUE":
                 -o ${output_log}
             #end if
-            #if $visu_option.visualisation == "tsne":
-               --tsne 'TRUE'
+            #if $visu_option.visualisation == "yes":
+               --visu 'TRUE'
+               #if $visu_option.tsne_labels == "yes":
+                   --tsne_labels 'TRUE'
+               #else
+                   --tsne_labels 'FALSE'
+               #end if
                --seed '$visu_option.seed'
                --perp '$visu_option.perp'
                --theta '$visu_option.theta'
                --tsne_out '$tsne_out'
+               --pca_out '$pca_out'
             #end if
 ]]></command>
     <inputs>
@@ -98,12 +105,16 @@
         <conditional name="visu_option">
             <param name="visualisation" type="select" label="Visualisation of data with various dimensionality reduction methods" >
                 <option value="no" selected="true">No visualisation</option>
-                <option value="tsne" >tsne</option>
+                <option value="yes" >t-SNE and PCA</option>
             </param>
-            <when value="tsne">
-                    <param name="seed" value="42.0" type="float" label="Seed value for reproducibiity" help="Set to 42 as default" />
-                    <param name="perp" value="10.0" type="float" label="perplexity"/> 
-                    <param name="theta" value="1.0" type="float" label="theta"/> 
+            <when value="yes">
+                    <param name="seed" value="49.0" type="float" label="Seed value for reproducibility" help="Set to 49 as default" />
+                    <param name="perp" value="10.0" type="float" label="perplexity" help="should be less than ((nbre observations)-1)/3" /> 
+                    <param name="theta" value="1.0" type="float" label="theta"/>
+                    <param name="tsne_labels" type="select" label="Add labels to points in the t-SNE plot" >
+                        <option value="no" selected="true">No Labels</option>
+                        <option value="yes" >Label points</option>
+                    </param>
             </when>
             <when value="no" />
         </conditional>
@@ -116,7 +127,10 @@
             <filter>log == "TRUE"</filter>
         </data>
         <data name="tsne_out" format="pdf" label="tsne from ${on_string}">
-            <filter>visu_option['visualisation'] == 'tsne'</filter>
+            <filter>visu_option['visualisation'] == 'yes'</filter>
+        </data>
+        <data name="pca_out" format="pdf" label="PCA from ${on_string}">
+            <filter>visu_option['visualisation'] == 'yes'</filter>
         </data>
     </outputs>
     <tests>
@@ -124,12 +138,29 @@
         <test>
             <param name="input" value="counts.tab" ftype="tabular"/>
             <param name="type_transfo" value="cpm"/>
-            <param name="visualisation" value="tsne"/>
+            <param name="log" value="TRUE"/>
+            <param name="visualisation" value="yes"/>
             <param name="seed" value="49"/>
             <param name="perp" value="2"/>
             <param name="theta" value="1" />
-            <output name="output" file="cpm.tab" ftype="tabular"/>
+            <param name="tsne_labels" value="yes" />
+            <output name="output" file="logcpm.tab" ftype="tabular"/>
             <output name="tsne_out" file="tsne.pdf" ftype="pdf"/>
+            <output name="pca_out" file="pca.pdf" ftype="pdf"/>
+        </test>
+        <test>
+            <param name="input" value="counts.tab" ftype="tabular"/>
+            <param name="type_transfo" value="tpm"/>
+            <param name="gene_file" value="gene_length.tab" ftype="tabular"/>
+            <param name="log" value="TRUE"/>
+            <param name="visualisation" value="yes"/>
+            <param name="seed" value="49"/>
+            <param name="perp" value="2"/>
+            <param name="theta" value="1" />
+            <param name="tsne_labels" value="no" />
+            <output name="output" file="logtpm.tab" ftype="tabular"/>
+            <output name="tsne_out" file="tsne.nolab.pdf" ftype="pdf"/>
+            <output name="pca_out" file="pca.nolab.pdf" ftype="pdf"/>
         </test>
         <!-- test without t-SNE -->
         <test>