changeset 0:413d28ca0b6f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pax2bam commit 07edb81ab753f8ea6001875e84a68f820febfc88"
author iuc
date Sat, 12 Oct 2019 06:50:34 -0400
parents
children bbed92d5d4d9
files bax2bam.xml macros.xml test-data/hqregions.bam test-data/lqregions.bam test-data/polymerase.bam test-data/scraps.bam test-data/scraps_custom.bam test-data/set.1.bax.h5 test-data/set.2.bax.h5 test-data/set.3.bax.h5 test-data/subreads.bam test-data/subreads_custom.bam
diffstat 12 files changed, 140 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bax2bam.xml	Sat Oct 12 06:50:34 2019 -0400
@@ -0,0 +1,128 @@
+<?xml version="1.0"?>
+<tool id="bax2bam" name="bax2bam" version="@TOOL_VERSION@+@WRAPPER_VERSION@">
+    <description>converts PacBio basecall format (bax.h5) into BAM</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <stdio></stdio>
+    <command detect_errors="exit_code"><![CDATA[
+        bax2bam
+            #for $file in $files
+                '$file'
+            #end for
+            -o output
+            $readtype
+            #if $pulsefeatures
+                --pulsefeatures=$pulsefeatures
+            #end if
+            $losslessframes
+            $internal
+    ]]></command>
+    <inputs>
+        <param name="files" type="data" format="h5" multiple="true" label="Files" help="Should be from the same movie."/>
+        <param name="readtype" type="select" label="Output read type" help="">
+            <option value="--subread">subread</option>
+            <option value="--hqregion">hqregion</option>
+            <option value="--polymeraseread">polymeraseread</option>
+        </param>
+        <param argument="--pulsefeatures" type="select" multiple="true" label="Select pulse features in the output BAM." help="">
+            <option value="DeletionQV" selected="true">dq - DeletionQV</option>
+            <option value="DeletionTag" selected="true">dt - DeletionTag</option>
+            <option value="InsertionQV" selected="true">iq - InsertionQV</option>
+            <option value="IPD" selected="true">ip - IPD</option>
+            <option value="PulseWidth" selected="true">pw - PulseWidth</option>
+            <option value="MergeQV" selected="true">mq - MergeQV</option>
+            <option value="SubstitutionQV" selected="true">sq - SubstitutionQV</option>
+            <option value="SubstitutionTag" selected="false">st - SubstitutionTag</option>
+        </param>
+        <param argument="--losslessframes" type="boolean" truevalue="--losslessframes" falsevalue="" checked="false" label="Store full, 16-bit IPD/PulseWidth data" help="Instead of (default) downsampled, 8-bit encoding."/>
+        <param argument="--internal" type="boolean" truevalue="--internal" falsevalue="" checked="false" label="Output BAMs in internal mode." help="Currently this indicates that non-sequencing ZMWs should be included in the output scraps BAM file, if applicable."/>
+    </inputs>
+
+    <outputs>
+        <data name="output_scrap" from_work_dir="output.scraps.bam" format="bam" label="${tool.name} on ${on_string}: scraps">
+            <filter>readtype == '--subread'</filter>
+        </data>
+        <data name="output_subread" from_work_dir="output.subreads.bam" format="bam" label="${tool.name} on ${on_string}: subreads">
+            <filter>readtype == '--subread'</filter>
+        </data>
+        <data name="output_hqregion" from_work_dir="output.hqregions.bam" format="bam" label="${tool.name} on ${on_string}: hqregions">
+            <filter>readtype == '--hqregion'</filter>
+        </data>
+        <data name="output_lqregion" from_work_dir="output.lqregions.bam" format="bam" label="${tool.name} on ${on_string}: lqregions">
+            <filter>readtype == '--hqregion'</filter>
+        </data>
+        <data name="output_polymeraseread" from_work_dir="output.polymerase.bam" format="bam" label="${tool.name} on ${on_string}: polymerase">
+            <filter>readtype == '--polymeraseread'</filter>
+        </data>
+    </outputs>
+        
+    <tests>
+        <!-- source of test data: https://github.com/PacificBiosciences/PacBioTestData/tree/master/data/HdfSubreadSet/Analysis_Results/ -->
+        <!-- #1: read type: subread -->
+        <test>
+            <param name="files" value="set.3.bax.h5,set.2.bax.h5,set.1.bax.h5"/>
+            <param name="readtype" value="--subread"/>
+            <output name="output_scrap" file="scraps.bam" compare="sim_size" delta="100"/>
+            <output name="output_subread" file="subreads.bam" compare="sim_size" delta="100"/>
+        </test>
+        <!-- #2: read type: hqregion -->
+        <test>
+            <param name="files" value="set.3.bax.h5,set.2.bax.h5,set.1.bax.h5"/>
+            <param name="readtype" value="--hqregion"/>
+            <output name="output_hqregion" file="hqregions.bam" compare="sim_size" delta="100"/>
+            <output name="output_hqregion" file="lqregions.bam" compare="sim_size" delta="100"/>
+        </test>
+        <!-- #3: read type: polymeraseread -->
+        <test>
+            <param name="files" value="set.3.bax.h5,set.2.bax.h5,set.1.bax.h5"/>
+            <param name="readtype" value="--polymeraseread" compare="sim_size" delta="100"/>
+            <output name="output_polymeraseread" file="polymerase.bam" compare="sim_size" delta="100"/>
+        </test>
+        <!-- #4: read type: subread, custom parameters -->
+        <test>
+            <param name="files" value="set.3.bax.h5,set.2.bax.h5,set.1.bax.h5"/>
+            <param name="readtype" value="--subread"/>
+            <param name="pulsefeatures" value="SubstitutionTag"/>
+            <param name="losslessframes" value="true"/>
+            <param name="internal" value="true"/>
+            <output name="output_scrap" file="scraps_custom.bam" compare="sim_size" delta="100"/>
+            <output name="output_subread" file="subreads_custom.bam" compare="sim_size" delta="100"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+.. class:: infomark
+
+**What it does**
+
+bax2bam converts the legacy PacBio basecall format (bax.h5) into the BAM basecall format.
+
+**Input**
+
+bax.h5 files that should be from the same movie.
+
+**Output**
+
+A single BAM file. 
+
+.. class:: infomark
+
+**References**
+
+ More information can be found on the github repositories `bax2bam <https://github.com/pacificbiosciences/bax2bam/>`_ and `PacBio Bioconda <https://github.com/PacificBiosciences/pbbioconda>`_.
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+@misc{PacificBiosciences2018,
+  author = {Pacific Biosciences},
+  year = {2018},
+  title = {bax2bam},
+  publisher = {GitHub},
+  journal = {GitHub repository},
+  url = {https://github.com/pacificbiosciences/bax2bam/},
+}
+        </citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Sat Oct 12 06:50:34 2019 -0400
@@ -0,0 +1,12 @@
+<macros>
+    <token name="@TOOL_VERSION@">0.0.9</token> 
+
+    <token name="@WRAPPER_VERSION@">galaxy0</token> 
+
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">bax2bam</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+</macros>
\ No newline at end of file
Binary file test-data/hqregions.bam has changed
Binary file test-data/lqregions.bam has changed
Binary file test-data/polymerase.bam has changed
Binary file test-data/scraps.bam has changed
Binary file test-data/scraps_custom.bam has changed
Binary file test-data/set.1.bax.h5 has changed
Binary file test-data/set.2.bax.h5 has changed
Binary file test-data/set.3.bax.h5 has changed
Binary file test-data/subreads.bam has changed
Binary file test-data/subreads_custom.bam has changed