view samtools_bedcov.xml @ 2:21964f813454 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/samtools_bedcov commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
author devteam
date Fri, 18 Dec 2015 19:43:23 -0500
parents 4f7acd7af617
children e371922c38e8
line wrap: on
line source

<tool id="samtools_bedcov" name="BedCov" version="2.0">
  <description>calculate read depth for a set of genomic intervals</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"></expand>
    <expand macro="stdio"></expand>
    <expand macro="version_command"></expand>
    <command><![CDATA[
        for bamfile in 
        #for dataset in $input_bams:
            "${dataset}"
        #end for
        ; do
            if [ ! -f \$bamfile.bai ] ; then
                ln -s \$bamfile && samtools index `basename \$bamfile` ;
            else
                ln -s \$bamfile && ln -s \$bamfile.bai ;
            fi ;
        done ;
        samtools bedcov "${input_bed}"
        #for dataset in $input_bams:
            `basename "${dataset}"`
        #end for
        > "${output}"
        ]]>
    </command>
    <inputs>
        <param name="input_bed" type="data" format="bed" label="BED file" />
        <param name="input_bams" type="data" format="bam" label="BAM file" multiple="true" />
    </inputs>
    <outputs>
        <data format="tabular" name="output" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <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>
        <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>
    </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"></expand>
</tool>