diff small_rna_maps.xml @ 15:82fedc576024 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_maps commit c1d96f7f028512aa4d8fcae3dd5f967cd445708e
author artbio
date Sat, 06 Oct 2018 05:24:15 -0400
parents cd75c72e1d75
children 600e2498bd21
line wrap: on
line diff
--- a/small_rna_maps.xml	Tue Apr 10 10:13:04 2018 -0400
+++ b/small_rna_maps.xml	Sat Oct 06 05:24:15 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="small_rna_maps" name="small_rna_maps" version="2.5.2">
+<tool id="small_rna_maps" name="small_rna_maps" version="2.6.0">
   <description></description>
   <requirements>
         <requirement type="package" version="1.11.2=py27_0">numpy</requirement>
@@ -7,19 +7,20 @@
         <requirement type="package" version="0.6_28=r3.3.2_0">r-latticeextra</requirement>
         <requirement type="package" version="2.2.1=r3.3.2_0">r-gridextra</requirement>
         <requirement type="package" version="1.4.2=r3.3.2_0">r-reshape2</requirement>
-        
+        <requirement type="package" version="0.6.6">sambamba</requirement>
   </requirements>
   <stdio>
       <exit_code range="1:" level="fatal" description="Tool exception" />
   </stdio>
   <command detect_errors="exit_code"><![CDATA[
           #for $file in $series
-              samtools index '$file.inputs';
+              sambamba view -t \${GALAXY_SLOTS} -F "not unmapped and sequence_length >= ${minsize} and sequence_length <= ${maxsize}" -f bam '$file.inputs' >'$file.inputs.name';
+              samtools index '$file.inputs.name';
           #end for
-          python '$__tool_directory__'/small_rna_maps.py 
+          python '$__tool_directory__'/small_rna_maps.py
               --inputs
           #for $file in $series
-              '$file.inputs'
+              '$file.inputs.name'
           #end for
               --sample_names
           #for $sample in $series
@@ -39,9 +40,9 @@
           --outputs '$output_tab' ;
       #end if
       Rscript '$__tool_directory__'/small_rna_maps.r
-          --first_dataframe '$output_tab' 
+          --first_dataframe '$output_tab'
           --extra_dataframe '$extra_output_tab'
-          --normalization 
+          --normalization
           #set $norm = ""
           #for $file in $series
                  #set $norm += str($file.normalization)+' '
@@ -83,29 +84,29 @@
         <param name="plots_options_selector" type="select" display="radio" label="Plot Options">
             <option value="one_plot">Just one plot per chromosome</option>
             <option value="two_plot" selected="True">Two plots per chromosome</option>
-            <option value="global">Global read size distributions of aligned reads</option> 
+            <option value="global">Global read size distributions of aligned reads</option>
         </param>
         <when value="two_plot">
             <param name="first_plot" type="select" display="radio" label="Select the type of the top plot">
-                <option value="Counts">Counts</option> 
-                <option value="Coverage">Coverage</option> 
-                <option value="Mean">Mean Sizes</option> 
+                <option value="Counts">Counts</option>
+                <option value="Coverage">Coverage</option>
+                <option value="Mean">Mean Sizes</option>
                 <option value="Median">Median Sizes</option>
                 <option value="Size">Size Distributions</option>
             </param>
             <param name="extra_plot" type="select" display="radio" label="Select the type of the bottom plot">
-                <option value="Counts">Counts</option> 
-                <option value="Coverage">Coverage</option> 
-                <option value="Mean">Mean Sizes</option> 
+                <option value="Counts">Counts</option>
+                <option value="Coverage">Coverage</option>
+                <option value="Mean">Mean Sizes</option>
                 <option value="Median">Median Sizes</option>
                 <option value="Size">Size Distributions</option>
             </param>
         </when>
         <when value="one_plot">
             <param name="first_plot" type="select" display="radio" label="select the type of plot">
-                <option value="Counts">Counts</option> 
-                <option value="Coverage">Coverage</option> 
-                <option value="Mean">Mean Sizes</option> 
+                <option value="Counts">Counts</option>
+                <option value="Coverage">Coverage</option>
+                <option value="Mean">Mean Sizes</option>
                 <option value="Median">Median Sizes</option>
                 <option value="Size">Size Distributions</option>
             </param>
@@ -134,7 +135,7 @@
     <data format="tabular" name="output_tab" label="$plots_options.first_plot dataframe" />
     <data format="tabular" name="extra_output_tab" label="$plots_options.extra_plot dataframe">
         <filter>plots_options['plots_options_selector'] == 'two_plot'</filter>
-    </data> 
+    </data>
     <data format="pdf" name="output_pdf" label="small RNA maps" />
 </outputs>
 
@@ -144,6 +145,23 @@
                 <param name="inputs" value="input1.bam" ftype="bam" />
                 <param name="normalization" value="1.0" />
             </repeat>
+            <repeat name="series">
+                <param name="inputs" value="input_new2.bam" ftype="bam" />
+                <param name="normalization" value="2.0" />
+            </repeat>
+            <param name="minsize" value="0" />
+            <param name="maxsize" value="10000" />
+            <param name="cluster" value="0" />
+            <param name="plots_options_selector" value="one_plot" />
+            <param name="first_plot" value="Counts" />
+            <output file="input1_input2new_norm_1_2_counts.tab" name="output_tab" />
+            <output file="input1_input2new_norm_1_2_single_plot_counts.pdf" name="output_pdf" />
+        </test>
+        <test>
+            <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" />
@@ -377,4 +395,3 @@
   }</citation>
 </citations>
 </tool>
-