changeset 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
files blockbuster.xml test-data/blockbuster_test_input.bed test-data/blockbuster_test_result1.bed test-data/blockbuster_test_result2.blockbuster
diffstat 4 files changed, 142 insertions(+), 10 deletions(-) [+]
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[
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/blockbuster_test_input.bed	Sun Jan 17 06:56:03 2016 -0500
@@ -0,0 +1,100 @@
+chr1	4264	4284	GSM450600_692367	0.166666666666667	-
+chr1	7272	7293	GSM450600_221042	0.333333333333333	-
+chr1	7273	7294	GSM450600_549504	0.166666666666667	-
+chr1	13755	13775	GSM450600_440425	0.2	-
+chr1	23387	23420	GSM450600_770553	0.142857142857143	-
+chr1	76462	76483	GSM450600_947688	0.333333333333333	-
+chr1	84585	84608	GSM450600_960767	0.0769230769230769	-
+chr1	99112	99134	GSM450600_1351025	0.142857142857143	-
+chr1	101231	101261	GSM450600_1031113	0.2	-
+chr1	122477	122501	GSM450600_797617	0.166666666666667	-
+chr1	124544	124567	GSM450600_379210	0.0434782608695652	-
+chr1	130303	130322	GSM450600_400545	0.0208333333333333	-
+chr1	134202	134223	GSM450600_1353082	0.0181818181818182	-
+chr1	136192	136210	GSM450600_1354597	0.0714285714285714	-
+chr1	137861	137880	GSM450600_33797	0.0416666666666667	-
+chr1	234779	234799	GSM450600_865810	0.142857142857143	-
+chr1	245433	245455	GSM450600_1351025	0.142857142857143	-
+chr1	247546	247576	GSM450600_1031113	0.2	-
+chr1	311539	311562	GSM450600_391053	0.0714285714285714	-
+chr1	321904	321926	GSM450600_252343	0.1	-
+chr1	324192	324211	GSM450600_406528	0.0588235294117647	-
+chr1	326847	326867	GSM450600_1295545	0.0454545454545455	-
+chr1	330252	330273	GSM450600_451299	0.25	-
+chr1	331780	331806	GSM450600_524135	0.00636942675159236	-
+chr1	369341	369363	GSM450600_1277722	0.25	-
+chr1	529311	529331	GSM450600_1007465	0.2	-
+chr1	541704	541736	GSM450600_555018	0.142857142857143	-
+chr1	543701	543723	GSM450600_194993	1	-
+chr1	554367	554391	GSM450600_539207	1	-
+chr1	554558	554578	GSM450600_666162	1	-
+chr1	554632	554652	GSM450600_573049	1	-
+chr1	554745	554764	GSM450600_646265	1	-
+chr1	554746	554770	GSM450600_361920	2	-
+chr1	554749	554770	GSM450600_361919	2	-
+chr1	554750	554770	GSM450600_361923	0.5	-
+chr1	554751	554769	GSM450600_631513	1	-
+chr1	554751	554770	GSM450600_361918	3	-
+chr1	554751	554771	GSM450600_449223	2	-
+chr1	554751	554772	GSM450600_858537	1	-
+chr1	554751	554772	GSM450600_860793	3	-
+chr1	554752	554770	GSM450600_361917	3	-
+chr1	554752	554771	GSM450600_449222	1	-
+chr1	554752	554772	GSM450600_860792	1	-
+chr1	554753	554771	GSM450600_449221	2	-
+chr1	554753	554772	GSM450600_860791	1	-
+chr1	554753	554773	GSM450600_518465	2	-
+chr1	554753	554774	GSM450600_902806	2	-
+chr1	554754	554772	GSM450600_860790	1	-
+chr1	554754	554774	GSM450600_902805	1	-
+chr1	554754	554775	GSM450600_1395213	0.333333333333333	-
+chr1	554757	554779	GSM450600_1270609	0.333333333333333	-
+chr1	554760	554778	GSM450600_618071	0.333333333333333	-
+chr1	554760	554781	GSM450600_1407453	0.333333333333333	-
+chr1	554761	554781	GSM450600_1407452	0.333333333333333	-
+chr1	554769	554792	GSM450600_578456	0.2	-
+chr1	554772	554794	GSM450600_1272454	0.333333333333333	-
+chr1	554772	554794	GSM450600_1272458	0.666666666666667	-
+chr1	554772	554795	GSM450600_677346	0.333333333333333	-
+chr1	554773	554794	GSM450600_1272457	1.33333333333333	-
+chr1	554773	554794	GSM450600_501767	0.666666666666667	-
+chr1	554773	554795	GSM450600_677345	0.333333333333333	-
+chr1	554773	554797	GSM450600_371690	0.5	-
+chr1	554773	554797	GSM450600_371692	0.333333333333333	-
+chr1	554774	554794	GSM450600_1272456	0.333333333333333	-
+chr1	554775	554797	GSM450600_371689	0.5	-
+chr1	554776	554796	GSM450600_649963	0.5	-
+chr1	554776	554797	GSM450600_371685	0.5	-
+chr1	554776	554797	GSM450600_371686	0.5	-
+chr1	554776	554797	GSM450600_371688	0.5	-
+chr1	554776	554798	GSM450600_804555	1	-
+chr1	554776	554798	GSM450600_804556	1	-
+chr1	554776	554802	GSM450600_675133	2	-
+chr1	554776	554813	GSM450600_795292	1	-
+chr1	554776	554813	GSM450600_795335	1	-
+chr1	554777	554797	GSM450600_371691	1	-
+chr1	554777	554813	GSM450600_795290	1	-
+chr1	554778	554796	GSM450600_649962	0.5	-
+chr1	554778	554797	GSM450600_371684	1.5	-
+chr1	554778	554797	GSM450600_371687	1	-
+chr1	554778	554798	GSM450600_804553	10	-
+chr1	554778	554798	GSM450600_804554	1	-
+chr1	554778	554798	GSM450600_804557	1	-
+chr1	554778	554799	GSM450600_387204	4	-
+chr1	554778	554800	GSM450600_571277	11	-
+chr1	554778	554800	GSM450600_571278	4	-
+chr1	554778	554800	GSM450600_571281	1	-
+chr1	554778	554800	GSM450600_571282	1	-
+chr1	554778	554801	GSM450600_1168796	0.5	-
+chr1	554778	554801	GSM450600_1168956	1	-
+chr1	554778	554802	GSM450600_675134	1	-
+chr1	554778	554813	GSM450600_795150	1	-
+chr1	554778	554813	GSM450600_795289	1	-
+chr1	554778	554813	GSM450600_795291	1	-
+chr1	554778	554813	GSM450600_795343	1	-
+chr1	554779	554797	GSM450600_371682	46	-
+chr1	554779	554798	GSM450600_804552	67	-
+chr1	554779	554799	GSM450600_248038	0.5	-
+chr1	554779	554799	GSM450600_387203	29	-
+chr1	554779	554799	GSM450600_387207	2	-
+chr1	554779	554800	GSM450600_571276	11	-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/blockbuster_test_result1.bed	Sun Jan 17 06:56:03 2016 -0500
@@ -0,0 +1,4 @@
+chr1	554745	554813	>cluster_1	243.50	-	554745	554813
+chr1	554772	554813	block_1	213.33	-	554772	554813
+chr1	554746	554779	block_2	29.17	-	554746	554779
+chr1	554745	554764	block_3	1.00	-	554745	554764
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/blockbuster_test_result2.blockbuster	Sun Jan 17 06:56:03 2016 -0500
@@ -0,0 +1,4 @@
+>cluster_1	chr1	554745	554813	-	243.50	65	3
+1	chr1	554772	554813	-	213.33	45
+2	chr1	554746	554779	-	29.17	19
+3	chr1	554745	554764	-	1.00	1