view bax2bam.xml @ 2:0cd3f1c577de draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/pax2bam commit 958bbd9e30ae4d320f872f1ab5e1bacfb28b1a00"
author iuc
date Sat, 17 Apr 2021 10:40:28 +0000
parents bbed92d5d4d9
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="bax2bam" name="bax2bam" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>converts PacBio basecall format (bax.h5) into BAM</description>
    <macros>
        <token name="@TOOL_VERSION@">0.0.11</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <edam_topics>
        <edam_topic>topic_3168</edam_topic> <!-- Topic - Laboratory techniques - Sequencing -->
    </edam_topics>
    <edam_operations>
        <edam_operation>operation_3434</edam_operation> <!-- Operation - Conversion -->
    </edam_operations>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">bax2bam</requirement>
    </requirements>
    <version_command><![CDATA[bax2bam --version]]></version_command>
    <command detect_errors="exit_code"><![CDATA[
## skipped -h/--help, --xml, -f, --output-xml, --ccs (see https://github.com/PacificBiosciences/pbbioconda/issues/215)

## run
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="Select files" help="Should be from the same movie."/>
        <param name="readtype" type="select" label="Select output read type">
            <option value="--hqregion">Hqregion</option>
            <option value="--polymeraseread">Polymeraseread</option>
            <option value="--subread">Subread</option>
        </param>
        <param argument="--pulsefeatures" type="select" multiple="true" label="Select pulse features in output BAM">
            <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="MergeQV" selected="true">mq - MergeQV</option>
            <option value="PulseWidth" selected="true">pw - PulseWidth</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="" label="Store full, 16-bit IPD/PulseWidth data?" help="Instead of 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>
        <!-- test data source https://github.com/PacificBiosciences/PacBioTestData/tree/master/data/HdfSubreadSet/Analysis_Results/ -->

        <!-- #1 subread, default -->
        <test expect_num_outputs="2">
            <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">
                <assert_contents>
                    <has_size value="113578" delta="100"/>
                </assert_contents>
            </output>
            <output name="output_subread">
                <assert_contents>
                    <has_size value="242552" delta="100"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 hqregion, default -->
        <test expect_num_outputs="2">
            <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">
                <assert_contents>
                    <has_size value="232342" delta="100"/>
                </assert_contents>
            </output>
            <output name="output_hqregion">
                <assert_contents>
                    <has_size value="232342" delta="100"/>
                </assert_contents>
            </output>
        </test>
        <!-- #3 polymeraseread, default -->
        <test expect_num_outputs="1">
            <param name="files" value="set.3.bax.h5,set.2.bax.h5,set.1.bax.h5"/>
            <param name="readtype" value="--polymeraseread"/>
            <output name="output_polymeraseread">
                <assert_contents>
                    <has_size value="333195" delta="100"/>
                </assert_contents>
            </output>
        </test>
        <!-- #4 subread, custom -->
        <test expect_num_outputs="2">
            <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">
                <assert_contents>
                    <has_size value="23497" delta="100"/>
                </assert_contents>
            </output>
            <output name="output_subread">
                <assert_contents>
                    <has_size value="45147" delta="100"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[

.. class:: infomark

**What it does**

bax2bam converts the legacy PacBio basecall format (bax.h5) into the BAM basecall format.

**Input**

- Sample files that should be from the same movie (bax.h5)

**Output**

- Converted sample (BAM) 

.. 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>