diff bam_to_psl.xml @ 0:b6794f4cb1c6 draft default tip

Uploaded
author greg
date Mon, 12 Dec 2022 14:42:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bam_to_psl.xml	Mon Dec 12 14:42:58 2022 +0000
@@ -0,0 +1,40 @@
+<tool id="bam_to_psl" name="Convert BAM to PSL format" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+  <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[
+#if $input.ext == 'bam':
+    samtools view -o 'input.sam' -h '$input' &&
+#else:
+    ln -s '$input' 'input.sam' &&
+#end if
+python '${__tool_directory__}/bam_to_psl.py' 
+--input_file 'input.sam'
+--output_file '$output'
+    ]]></command>
+    <inputs>
+        <param name="input" type="data" format="bam,sam" label="BAM or SAM file"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="psl"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="input_1.sam" ftype="sam"/>
+            <output name="output" value="output_1.psl" ftype="psl" compare="contains"/>
+        </test>
+        <test>
+            <param name="input" value="input_2.bam" ftype="bam"/>
+            <output name="output" value="output_2.psl" ftype="psl" compare="contains"/>
+        </test>
+    </tests>
+    <help>
+**What it does**
+
+Converts a BAM or SAM dataset to PSL format - https://genome.ucsc.edu/FAQ/FAQformat.html#format2.
+    </help>
+    <expand macro="citations"/>
+</tool>
+