changeset 2:cb903c9dc33d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 2d91c217cf30938da84dea51aa3c45a7789db0fc"
author iuc
date Wed, 22 Apr 2020 06:05:42 -0400
parents d37ede8589b2
children 5d6ed46cc101
files ivar_trim.xml macros.xml test-data/primer_scheme_bedfiles.loc test-data/sars-cov-2/SARS-CoV-2-ARTICv1.bed test-data/sars-cov-2/sars_cov2_trimmed.bam test-data/sars-cov-2/sars_cov2_untrimmed.bam tool-data/primer_scheme_bedfiles.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 9 files changed, 265 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ivar_trim.xml	Sat Apr 04 12:37:43 2020 -0400
+++ b/ivar_trim.xml	Wed Apr 22 06:05:42 2020 -0400
@@ -6,7 +6,11 @@
     <expand macro="requirements" />
     <expand macro="version_command" />
     <command detect_errors="exit_code"><![CDATA[
-        ln -s '$input_bed' bed.bed &&
+        #if $primer.source == "history"
+            ln -s '$primer.input_bed' bed.bed &&
+        #else
+            ln -s '$primer.cached_bed.fields.path' bed.bed &&
+        #end if 
         ln -s '$input_bam' sorted.bam &&
         ivar trim
         -i sorted.bam
@@ -21,7 +25,23 @@
     ]]>    </command>
     <inputs>
         <param name="input_bam" argument="-i" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/>
-        <param name="input_bed" argument="-b" type="data" format="bed" label="BED file with primer sequences and positions"/>
+        <conditional name="primer">
+            <param label="Source of primer information" name="source" type="select">
+                <option value="history" selected="true">History</option>
+                <option value="cached">Built-in</option>
+            </param>
+            <when value="history">
+                <param name="input_bed" argument="-b" type="data" format="bed" label="BED file with primer sequences and positions"/>
+            </when>
+            <when value="cached">
+                <param name="cached_bed" type="select" label="Primer scheme name" help="Select primer scheme bed file from a list">
+                    <options from_data_table="primer_scheme_bedfiles">
+                        <filter type="sort_by" column="1" />
+                    <validator type="no_options" message="No primer schemes are available" />
+                    </options>
+                </param>
+            </when>
+        </conditional>
         <param name="min_len" argument="-m" type="integer" min="0" value="30" label="Minimum length of read to retain after trimming"/>
         <param name="min_qual" argument="-q" type="integer" min="0" value="20" label="Minimum quality threshold for sliding window to pass"/>
         <param name="window_width" argument="-s" type="integer" min="0" value="4" label="Width of sliding window"/>
@@ -40,15 +60,29 @@
         </test>
         <!-- #1: Zika data-->
         <test>
+            <conditional name="primer">
+                <param name="source" value="history" />
+                <param name="input_bed" value="zika/db/zika_primers.bed" />
+            </conditional>
             <param name="input_bam" value="zika/Z52_a.sorted.bam" />
-            <param name="input_bed" value="zika/db/zika_primers.bed" />
             <output name="output_bam" file="zika/Z52_a.trimmed.sorted.bam" compare="sim_size" delta="100000"/>
         </test>
         <test>
+            <conditional name="primer">
+                <param name="source" value="history" />
+                <param name="input_bed" value="zika/db/zika_primers.bed" />
+            </conditional>
             <param name="input_bam" value="zika/Z52_b.sorted.bam" />
-            <param name="input_bed" value="zika/db/zika_primers.bed" />
             <output name="output_bam" file="zika/Z52_b.trimmed.sorted.bam" compare="sim_size" delta="100000"/>
         </test>
