diff blockbuster.xml @ 3:7c7ff7a3503f draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/blockbuster commit e11f6de08dca72259d2286c442c5464b1f2236d6
author rnateam
date Sun, 17 Jan 2016 06:56:03 -0500
parents 0f3d3f9f120f
children
line wrap: on
line diff
--- a/blockbuster.xml	Fri Jan 15 07:52:56 2016 -0500
+++ b/blockbuster.xml	Sun Jan 17 06:56:03 2016 -0500
@@ -1,4 +1,4 @@
-<tool id="blockbuster" name="blockbuster" version="0.1.1.1">
+<tool id="blockbuster" name="blockbuster" version="0.1.2">
     <description>detects blocks of overlapping reads using a gaussian-distribution approach</description>
     <requirements>
         <requirement type="package" version="0.0.1.1">blockbuster</requirement>
@@ -12,15 +12,20 @@
             -scale $scale
             -merge $merge
             -tagFilter $tagFilter
-            -print $print
+            #if str($print).endswith( 'blocks' )
+                -print 1
+            #else 
+                -print 2
+            #end if
             $input
             > data.blockbuster;
-            #if str($print)=="1"
-                awk '{if ($1 ~ /^>/) print $2"\t"$3"\t"$4"\t"$1"\t"$6"\t"$5"\t"$3"\t"$4; else print $2"\t"$3"\t"$4"\tblock_"$1"\t"$6"\t"$5"\t"$3"\t"$4}' data.blockbuster
-            #else if str($print)=="2"
-                awk '{if ($1 ~ /^>/) print $2"\t"$3"\t"$4"\t"$1"\t"$6"\t"$5"\t"$3"\t"$4; else print $1"\t"$2"\t"$3"\t"$3"\t"$4"\t"$5"\t"$6"\t"$2"\t"$3}' data.blockbuster
+            #if str($print) == 'bed_blocks'
+                awk '{if ($1 ~ /^>/) print $2"\t"$3"\t"$4"\t"$1"\t"$6"\t"$5"\t"$3"\t"$4; else print $2"\t"$3"\t"$4"\tblock_"$1"\t"$6"\t"$5"\t"$3"\t"$4}' data.blockbuster > $output
+            #else if str($print) == 'bed_reads'
+                awk '{if ($1 ~ /^>/) print $2"\t"$3"\t"$4"\t"$1"\t"$6"\t"$5"\t"$3"\t"$4; else print $1"\t"$2"\t"$3"\t"$3"\t"$4"\t"$5"\t"$6"\t"$2"\t"$3}' data.blockbuster > $output
+            #else
+                mv data.blockbuster $output
             #end if
-            > $output
 ]]>
     </command>
     <inputs>
@@ -32,14 +37,33 @@
         <param name="merge" type="integer" value="0" label="merge reads with almost similar means"/>
         <param name="tagFilter" type="integer" value="0" label="skip tags with expression smaller than this value"/>
         <param name="print" type="select" label="Type of output" >
-            <option value="1">blocks</option>
-            <option value="2" selected="True">reads</option>
+            <option value="bbf_blocks">blocks (blockbuster format)</option>
+            <option value="bbf_reads" selected="True">reads (blockbuster format)</option>
+            <option value="bed_blocks">blocks (bed format)</option>
+            <option value="bed_reads" >reads (bed format)</option>
         </param>
     </inputs>
 
     <outputs>
-        <data format="bed" name="output" label="blockbuster on ${on_string}"/>
+        <data format="bed" name="output" label="blockbuster on ${on_string}">
+            <change_format>
+                <when input="print" value="bbf_blocks" format="tabular" />
+                <when input="print" value="bbf_reads" format="tabular" />
+            </change_format>
+	</data>
     </outputs>
+    <tests>
+        <test>
+            <param name="input" value="blockbuster_test_input.bed" ftype="bed" />
+            <param name="print" value="bed_blocks" />
+            <output name="output" file="blockbuster_test_result1.bed" ftype="bed" />
+        </test>
+        <test>
+            <param name="input" value="blockbuster_test_input.bed" ftype="bed" />
+            <param name="print" value="bbf_blocks" />
+            <output name="output" file="blockbuster_test_result2.blockbuster" ftype="tabular" />
+        </test>
+    </tests>
     <help>
 <![CDATA[