Previous changeset 3:c96f1a93beb7 (2020-03-12) Next changeset 5:a1dc6db337ca (2020-04-06) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chira commit aafb8e5de9023eeddd7f4683909f418ef5aae086" |
modified:
chira_merge.xml macros.xml test-data/alignments.bed test-data/segments.bed |
b |
diff -r c96f1a93beb7 -r 0170de5072d4 chira_merge.xml --- a/chira_merge.xml Thu Mar 12 17:05:50 2020 -0400 +++ b/chira_merge.xml Fri Mar 20 05:11:17 2020 -0400 |
b |
@@ -9,9 +9,17 @@ -b '$alignments' #if str($annotation.choice) == "yes": -g '$annotation.gtf' - #end if - -ao '$alignment_overlap' + #end if -so '$segment_overlap' + #if str($merge.mode) == "blockbuster": + -bb + -d '$merge.distance' + -mc '$merge.min_cluster_height' + -mb '$merge.min_block_height' + -sc '$merge.scale' + #else: + -ao '$merge.alignment_overlap' + #end if -o ./ ]]></command> @@ -27,12 +35,30 @@ </when> <when value="no"> <!-- Do nothing --> - </when> + </when> </conditional> - <param name="alignment_overlap" type="float" value="0.7" label="Overlap fraction for merging alignments" min="0" max="1" - help="Minimum fraction of BED entries that must overlap inorder to merge"/> <param name="segment_overlap" type="float" value="0.7" label="Overlap fraction for merging mapped read positions to segments" min="0" max="1" help="Matching read positions with greater than this fraction overlap are merged into a segment"/> + <conditional name="merge"> + <param name="mode" type="select" label="Select the mode of merging"> + <option value="overlap">Overlap based</option> + <option value="blockbuster">Gaussian based (blockbuster)</option> + </param> + <when value="overlap"> + <param name="alignment_overlap" type="float" value="0.7" label="Overlap fraction for merging alignments" min="0" max="1" + help="Minimum fraction of BED entries that must overlap inorder to merge"/> + </when> + <when value="blockbuster"> + <param name="distance" type="integer" value="30" label="Blockbuster parameter distance" + help="Minimum distance between two clusters"/> + <param name="min_cluster_height" type="float" value="10" label="Blockbuster parameter minClusterHeight" + help="minimum height (readno) of a cluster"/> + <param name="min_block_height" type="float" value="1" label="Blockbuster parameter minBlockHeight" + help="minimum height (readno) of a block"/> + <param name="scale" type="float" value="0.4" label="Blockbuster parameter scale" min="0" max="1" + help="scale stddev for a single read"/> + </when> + </conditional> </inputs> <outputs> <data format="bed" name="segments_bed" from_work_dir="segments.bed" label="ChiRA aligned read segments on ${on_string}"/> @@ -40,34 +66,54 @@ </outputs> <tests> - <!-- Test: Map without annotation --> + <!-- Test: Merge without annotation --> <test expect_num_outputs="2"> <param name="alignments" value="alignments.bed"/> <param name="choice" value="no" /> <output name="segments_bed" > <assert_contents> - <has_text_matching expression="ENSMUST00000160533\t69\t82\t6|1|4,ENSMUST00000160533,69,82,+,42S13M\t0\t+" /> + <has_text_matching expression="ENSMUST00000160533\t69\t82\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t\+" /> </assert_contents> </output> <output name="merged_bed" > <assert_contents> - <has_text_matching expression="ENSMUST00000182010\t19\t74\t+\t6|1|1,ENSMUST00000182010,19,68,+,5S49M1S;7|9|1,ENSMUST00000182010,24,74,+,5S50M" /> + <has_text_matching expression="ENSMUST00000182010\t408\t477\t\+" /> + <has_text_matching expression="mmu-miR-106a-3p\t4\t15\t\+" /> </assert_contents> </output> </test> - <!-- Test: Map with annotation --> + <!-- Test: Merge with annotation --> <test expect_num_outputs="2"> <param name="alignments" value="alignments.bed" /> <param name="choice" value="yes" /> <param name="gtf" value="annotation.gtf" /> <output name="segments_bed" > <assert_contents> - <has_text_matching expression="5\t137142331\t137142344\t6|1|4,ENSMUST00000160533,69,82,+,42S13M\t0\t-" /> + <has_text_matching expression="5\t137142331\t137142344\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t-" /> </assert_contents> </output> <output name="merged_bed" > <assert_contents> - <has_text_matching expression="17\t39846976\t39847031\t+\t6|1|1,ENSMUST00000182010,19,68,+,5S49M1S;7|9|1,ENSMUST00000182010,24,74,+,5S50M" /> + <has_text_matching expression="17\t39846957\t39847016\t\+" /> + <has_text_matching expression="5\t137142331\t137142344\t-" /> + </assert_contents> + </output> + </test> + <!-- Test: Merge using blockbuster --> + <test expect_num_outputs="2"> + <param name="alignments" value="alignments.bed" /> + <param name="choice" value="yes" /> + <param name="gtf" value="annotation.gtf" /> + <param name="mode" value="blockbuster" /> + <param name="min_cluster_height" value="5" /> + <output name="segments_bed" > + <assert_contents> + <has_text_matching expression="5\t137142331\t137142344\t34\|1\|2,ENSMUST00000160533,69,82,\+,42S13M\t1\t-" /> + </assert_contents> + </output> + <output name="merged_bed" > + <assert_contents> + <has_text_matching expression="17\t39846957\t39847016\t\+" /> </assert_contents> </output> </test> |
b |
diff -r c96f1a93beb7 -r 0170de5072d4 macros.xml --- a/macros.xml Thu Mar 12 17:05:50 2020 -0400 +++ b/macros.xml Fri Mar 20 05:11:17 2020 -0400 |
b |
@@ -1,6 +1,6 @@ <macros> <token name="@WRAPPER_VERSION@">@TOOL_VERSION@+galaxy</token> - <token name="@TOOL_VERSION@">1.0.4</token> + <token name="@TOOL_VERSION@">1.1.2</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">chira</requirement> |
b |
diff -r c96f1a93beb7 -r 0170de5072d4 test-data/alignments.bed --- a/test-data/alignments.bed Thu Mar 12 17:05:50 2020 -0400 +++ b/test-data/alignments.bed Fri Mar 20 05:11:17 2020 -0400 |
b |
b'@@ -1,337 +1,337 @@\n-mmu-miR-124-3p\t0\t20\t3|2,mmu-miR-124-3p,0,20,+,5S20M30S\t0\t+\n-ENSMUST00000182884\t6023\t6051\t28|3,ENSMUST00000182884,6023,6051,+,27S28M\t0\t+\n-ENSMUST00000182010\t428\t477\t36|10,ENSMUST00000182010,428,477,+,5S49M1S\t0\t+\n-ENSMUST00000113560\t1969\t1992\t38|2,ENSMUST00000113560,1969,1992,+,32S23M\t0\t+\n-mmu-miR-9-5p\t0\t23\t11|1,mmu-miR-9-5p,0,23,+,5S23M27S\t0\t+\n-mmu-miR-9-5p\t0\t23\t38|2,mmu-miR-9-5p,0,23,+,5S23M27S\t0\t+\n-ENSMUST00000138581\t1621\t1644\t38|2,ENSMUST00000138581,1621,1644,+,32S23M\t0\t+\n-ENSMUST00000182010\t419\t468\t34|1,ENSMUST00000182010,419,468,+,5S49M1S\t0\t+\n-ENSMUST00000047061\t2204\t2232\t28|3,ENSMUST00000047061,2204,2232,+,27S28M\t0\t+\n-ENSMUST00000100207\t1580\t1603\t38|2,ENSMUST00000100207,1580,1603,+,32S23M\t0\t+\n-ENSMUST00000172109\t1499\t1514\t11|1,ENSMUST00000172109,1499,1514,+,35S15M5S\t0\t+\n-ENSMUST00000182795\t2429\t2457\t28|3,ENSMUST00000182795,2429,2457,+,27S28M\t0\t+\n-ENSMUST00000075326\t1661\t1684\t38|2,ENSMUST00000075326,1661,1684,+,32S23M\t0\t+\n-ENSMUST00000106215\t953\t1003\t21|3,ENSMUST00000106215,953,1003,+,5S50M\t0\t+\n-ENSMUST00000182439\t2218\t2246\t28|3,ENSMUST00000182439,2218,2246,+,27S28M\t0\t+\n-ENSMUST00000185502\t4240\t4290\t7|1,ENSMUST00000185502,4240,4290,+,5S50M\t0\t+\n-ENSMUST00000166060\t435\t467\t19|2,ENSMUST00000166060,435,467,+,26S12M3D17M\t0\t+\n-ENSMUST00000107857\t399\t431\t19|2,ENSMUST00000107857,399,431,+,26S12M3D17M\t0\t+\n-ENSMUST00000155835\t2617\t2667\t4|2,ENSMUST00000155835,2617,2667,+,5S50M\t0\t+\n-ENSMUST00000071555\t1077\t1127\t21|3,ENSMUST00000071555,1077,1127,+,5S50M\t0\t+\n-ENSMUST00000181221\t1499\t1514\t11|1,ENSMUST00000181221,1499,1514,+,35S15M5S\t0\t+\n-ENSMUST00000182010\t424\t474\t35|9,ENSMUST00000182010,424,474,+,5S50M\t0\t+\n-ENSMUST00000100208\t1748\t1771\t38|2,ENSMUST00000100208,1748,1771,+,32S23M\t0\t+\n-ENSMUST00000113562\t1759\t1782\t38|2,ENSMUST00000113562,1759,1782,+,32S23M\t0\t+\n-ENSMUST00000128302\t226\t257\t6|4,ENSMUST00000128302,226,257,+,24S31M\t0\t+\n-ENSMUST00000148758\t777\t805\t27|1,ENSMUST00000148758,777,805,+,27S28M\t0\t+\n-ENSMUST00000111596\t608\t626\t19|2,ENSMUST00000111596,608,626,+,30S18M7S\t0\t+\n-ENSMUST00000106992\t3071\t3121\t16|3,ENSMUST00000106992,3071,3121,+,5S50M\t0\t+\n-mmu-miR-9-5p\t0\t23\t32|1,mmu-miR-9-5p,0,23,+,5S23M27S\t0\t+\n-ENSMUST00000182972\t3233\t3261\t28|3,ENSMUST00000182972,3233,3261,+,27S28M\t0\t+\n-ENSMUST00000064989\t2466\t2516\t29|1,ENSMUST00000064989,2466,2516,+,5S50M\t0\t+\n-ENSMUST00000182029\t3343\t3371\t28|3,ENSMUST00000182029,3343,3371,+,27S28M\t0\t+\n-ENSMUST00000182010\t426\t476\t15|2,ENSMUST00000182010,426,476,+,5S50M\t0\t+\n-ENSMUST00000187980\t1254\t1305\t24|1,ENSMUST00000187980,1254,1305,+,4S51M\t0\t+\n-ENSMUST00000182692\t3374\t3402\t28|3,ENSMUST00000182692,3374,3402,+,27S28M\t0\t+\n-ENSMUST00000167541\t285\t336\t1|3,ENSMUST00000167541,285,336,+,4S51M\t0\t+\n-ENSMUST00000113564\t1723\t1746\t38|2,ENSMUST00000113564,1723,1746,+,32S23M\t0\t+\n-ENSMUST00000128500\t1065\t1088\t38|2,ENSMUST00000128500,1065,1088,+,32S23M\t0\t+\n-ENSMUST00000045218\t5944\t5972\t3|2,ENSMUST00000045218,5944,5972,+,27S28M\t0\t+\n-ENSMUST00000111134\t233\t264\t6|4,ENSMUST00000111134,233,264,+,24S31M\t0\t+\n-ENSMUST00000182010\t9\t59\t8|4,ENSMUST00000182010,9,59,+,5S50M\t0\t+\n-ENSMUST00000167930\t463\t495\t19|2,ENSMUST00000167930,463,495,+,26S12M3D17M\t0\t+\n-ENSMUST00000075012\t856\t906\t14|1,ENSMUST00000075012,856,906,+,5S50M\t0\t+\n-ENSMUST00000041591\t326\t377\t1|3,ENSMUST00000041591,326,377,+,4S51M\t0\t+\n-ENSMUST00000106746\t905\t955\t14|1,ENSMUST00000106746,905,955,+,5S50M\t0\t+\n-ENSMUST00000182437\t2388\t2416\t28|3,ENSMUST00000182437,2388,2416,+,27S28M\t0\t+\n-ENSMUST00000171545\t470\t521\t1|3,ENSMUST00000171545,470,521,+,4S51M\t0\t+\n-ENSMUST00000181455\t1765\t1780\t11|1,ENSMUST00000181455,1765,1780,+,35S15M5S\t0\t+\n-ENSMUST00000032571\t4128\t4178\t20|1,ENSMUST00000032571,4128,4178,+,5S15M1D34M\t0\t+\n-ENSMUST00000092432\t5519\t5547\t28|3,ENSMUST00000092432,5519,5547,+,27S28M\t0\t+\n-ENSMUST00000182010\t0\t47\t31|10,ENSMUST00000182010,0,47,+,8S47M\t0\t+\n-mmu-miR-124-3p\t0\t20\t19|2,mmu-miR-124-3p,0,20,+,6S20M29S\t0\t+\n-ENSMUST00000182010\t0\t44\t5|12,ENSMUST00000182010,0,44,+,9S44M2S\t0\t+\n-ENSMUST00000062147\t344\t394\t21|3,ENSMUST00000062147,344,394,+,5S50M\t0\t+\n-ENSMUST'..b'128275\t79\t93\t2|1,ENSMUST00000128275,79,93,+,40S14M\t1\t+\n+ENSMUST00000194127\t469\t483\t2|1,ENSMUST00000194127,469,483,+,40S14M\t1\t+\n+ENSMUST00000111813\t56\t73\t10|2,ENSMUST00000111813,56,73,+,38S17M\t1\t+\n+ENSMUST00000151752\t1887\t1902\t26|1,ENSMUST00000151752,1887,1902,+,39S15M1S\t1\t+\n+ENSMUST00000137408\t2183\t2198\t26|1,ENSMUST00000137408,2183,2198,+,39S15M1S\t1\t+\n+ENSMUST00000189036\t14\t25\t20|1,ENSMUST00000189036,14,25,+,41S11M2S\t1\t+\n+ENSMUST00000000254\t463\t474\t20|1,ENSMUST00000000254,463,474,+,41S11M2S\t1\t+\n+ENSMUST00000138762\t6784\t6795\t20|1,ENSMUST00000138762,6784,6795,+,43S11M\t1\t+\n+ENSMUST00000129785\t2240\t2251\t20|1,ENSMUST00000129785,2240,2251,+,42S11M1S\t1\t+\n+ENSMUST00000166429\t2767\t2778\t20|1,ENSMUST00000166429,2767,2778,+,41S11M2S\t1\t+\n+ENSMUST00000136610\t265\t276\t20|1,ENSMUST00000136610,265,276,+,42S11M1S\t1\t+\n+ENSMUST00000131422\t2324\t2335\t20|1,ENSMUST00000131422,2324,2335,+,42S11M1S\t1\t+\n+ENSMUST00000142388\t401\t412\t20|1,ENSMUST00000142388,401,412,+,41S11M2S\t1\t+\n+ENSMUST00000075789\t241\t252\t20|1,ENSMUST00000075789,241,252,+,41S11M2S\t1\t+\n+ENSMUST00000053969\t2571\t2582\t20|1,ENSMUST00000053969,2571,2582,+,41S11M2S\t1\t+\n+ENSMUST00000030826\t1172\t1183\t20|1,ENSMUST00000030826,1172,1183,+,42S11M1S\t1\t+\n+ENSMUST00000113169\t7470\t7481\t20|1,ENSMUST00000113169,7470,7481,+,43S11M\t1\t+\n+ENSMUST00000149694\t433\t444\t20|1,ENSMUST00000149694,433,444,+,43S11M\t1\t+\n+ENSMUST00000081569\t891\t902\t20|1,ENSMUST00000081569,891,902,+,43S11M\t1\t+\n+ENSMUST00000073639\t2840\t2851\t20|1,ENSMUST00000073639,2840,2851,+,43S11M\t1\t+\n+ENSMUST00000127216\t2946\t2957\t20|1,ENSMUST00000127216,2946,2957,+,42S11M1S\t1\t+\n+ENSMUST00000087085\t1296\t1307\t20|1,ENSMUST00000087085,1296,1307,+,43S11M\t1\t+\n+ENSMUST00000088373\t8054\t8065\t20|1,ENSMUST00000088373,8054,8065,+,43S11M\t1\t+\n+ENSMUST00000129865\t905\t916\t20|1,ENSMUST00000129865,905,916,+,43S11M\t1\t+\n+ENSMUST00000147228\t572\t585\t13|8,ENSMUST00000147228,572,585,+,13M42S\t1\t+\n+ENSMUST00000106220\t383\t396\t13|8,ENSMUST00000106220,383,396,+,13M42S\t1\t+\n+ENSMUST00000006311\t2407\t2420\t13|8,ENSMUST00000006311,2407,2420,+,13M42S\t1\t+\n+ENSMUST00000099628\t995\t1008\t13|8,ENSMUST00000099628,995,1008,+,13M42S\t1\t+\n+ENSMUST00000114132\t3670\t3682\t23|1,ENSMUST00000114132,3670,3682,+,43S12M\t1\t+\n+ENSMUST00000028761\t3500\t3512\t23|1,ENSMUST00000028761,3500,3512,+,43S12M\t1\t+\n+ENSMUST00000029025\t3154\t3166\t23|1,ENSMUST00000029025,3154,3166,+,43S12M\t1\t+\n+ENSMUST00000055032\t3310\t3323\t31|10,ENSMUST00000055032,3310,3323,+,13M42S\t1\t+\n+ENSMUST00000168713\t538\t551\t31|10,ENSMUST00000168713,538,551,+,1S13M41S\t1\t+\n+ENSMUST00000187296\t2127\t2140\t31|10,ENSMUST00000187296,2127,2140,+,13M42S\t1\t+\n+ENSMUST00000167448\t329\t342\t31|10,ENSMUST00000167448,329,342,+,1S13M41S\t1\t+\n+ENSMUST00000043169\t442\t455\t31|10,ENSMUST00000043169,442,455,+,1S13M41S\t1\t+\n+ENSMUST00000045562\t3691\t3703\t5|12,ENSMUST00000045562,3691,3703,+,2S12M41S\t1\t+\n+ENSMUST00000179869\t1671\t1683\t5|12,ENSMUST00000179869,1671,1683,+,12M43S\t1\t+\n+ENSMUST00000182010\t408\t445\t22|1,ENSMUST00000182010,408,445,+,5S37M13S\t1\t+\n+ENSMUST00000182010\t409\t445\t12|3,ENSMUST00000182010,409,445,+,5S36M14S\t1\t+\n+ENSMUST00000182010\t419\t445\t34|1,ENSMUST00000182010,419,445,+,5S26M24S\t1\t+\n+ENSMUST00000182010\t424\t445\t35|9,ENSMUST00000182010,424,445,+,5S21M29S\t1\t+\n+ENSMUST00000182010\t426\t445\t15|2,ENSMUST00000182010,426,445,+,5S19M31S\t1\t+\n+ENSMUST00000182010\t428\t445\t36|10,ENSMUST00000182010,428,445,+,5S17M33S\t1\t+\n+ENSMUST00000182010\t430\t445\t30|4,ENSMUST00000182010,430,445,+,5S15M35S\t1\t+\n+ENSMUST00000182010\t446\t458\t22|1,ENSMUST00000182010,446,458,+,43S12M\t1\t+\n+ENSMUST00000182010\t446\t459\t12|3,ENSMUST00000182010,446,459,+,42S13M\t1\t+\n+ENSMUST00000182010\t446\t458\t34|1,ENSMUST00000182010,446,458,+,32S12M11S\t1\t+\n+ENSMUST00000182010\t446\t468\t35|9,ENSMUST00000182010,446,468,+,27S22M6S\t1\t+\n+ENSMUST00000182010\t446\t468\t15|2,ENSMUST00000182010,446,468,+,25S22M8S\t1\t+\n+ENSMUST00000182010\t446\t468\t36|10,ENSMUST00000182010,446,468,+,23S22M10S\t1\t+\n+ENSMUST00000182010\t446\t468\t30|4,ENSMUST00000182010,446,468,+,21S22M12S\t1\t+\n+ENSMUST00000064314\t967\t982\t23|1,ENSMUST00000064314,967,982,+,18S15M22S\t1\t+\n' |
b |
diff -r c96f1a93beb7 -r 0170de5072d4 test-data/segments.bed --- a/test-data/segments.bed Thu Mar 12 17:05:50 2020 -0400 +++ b/test-data/segments.bed Fri Mar 20 05:11:17 2020 -0400 |
b |
@@ -1,13 +1,13 @@ -ENSMUST00000182010 19 68 6|1|1,ENSMUST00000182010,19,68,+,5S49M1S 0 + -ENSMUST00000182010 24 74 7|9|1,ENSMUST00000182010,24,74,+,5S50M 0 + -mmu-miR-20a-5p 0 23 3|2|1,mmu-miR-20a-5p,0,23,+,5S23M27S 0 + -mmu-miR-6898-5p 11 21 2|2|1,mmu-miR-6898-5p,11,21,+,10M39S 0 + -mmu-miR-6979-3p 2 12 4|1|1,mmu-miR-6979-3p,2,12,+,29S10M15S 0 + -ENSMUST00000137264 12 27 2|2|2,ENSMUST00000137264,12,27,+,4S15M30S 0 + -ENSMUST00000136025 32 46 4|1|2,ENSMUST00000136025,32,46,+,1S14M39S 0 + -ENSMUST00000136025 132 142 3|2|2,ENSMUST00000136025,132,142,+,34S10M11S 0 + -ENSMUST00000182010 19 45 6|1|2,ENSMUST00000182010,19,45,+,5S26M24S 0 + -ENSMUST00000182010 24 45 7|9|2,ENSMUST00000182010,24,45,+,5S21M29S 0 + -ENSMUST00000182010 46 58 6|1|3,ENSMUST00000182010,46,58,+,32S12M11S 0 + -ENSMUST00000182010 46 68 7|9|3,ENSMUST00000182010,46,68,+,27S22M6S 0 + -ENSMUST00000160533 69 82 6|1|4,ENSMUST00000160533,69,82,+,42S13M 0 + +ENSMUST00000182010 19 68 6|1|1,ENSMUST00000182010,19,68,+,5S49M1S 1 + +ENSMUST00000182010 24 74 7|9|1,ENSMUST00000182010,24,74,+,5S50M 1 + +mmu-miR-20a-5p 0 23 3|2|1,mmu-miR-20a-5p,0,23,+,5S23M27S 1 + +mmu-miR-6898-5p 11 21 2|2|1,mmu-miR-6898-5p,11,21,+,10M39S 1 + +mmu-miR-6979-3p 2 12 4|1|1,mmu-miR-6979-3p,2,12,+,29S10M15S 1 + +ENSMUST00000137264 12 27 2|2|2,ENSMUST00000137264,12,27,+,4S15M30S 1 + +ENSMUST00000136025 32 46 4|1|2,ENSMUST00000136025,32,46,+,1S14M39S 1 + +ENSMUST00000136025 132 142 3|2|2,ENSMUST00000136025,132,142,+,34S10M11S 1 + +ENSMUST00000182010 19 45 6|1|2,ENSMUST00000182010,19,45,+,5S26M24S 1 + +ENSMUST00000182010 24 45 7|9|2,ENSMUST00000182010,24,45,+,5S21M29S 1 + +ENSMUST00000182010 46 58 6|1|3,ENSMUST00000182010,46,58,+,32S12M11S 1 + +ENSMUST00000182010 46 68 7|9|3,ENSMUST00000182010,46,68,+,27S22M6S 1 + +ENSMUST00000160533 69 82 6|1|4,ENSMUST00000160533,69,82,+,42S13M 1 + |