+        <test>
+            <conditional name="primer">
+                <param name="source" value="cached" />
+                <param name="cached_bed" value="SARS-CoV-2-ARTICv1" />
+            </conditional>
+            <param name="input_bam" value="sars-cov-2/sars_cov2_untrimmed.bam" ftype="bam" />
+            <output name="output_bam" file="sars-cov-2/sars_cov2_trimmed.bam" />
+        </test>
     </tests>
     <help><![CDATA[
         iVar uses primer positions supplied in a BED file to soft clip primer
--- a/macros.xml	Sat Apr 04 12:37:43 2020 -0400
+++ b/macros.xml	Wed Apr 22 06:05:42 2020 -0400
@@ -1,5 +1,5 @@
 <macros>
-  <token name="@VERSION@">1.2</token>
+  <token name="@VERSION@">1.2.1</token>
   <xml name="requirements">
     <requirements>
       <requirement type="package" version="@VERSION@">ivar</requirement>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/primer_scheme_bedfiles.loc	Wed Apr 22 06:05:42 2020 -0400
@@ -0,0 +1,8 @@
+# this is a tab separated file describing the location of primer schemes used for amplicon
+# sequencing (e.g. using the ARTIC SARS-CoV-2 protocol)
+#
+# the columns are:
+# value  description path
+#
+# for example
+SARS-CoV-2-ARTICv1	SARS-CoV-2-ARTIC v1	${__HERE__}/sars-cov-2/SARS-CoV-2-ARTICv1.bed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sars-cov-2/SARS-CoV-2-ARTICv1.bed	Wed Apr 22 06:05:42 2020 -0400
@@ -0,0 +1,196 @@
+MN908947.3	30	54	nCoV-2019_1_LEFT	60	+
+MN908947.3	385	410	nCoV-2019_1_RIGHT	60	-
+MN908947.3	320	342	nCoV-2019_2_LEFT	60	+
+MN908947.3	704	726	nCoV-2019_2_RIGHT	60	-
+MN908947.3	642	664	nCoV-2019_3_LEFT	60	+
+MN908947.3	1004	1028	nCoV-2019_3_RIGHT	60	-
+MN908947.3	943	965	nCoV-2019_4_LEFT	60	+
+MN908947.3	1312	1337	nCoV-2019_4_RIGHT	60	-
+MN908947.3	1242	1264	nCoV-2019_5_LEFT	60	+
+MN908947.3	1623	1651	nCoV-2019_5_RIGHT	60	-
+MN908947.3	1573	1595	nCoV-2019_6_LEFT	60	+
+MN908947.3	1942	1964	nCoV-2019_6_RIGHT	60	-
+MN908947.3	1875	1897	nCoV-2019_7_LEFT	60	+
+MN908947.3	2247	2269	nCoV-2019_7_RIGHT	60	-
+MN908947.3	2181	2205	nCoV-2019_8_LEFT	60	+
+MN908947.3	2568	2592	nCoV-2019_8_RIGHT	60	-
+MN908947.3	2505	2529	nCoV-2019_9_LEFT	60	+
+MN908947.3	2882	2904	nCoV-2019_9_RIGHT	60	-
+MN908947.3	2826	2850	nCoV-2019_10_LEFT	60	+
+MN908947.3	3183	3210	nCoV-2019_10_RIGHT	60	-
+MN908947.3	3144	3166	nCoV-2019_11_LEFT	60	+
+MN908947.3	3507	3531	nCoV-2019_11_RIGHT	60	-
+MN908947.3	3460	3482	nCoV-2019_12_LEFT	60	+
+MN908947.3	3826	3853	nCoV-2019_12_RIGHT	60	-
+MN908947.3	3771	3795	nCoV-2019_13_LEFT	60	+
+MN908947.3	4142	4164	nCoV-2019_13_RIGHT	60	-
+MN908947.3	4054	4077	nCoV-2019_14_LEFT	60	+
+MN908947.3	4428	4450	nCoV-2019_14_RIGHT	60	-
+MN908947.3	4294	4321	nCoV-2019_15_LEFT	60	+
+MN908947.3	4674	4696	nCoV-2019_15_RIGHT	60	-
+MN908947.3	4636	4658	nCoV-2019_16_LEFT	60	+
+MN908947.3	4995	5017	nCoV-2019_16_RIGHT	60	-
+MN908947.3	4939	4966	nCoV-2019_17_LEFT	60	+
+MN908947.3	5296	5321	nCoV-2019_17_RIGHT	60	-
+MN908947.3	5230	5259	nCoV-2019_18_LEFT	60	+
+MN908947.3	5620	5644	nCoV-2019_18_RIGHT	60	-
+MN908947.3	5563	5586	nCoV-2019_19_LEFT	60	+
+MN908947.3	5932	5957	nCoV-2019_19_RIGHT	60	-
+MN908947.3	5867	5894	nCoV-2019_20_LEFT	60	+
+MN908947.3	6247	6272	nCoV-2019_20_RIGHT	60	-
+MN908947.3	6167	6196	nCoV-2019_21_LEFT	60	+
+MN908947.3	6528	6550	nCoV-2019_21_RIGHT	60	-
+MN908947.3	6466	6495	nCoV-2019_22_LEFT	60	+
+MN908947.3	6846	6873	nCoV-2019_22_RIGHT	60	-
+MN908947.3	6718	6745	nCoV-2019_23_LEFT	60	+
+MN908947.3	7092	7117	nCoV-2019_23_RIGHT	60	-
+MN908947.3	7035	7058	nCoV-2019_24_LEFT	60	+
+MN908947.3	7389	7415	nCoV-2019_24_RIGHT	60	-
+MN908947.3	7305	7332	nCoV-2019_25_LEFT	60	+
+MN908947.3	7671	7694	nCoV-2019_25_RIGHT	60	-
+MN908947.3	7626	7651	nCoV-2019_26_LEFT	60	+
+MN908947.3	7997	8019	nCoV-2019_26_RIGHT	60	-
+MN908947.3	7943	7968	nCoV-2019_27_LEFT	60	+
+MN908947.3	8319	8341	nCoV-2019_27_RIGHT	60	-
+MN908947.3	8249	8275	nCoV-2019_28_LEFT	60	+
+MN908947.3	8635	8661	nCoV-2019_28_RIGHT	60	-
+MN908947.3	8595	8619	nCoV-2019_29_LEFT	60	+
+MN908947.3	8954	8983	nCoV-2019_29_RIGHT	60	-
+MN908947.3	8888	8913	nCoV-2019_30_LEFT	60	+
+MN908947.3	9245	9271	nCoV-2019_30_RIGHT	60	-
+MN908947.3	9204	9226	nCoV-2019_31_LEFT	60	+
+MN908947.3	9557	9585	nCoV-2019_31_RIGHT	60	-
+MN908947.3	9477	9502	nCoV-2019_32_LEFT	60	+
+MN908947.3	9834	9858	nCoV-2019_32_RIGHT	60	-
+MN908947.3	9784	9806	nCoV-2019_33_LEFT	60	+
+MN908947.3	10146	10171	nCoV-2019_33_RIGHT	60	-
+MN908947.3	10076	10099	nCoV-2019_34_LEFT	60	+
+MN908947.3	10437	10459	nCoV-2019_34_RIGHT	60	-
+MN908947.3	10362	10384	nCoV-2019_35_LEFT	60	+
+MN908947.3	10737	10763	nCoV-2019_35_RIGHT	60	-
+MN908947.3	10666	10688	nCoV-2019_36_LEFT	60	+
+MN908947.3	11048	11074	nCoV-2019_36_RIGHT	60	-
+MN908947.3	10999	11022	nCoV-2019_37_LEFT	60	+
+MN908947.3	11372	11394	nCoV-2019_37_RIGHT	60	-
+MN908947.3	11306	11331	nCoV-2019_38_LEFT	60	+
+MN908947.3	11668	11693	nCoV-2019_38_RIGHT	60	-
+MN908947.3	11555	11584	nCoV-2019_39_LEFT	60	+
+MN908947.3	11927	11949	nCoV-2019_39_RIGHT	60	-
+MN908947.3	11863	11889	nCoV-2019_40_LEFT	60	+
+MN908947.3	12234	12256	nCoV-2019_40_RIGHT	60	-
+MN908947.3	12110	12133	nCoV-2019_41_LEFT	60	+
+MN908947.3	12465	12490	nCoV-2019_41_RIGHT	60	-
+MN908947.3	12417	12439	nCoV-2019_42_LEFT	60	+
+MN908947.3	12779	12802	nCoV-2019_42_RIGHT	60	-
+MN908947.3	12710	12732	nCoV-2019_43_LEFT	60	+
+MN908947.3	13074	13096	nCoV-2019_43_RIGHT	60	-
+MN908947.3	13005	13027	nCoV-2019_44_LEFT	60	+
+MN908947.3	13378	13400	nCoV-2019_44_RIGHT	60	-
+MN908947.3	13319	13344	nCoV-2019_45_LEFT	60	+
+MN908947.3	13669	13699	nCoV-2019_45_RIGHT	60	-
+MN908947.3	13599	13621	nCoV-2019_46_LEFT	60	+
+MN908947.3	13962	13984	nCoV-2019_46_RIGHT	60	-
+MN908947.3	13918	13946	nCoV-2019_47_LEFT	60	+
+MN908947.3	14271	14299	nCoV-2019_47_RIGHT	60	-
+MN908947.3	14207	14232	nCoV-2019_48_LEFT	60	+
+MN908947.3	14579	14601	nCoV-2019_48_RIGHT	60	-
+MN908947.3	14545	14570	nCoV-2019_49_LEFT	60	+
+MN908947.3	14898	14926	nCoV-2019_49_RIGHT	60	-
+MN908947.3	14865	14895	nCoV-2019_50_LEFT	60	+
+MN908947.3	15224	15246	nCoV-2019_50_RIGHT	60	-
+MN908947.3	15171	15193	nCoV-2019_51_LEFT	60	+
+MN908947.3	15538	15560	nCoV-2019_51_RIGHT	60	-
+MN908947.3	15481	15503	nCoV-2019_52_LEFT	60	+
+MN908947.3	15861	15886	nCoV-2019_52_RIGHT	60	-
+MN908947.3	15827	15851	nCoV-2019_53_LEFT	60	+
+MN908947.3	16186	16209	nCoV-2019_53_RIGHT	60	-
+MN908947.3	16118	16144	nCoV-2019_54_LEFT	60	+
+MN908947.3	16485	16510	nCoV-2019_54_RIGHT	60	-
+MN908947.3	16416	16444	nCoV-2019_55_LEFT	60	+
+MN908947.3	16804	16833	nCoV-2019_55_RIGHT	60	-
+MN908947.3	16748	16770	nCoV-2019_56_LEFT	60	+
+MN908947.3	17130	17152	nCoV-2019_56_RIGHT	60	-
+MN908947.3	17065	17087	nCoV-2019_57_LEFT	60	+
+MN908947.3	17430	17452	nCoV-2019_57_RIGHT	60	-
+MN908947.3	17381	17406	nCoV-2019_58_LEFT	60	+
+MN908947.3	17738	17761	nCoV-2019_58_RIGHT	60	-
+MN908947.3	17674	17697	nCoV-2019_59_LEFT	60	+
+MN908947.3	18036	18062	nCoV-2019_59_RIGHT	60	-
+MN908947.3	17966	17993	nCoV-2019_60_LEFT	60	+
+MN908947.3	18324	18348	nCoV-2019_60_RIGHT	60	-
+MN908947.3	18253	18275	nCoV-2019_61_LEFT	60	+
+MN908947.3	18650	18672	nCoV-2019_61_RIGHT	60	-
+MN908947.3	18596	18618	nCoV-2019_62_LEFT	60	+
+MN908947.3	18957	18979	nCoV-2019_62_RIGHT	60	-
+MN908947.3	18896	18918	nCoV-2019_63_LEFT	60	+
+MN908947.3	19275	19297	nCoV-2019_63_RIGHT	60	-
+MN908947.3	19204	19232	nCoV-2019_64_LEFT	60	+
+MN908947.3	19591	19616	nCoV-2019_64_RIGHT	60	-
+MN908947.3	19548	19570	nCoV-2019_65_LEFT	60	+
+MN908947.3	19911	19939	nCoV-2019_65_RIGHT	60	-
+MN908947.3	19844	19866	nCoV-2019_66_LEFT	60	+
+MN908947.3	20231	20255	nCoV-2019_66_RIGHT	60	-
+MN908947.3	20172	20200	nCoV-2019_67_LEFT	60	+
+MN908947.3	20542	20572	nCoV-2019_67_RIGHT	60	-
+MN908947.3	20472	20496	nCoV-2019_68_LEFT	60	+
+MN908947.3	20867	20890	nCoV-2019_68_RIGHT	60	-
+MN908947.3	20786	20813	nCoV-2019_69_LEFT	60	+
+MN908947.3	21146	21169	nCoV-2019_69_RIGHT	60	-
+MN908947.3	21075	21104	nCoV-2019_70_LEFT	60	+
+MN908947.3	21427	21455	nCoV-2019_70_RIGHT	60	-
+MN908947.3	21357	21386	nCoV-2019_71_LEFT	60	+
+MN908947.3	21716	21743	nCoV-2019_71_RIGHT	60	-
+MN908947.3	21658	21682	nCoV-2019_72_LEFT	60	+
+MN908947.3	22013	22038	nCoV-2019_72_RIGHT	60	-
+MN908947.3	21961	21990	nCoV-2019_73_LEFT	60	+
+MN908947.3	22324	22346	nCoV-2019_73_RIGHT	60	-
+MN908947.3	22262	22290	nCoV-2019_74_LEFT	60	+
+MN908947.3	22626	22650	nCoV-2019_74_RIGHT	60	-
+MN908947.3	22516	22542	nCoV-2019_75_LEFT	60	+
+MN908947.3	22877	22903	nCoV-2019_75_RIGHT	60	-
+MN908947.3	22797	22819	nCoV-2019_76_LEFT	60	+
+MN908947.3	23192	23214	nCoV-2019_76_RIGHT	60	-
+MN908947.3	23122	23144	nCoV-2019_77_LEFT	60	+
+MN908947.3	23500	23522	nCoV-2019_77_RIGHT	60	-
+MN908947.3	23443	23466	nCoV-2019_78_LEFT	60	+
+MN908947.3	23822	23847	nCoV-2019_78_RIGHT	60	-
+MN908947.3	23789	23812	nCoV-2019_79_LEFT	60	+
+MN908947.3	24145	24169	nCoV-2019_79_RIGHT	60	-
+MN908947.3	24078	24100	nCoV-2019_80_LEFT	60	+
+MN908947.3	24443	24467	nCoV-2019_80_RIGHT	60	-
+MN908947.3	24391	24416	nCoV-2019_81_LEFT	60	+
+MN908947.3	24765	24789	nCoV-2019_81_RIGHT	60	-
+MN908947.3	24696	24721	nCoV-2019_82_LEFT	60	+
+MN908947.3	25052	25076	nCoV-2019_82_RIGHT	60	-
+MN908947.3	24978	25003	nCoV-2019_83_LEFT	60	+
+MN908947.3	25347	25369	nCoV-2019_83_RIGHT	60	-
+MN908947.3	25279	25301	nCoV-2019_84_LEFT	60	+
+MN908947.3	25646	25673	nCoV-2019_84_RIGHT	60	-
+MN908947.3	25601	25623	nCoV-2019_85_LEFT	60	+
+MN908947.3	25969	25994	nCoV-2019_85_RIGHT	60	-
+MN908947.3	25902	25924	nCoV-2019_86_LEFT	60	+
+MN908947.3	26290	26315	nCoV-2019_86_RIGHT	60	-
+MN908947.3	26197	26219	nCoV-2019_87_LEFT	60	+
+MN908947.3	26566	26590	nCoV-2019_87_RIGHT	60	-
+MN908947.3	26520	26542	nCoV-2019_88_LEFT	60	+
+MN908947.3	26890	26913	nCoV-2019_88_RIGHT	60	-
+MN908947.3	26835	26857	nCoV-2019_89_LEFT	60	+
+MN908947.3	27202	27227	nCoV-2019_89_RIGHT	60	-
+MN908947.3	27141	27164	nCoV-2019_90_LEFT	60	+
+MN908947.3	27511	27533	nCoV-2019_90_RIGHT	60	-
+MN908947.3	27446	27471	nCoV-2019_91_LEFT	60	+
+MN908947.3	27825	27854	nCoV-2019_91_RIGHT	60	-
+MN908947.3	27784	27808	nCoV-2019_92_LEFT	60	+
+MN908947.3	28145	28172	nCoV-2019_92_RIGHT	60	-
+MN908947.3	28081	28104	nCoV-2019_93_LEFT	60	+
+MN908947.3	28442	28464	nCoV-2019_93_RIGHT	60	-
+MN908947.3	28394	28416	nCoV-2019_94_LEFT	60	+
+MN908947.3	28756	28779	nCoV-2019_94_RIGHT	60	-
+MN908947.3	28677	28699	nCoV-2019_95_LEFT	60	+
+MN908947.3	29041	29063	nCoV-2019_95_RIGHT	60	-
+MN908947.3	28985	29007	nCoV-2019_96_LEFT	60	+
+MN908947.3	29356	29378	nCoV-2019_96_RIGHT	60	-
+MN908947.3	29288	29316	nCoV-2019_97_LEFT	60	+
+MN908947.3	29665	29693	nCoV-2019_97_RIGHT	60	-
+MN908947.3	29486	29510	nCoV-2019_98_LEFT	60	+
+MN908947.3	29836	29866	nCoV-2019_98_RIGHT	60	-
Binary file test-data/sars-cov-2/sars_cov2_trimmed.bam has changed
Binary file test-data/sars-cov-2/sars_cov2_untrimmed.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/primer_scheme_bedfiles.loc.sample	Wed Apr 22 06:05:42 2020 -0400
@@ -0,0 +1,8 @@
+# this is a tab separated file describing the location of primer schemes used for amplicon
+# sequencing (e.g. using the ARTIC SARS-CoV-2 protocol)
+#
+# the columns are:
+# value  description path
+#
+# for example
+# SARS-CoV-2-ARTICv1   SARS-CoV-2-ARTIC v1 primers    /data/galaxy/tool_data/artic_primers/SARS-CoV-2-ARTICv1.bed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Wed Apr 22 06:05:42 2020 -0400
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of primer scheme BED files -->
+    <table name="primer_scheme_bedfiles" comment_char="#">
+        <columns>value, description, path</columns>
+        <file path="tool-data/primer_scheme_bedfiles.loc" />
+    </table>
+</tables>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test	Wed Apr 22 06:05:42 2020 -0400
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of primer scheme BED files -->
+    <table name="primer_scheme_bedfiles" comment_char="#">
+        <columns>value, description, path</columns>
+        <file path="${__HERE__}/test-data/primer_scheme_bedfiles.loc" />
+    </table>
+</tables>