diff ivar_trim.xml @ 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 8858fa037a15
children 5d6ed46cc101
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