changeset 3:944b43462104 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/metaquantome commit cf8aec441ba6ef62071c3cf4ac840ebc5a710aa4"
author galaxyp
date Tue, 24 Nov 2020 15:08:30 +0000
parents 02da24eac445
children 1199751329b0
files macros.xml metaquantome_viz.xml
diffstat 2 files changed, 28 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/macros.xml	Thu Sep 24 08:56:43 2020 +0000
+++ b/macros.xml	Tue Nov 24 15:08:30 2020 +0000
@@ -1,6 +1,6 @@
 <macros>
     <token name="@VERSION@">2.0.0</token>
-    <token name="@GVERSION@">2.0.0-0</token>
+    <token name="@GVERSION@">2.0.0-1</token>
     <xml name="requirements">
         <requirements>
           <requirement type="package" version="@VERSION@">metaquantome</requirement>
--- a/metaquantome_viz.xml	Thu Sep 24 08:56:43 2020 +0000
+++ b/metaquantome_viz.xml	Tue Nov 24 15:08:30 2020 +0000
@@ -77,7 +77,9 @@
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
-        cp '$infile' '$infile.name'
+	#import re
+	#set $safename = re.sub('[^\w\-_\.]', '_', $infile.element_identifier)
+	ln -s '$infile' '$safename'
         &&
         metaquantome viz
         --samps '$samps'
@@ -85,7 +87,7 @@
         #if str($mode_args.mode) == 'f'
             --ontology='$mode_args.ontology'
         #end if
-        --infile='$infile.name'
+        --infile='$safename'
         --plottype='$mode_args.plot.plottype'
         #if $mode_args.plot.plottype == 'bar':
             #if str($mode_args.mode) == 't':
@@ -117,10 +119,10 @@
               --alpha=$mode_args.plot.heatmap.alpha
               --fc_corr_p='mode_args.plot.fc_corr_p'
             #end if
-            #if feature_cluster_size:
+            #if $mode_args.plot.feature_cluster_size:
                 --feature_cluster_size='$mode_args.plot.feature_cluster_size'
             #end if
-            #if sample_cluster_size:
+            #if $mode_args.plot.sample_cluster_size:
                 --sample_cluster_size='$mode_args.plot.sample_cluster_size'
             #end if
         #elif $mode_args.plot.plottype == 'pca':
@@ -164,6 +166,15 @@
             </p>
           </body>
         </html>" > wrapped_outfile.html
+    && >&2 ls
+    #if $mode_args.plot.plottype in ["heatmap"]
+        && mv 'feature_cluster_${safename}.txt' '$heatmap_feature_cluster'
+        && mv 'sample_cluster_${safename}.txt' '$heatmap_sample_cluster'
+    #end if
+    #if $mode_args.plot.plottype in ["pca"]
+        && mv 'PC_data_${safename}.txt' '$pca_sample_cluster'
+    #end if
+      
     ]]></command>
     <inputs>
       <param argument="--infile" type="data"
@@ -329,31 +340,28 @@
           label="${tool.name} on ${on_string} ${mode_args.plot.plottype}.html"
           from_work_dir="wrapped_outfile.html"/>
       <data format="tabular" name="plotdata"
-        label="${tool.name} ${on_string} ${mode_args.plot.plottype}: plot data"
+        label="${tool.name} on ${on_string} ${mode_args.plot.plottype}: plot data"
         from_work_dir="plotdata.tab">
         <filter>mode_args['plot']['plottype'] in ["bar", "volcano"]</filter>
       </data>
       
       <data format="tabular" name="heatmap_feature_cluster"
-        label="${mode_args.plot.plottype}: feature cluster data"
-        from_work_dir="feature_cluster_${infile.name.rsplit('.',1)[0]}.txt">
+        label="${tool.name} on ${on_string}: ${mode_args.plot.plottype} feature cluster data">
         <filter>mode_args['plot']['plottype'] in ["heatmap"]</filter>
       </data>
       <data format="tabular" name="heatmap_sample_cluster"
-        label="${mode_args.plot.plottype}: sample cluster data"
-        from_work_dir="sample_cluster_${infile.name.rsplit('.',1)[0]}.txt">
+        label="${tool.name} on ${on_string}: ${mode_args.plot.plottype} sample cluster data">
         <filter>mode_args['plot']['plottype'] in ["heatmap"]</filter>
       </data>
       
-      <data format="tabular" name="heatmap_sample_cluster"
-        label="${mode_args.plot.plottype}: sample cluster data"
-        from_work_dir="PC_Data_${infile.name.rsplit('.',1)[0]}.txt">
+      <data format="tabular" name="pca_sample_cluster"
+        label="${tool.name} on ${on_string}: ${mode_args.plot.plottype} sample cluster data">
         <filter>mode_args['plot']['plottype'] in ["pca"]</filter>
       </data>
       
     </outputs>
     <tests>
-        <test>
+        <test expect_num_outputs="2">
              <param name="infile" value="tax_filt_out.tab" ftype="tabular"/>
              <param name="mode" value="t" />
              <param name="samps" value="rudney_samples.tab" ftype="tabular"/>
@@ -366,7 +374,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="2">
              <param name="infile" value="tax_test_out.tab" ftype="tabular"/>
              <param name="mode" value="t" />
              <param name="samps" value="rudney_samples.tab" ftype="tabular"/>
@@ -381,7 +389,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="3">
              <param name="infile" value="tax_test_out.tab" ftype="tabular"/>
              <param name="mode" value="t" />
              <param name="samps" value="rudney_samples.tab" ftype="tabular"/>
@@ -392,7 +400,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="2">
              <param name="infile" value="tax_test_out.tab" ftype="tabular"/>
              <param name="mode" value="t" />
              <param name="samps" value="rudney_samples.tab" ftype="tabular"/>
@@ -403,7 +411,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="2">
              <param name="infile" value="func_full_test_out.tab" ftype="tabular"/>
              <param name="mode" value="f" />
              <param name="ontology" value="go" />
@@ -417,7 +425,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="2">
              <param name="infile" value="func_full_test_out.tab" ftype="tabular"/>
              <param name="mode" value="f" />
              <param name="ontology" value="go"/>
@@ -431,7 +439,7 @@
                 </assert_contents>
             </output>
         </test>
-        <test>
+        <test expect_num_outputs="1">
              <param name="infile" value="tf_filt_out.tab" ftype="tabular"/>
              <param name="mode" value="ft" />
              <param name="samps" value="rudney_samples.tab" ftype="tabular"/>