diff small_rna_maps.xml @ 13:458a88317c22 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_maps commit c2fde4ca142c58719749c04046270479485e8d4b
author artbio
date Tue, 10 Apr 2018 06:12:01 -0400
parents d33263e6e812
children cd75c72e1d75
line wrap: on
line diff
--- a/small_rna_maps.xml	Sat Apr 07 06:14:50 2018 -0400
+++ b/small_rna_maps.xml	Tue Apr 10 06:12:01 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="small_rna_maps" name="small_rna_maps" version="2.5.0">
+<tool id="small_rna_maps" name="small_rna_maps" version="2.5.1">
   <description></description>
   <requirements>
         <requirement type="package" version="1.11.2=py27_0">numpy</requirement>
@@ -13,33 +13,18 @@
       <exit_code range="1:" level="fatal" description="Tool exception" />
   </stdio>
   <command detect_errors="exit_code"><![CDATA[
-      #if $inputs_cond.normalize == "no":
-          #for $file in $inputs_cond.inputs
-              samtools index '$file';
-          #end for
-          python '$__tool_directory__'/small_rna_maps.py 
-              --inputs
-          #for $file in $inputs_cond.inputs
-              '$file'
-          #end for
-              --sample_names
-          #for $sample in $inputs_cond.inputs
-              '$sample.name'
-          #end for
-      #else if $inputs_cond.normalize == "yes":
-          #for $file in $inputs_cond.series
+          #for $file in $series
               samtools index '$file.inputs';
           #end for
           python '$__tool_directory__'/small_rna_maps.py 
               --inputs
-          #for $file in $inputs_cond.series
+          #for $file in $series
               '$file.inputs'
           #end for
               --sample_names
-          #for $sample in $inputs_cond.series
+          #for $sample in $series
               '$sample.inputs.name'
           #end for
-      #end if
           --minsize $minsize
           --maxsize $maxsize
           --cluster $cluster
@@ -57,16 +42,12 @@
           --first_dataframe '$output_tab' 
           --extra_dataframe '$extra_output_tab'
           --normalization 
-          #if $inputs_cond.normalize == "no":
-              ''
-          #else if $inputs_cond.normalize == "yes":
-              #set $norm = ""
-              #for $file in $inputs_cond.series
-                     #set $norm += str($file.normalization)+' '
-              #end for
-              #set $norm = $norm[:-1]
-              '$norm'
-          #end if
+          #set $norm = ""
+          #for $file in $series
+                 #set $norm += str($file.normalization)+' '
+          #end for
+          #set $norm = $norm[:-1]
+          '$norm'
           #if $ylimits_cond.ylimits == "no":
               --ymin '' --ymax ''
           #else:
@@ -86,19 +67,12 @@
               --output_pdf '$output_pdf'
   ]]></command>
  <inputs>
-    <conditional name="inputs_cond">
-        <param name="normalize" type="boolean" label="Will there be normalization?" truevalue="yes" falsevalue="no" checked="false"/>
-        <when value="no">
-            <param name="inputs" type="data" format="bam" label="Select multiple alignments to parse" multiple="True"/>
-        </when>
-        <when value="yes">
-            <repeat name="series" title="Normalization factors" min="1">
-                <param name="inputs" type="data" format="bam" label="Select multiple alignments to parse" />
-                <param name="normalization" type="float" label="Enter size/normalization factors."
-                       help="e.g. '0.75' '1.23'" value="1.0"/>
-            </repeat>
-        </when>
-    </conditional>
+    <repeat name="series" title="Input" min="1">
+        <param name="inputs" type="data" format="bam" label="Select a single alignment file to parse" multiple="false"
+               help="If 'multiple datasets' method is used, the same normalization factor will be applied to each dataset. Please refer to the help section for more information." />
+        <param name="normalization" type="float" label="Enter a size/normalization factor."
+               help="Enter only one value e.g. '0.75' or '1.23'" value="1.0"/>
+    </repeat>
     <param name="minsize" type="integer" label="Minimal size of reads for inclusion in analysis"
            value="0" help="default value: 0" />
     <param name="maxsize" type="integer" label="Maximal size of reads for inclusion in analysis"
@@ -166,7 +140,10 @@
 
     <tests>
         <test>
-            <param name="inputs" value="input1.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
@@ -179,7 +156,10 @@
             <output file="input1_yminneg5_5_single_plot_counts.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="5" />
@@ -189,7 +169,10 @@
             <output file="input1_cluster5_single_plot_coverage.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="20" />
             <param name="maxsize" value="30" />
             <param name="cluster" value="0" />
@@ -199,7 +182,10 @@
             <output file="input1_min20_max30_single_plot_size.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
@@ -209,7 +195,10 @@
             <output file="input1__single_plot_mean.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
@@ -219,7 +208,6 @@
             <output file="input1_single_plot_median.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="normalize" value="yes" />
             <repeat name="series">
                 <param name="inputs" value="input1.bam" ftype="bam" />
                 <param name="normalization" value="1.0" />
@@ -237,7 +225,14 @@
             <output file="input1_input2_norm_1_2_single_plot_counts.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input2.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
@@ -252,7 +247,30 @@
             <output file="input1_input2_double_plot_counts_size_ylimneg5_5.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam,input_single_chr.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_single_chr.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
@@ -262,26 +280,38 @@
             <output file="input_single_chr_x_6_single_plot_coverage.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input2.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
             <param name="plots_options_selector" value="global" />
             <param name="mergestrands" value="nomerge" />
             <param name="first_plot" value="Size" />
-            <param name="normalization" value="1 1" />
             <output file="size.tab" name="output_tab" />
             <output file="global_nomerge.pdf" name="output_pdf" />
         </test>
         <test>
-            <param name="inputs" value="input1.bam,input2.bam" ftype="bam"/>
+            <repeat name="series">
+                <param name="inputs" value="input1.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input2.bam" ftype="bam" />
+                <param name="normalization" value="1.0" />
+            </repeat>
             <param name="minsize" value="0" />
             <param name="maxsize" value="10000" />
             <param name="cluster" value="0" />
             <param name="plots_options_selector" value="global" />
             <param name="mergestrands" value="merge" />
             <param name="first_plot" value="Size" />
-            <param name="normalization" value="1 1" />
             <output file="size.tab" name="output_tab" />
             <output file="global_merge.pdf" name="output_pdf" />
         </test>
@@ -321,6 +351,13 @@
   - sorted
   - mapped to the same reference
 
+To plot 2 alignment files in the same PDF output the 'single dataset' method should be used.
+
+.. class:: warningmark
+
+If the 'multiple dataset' method is used the normalization factor will be applied to every file selected in the input list.
+Additionally each file in the selected list will be plotted in a separate PDF file.
+
 **Output**
 
 A pdf file generated by the R package lattice and one or two dataframes used to plot the data.