diff ivar_trim.xml @ 4:db536ad45f28 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 693df287d23b0fd9dfd134b41d401a438c3f5ad6"
author iuc
date Mon, 22 Jun 2020 07:30:46 -0400
parents 5d6ed46cc101
children cf65217ad61c
line wrap: on
line diff
--- a/ivar_trim.xml	Fri Jun 05 04:12:52 2020 -0400
+++ b/ivar_trim.xml	Mon Jun 22 07:30:46 2020 -0400
@@ -1,17 +1,23 @@
-<tool id="ivar_trim" name="ivar trim" version="@VERSION@+galaxy0">
+<tool id="ivar_trim" name="ivar trim" version="@VERSION@+galaxy1">
     <description>Trim reads in aligned BAM</description>
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements" />
+    <expand macro="requirements">
+        <requirement type="package" version="3.8.1">python</requirement>
+    </expand>
     <expand macro="version_command" />
     <command detect_errors="exit_code"><![CDATA[
         #if $primer.source == "history"
-            ln -s '$primer.input_bed' bed.bed &&
+            cp '$primer.input_bed' bed.bed &&
         #else
-            ln -s '$primer.cached_bed.fields.path' bed.bed &&
-        #end if 
+            cp '$primer.cached_bed.fields.path' bed.bed &&
+        #end if
+        python '$__tool_directory__/sanitize_bed.py' bed.bed &&
+
         ln -s '$input_bam' sorted.bam &&
+        ln -s '${input_bam.metadata.bam_index}' sorted.bam.bai &&
+
         ivar trim
         -i sorted.bam
         -b bed.bed
@@ -57,6 +63,13 @@
             <param name="inc_primers" value="true" />
             <output name="output_bam" file="covid19/PC00101P_sub.sorted.bam" compare="sim_size" delta="300000"/>
         </test>
+        <test>
+            <!-- Test with primer bed file that needs to be sanitized -->
+            <param name="input_bam" value="covid19/PC00101P_sub.sorted.bam" />
+            <param name="input_bed" value="covid19/ARTIC-V1-bad.bed" />
+            <param name="inc_primers" value="true" />
+            <output name="output_bam" file="covid19/PC00101P_sub.sorted.bam" compare="sim_size" delta="300000"/>
+        </test>
         <!-- #1: Zika data-->
         <test>
             <conditional name="primer">