view samtools_bedcov.xml @ 5:6856f8a01905 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_bedcov commit cd62639660bef041ba14ecff337fb98e84e75d8a
author iuc
date Mon, 20 Nov 2023 22:14:28 +0000
parents 46c6639921f1
children
line wrap: on
line source

<tool id="samtools_bedcov" name="Samtools bedcov" version="2.0.4" profile="@PROFILE@">
    <description>calculate read depth for a set of genomic intervals</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
        @PREPARE_IDX_MULTIPLE@

        samtools bedcov
            #if $mapq:
                -Q $mapq
            #end if
            $countdel
            #set $filter = $additional_options.required_flags
            @FLAGS@
            -g $flags
            #set $filter = $additional_options.skipped_flags
            @FLAGS@
            -G $flags
            #if $depth_thresh:
                -d $depth_thresh
            #end if
            '${input_bed}'
            #for $i in range(len($input_bams)):
                '${i}'
            #end for
            > '${output}'
    ]]></command>
    <inputs>
        <param name="input_bed" type="data" format="bed" label="Genetic intervals (in BED format)" />
        <param name="input_bams" type="data" format="bam" multiple="true" label="BAM file(s)" />
        <param name="mapq" argument="-Q" type="integer" value="" optional="true" label="Minimum MAPQ" help="Only count reads with mapping quality greater than this value" />
        <param name="countdel" argument="-j" type="boolean" checked="false" truevalue="-j" falsevalue="" label="Exclude deletions and ref skips" help=" Do not include deletions (D) and ref skips (N) in bedcov computation" />
        <param name="depth_thresh" argument="-d" type="integer" value="" min="0" optional="true" label="Depth threshold" help="Number of reference bases with coverage above and including this value will be displayed in a separate column." />

        <section name="additional_options" title="Additional Filter Options">
            <param name="required_flags" argument="-g" type="select" multiple="True" label="Require that these flags are set.">
                <expand macro="flag_options" />
            </param>

            <param name="skipped_flags" argument="-G" type="select" multiple="True" label="Exclude reads with any of the following flags set (the default set is UNMAP,SECONDARY,QCFAIL,DUP or 0x704).">
                <expand macro="flag_options" s4="true" s256="true" s512="true" s1024="true"/>
            </param>
        </section>
    </inputs>
    <outputs>
        <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <!-- 1) -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
            <output name="output" file="samtools_bedcov_out1.tab" />
        </test>
        <!-- 2) -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
            <output name="output" file="samtools_bedcov_out2.tab" />
        </test>
        <!-- 3) -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
            <param name="mapq" value="40"/>
            <output name="output" file="samtools_bedcov_out1.tab" />
        </test>
        <!-- 4) -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
            <param name="countdel" value="-j" />
            <output name="output" file="samtools_bedcov_out2.tab" />
        </test>
        <!-- 5) Testing argument -g -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
            <param name="required_flags" value="2,16,64" />
            <output name="output" file="samtools_depth_out5.tab" />
        </test>
        <!-- 6) Testing argument -G -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
            <param name="skipped_flags" value="2,16,64" />
            <output name="output" file="samtools_depth_out6.tab" />
        </test>
        <!-- 7) Testing depth threshold -d -->
        <test>
            <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
            <param name="depth_thresh" value="10" />
            <output name="output" file="samtools_bedcov_out7.tab" />
        </test>
    </tests>
    <help>
**What it does**

Calculates read depth for regions listed in a BED dataset using ``samtools bedcov`` command::

 samtools bedcov [INPUT BED] [INPUT BAM1] ... [INPUT BAMn] > [OUTPUT]
    </help>
    <expand macro="citations"/>
</tool>