view multiBamSummary.xml @ 8:6f67a9da7fce draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 2c5f94de9ddf6798e49b7e9c340c841ca2bfbcfe
author bgruening
date Mon, 19 Sep 2016 17:56:56 -0400
parents b319edc108a7
children d0800b8adbcb
line wrap: on
line source

<tool id="deeptools_multi_bam_summary" name="multiBamSummary" version="@WRAPPER_VERSION@.0">
    <description>calculates average read coverages for a list of two or more BAM files</description>
    <macros>
        <token name="@BINARY@">multiBamSummary</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
<![CDATA[
        #set files=[]
        #set labels=[]

        @multiple_input_bams@
        @BINARY@
            $mode.modeOpt
            @THREADS@

            --outFileName '$outFile'
            --bamfiles #echo " ".join($files)#
            --labels #echo " ".join($labels)#

            #if $outRawCounts:
                --outRawCounts '$outFileRawCounts'
            #end if

            #if $mode.modeOpt == "bins":
                --binSize '$mode.binSize'
                --distanceBetweenBins '$mode.distanceBetweenBins'
            #else:
                --BED $mode.region_file
            #end if

            #if str($region).strip() != '':
                --region '$region'
            #end if

            #if $advancedOpt.showAdvancedOpt == "yes":
                @ADVANCED_OPTS_READ_PROCESSING@
                @ADVANCED_OPTS_GTF@
                @blacklist@
            #end if
]]>
    </command>

    <inputs>
        <expand macro="multiple_input_bams_min2" />

        <conditional name="mode">
            <param name="modeOpt" type="select" label="Choose computation mode"
                    help="In the bins mode, the coverage is computed for equally
                    sized bins. \nIn BED file mode, a list of genomic regions
                    in BED or INTERVAL format has to be given. For each region
                    in the BED file, the number of overlapping reads from each BAM file is counted.
                    ">
                <option value="bins" selected="true">Bins</option>
                <option value="BED-file">Limit calculation to certain regions (BED file)</option>
            </param>
            <when value="bins">
                <param name="binSize" type="integer" value="10000" min="1"
                    label="Bin size in bp"
                    help="Length in bases of the window used to sample the genome. (--binSize)"/>

                <expand macro="distanceBetweenBins" />

            </when>
            <when value="BED-file">
                <param name="region_file" type="data" format="bed"
                    label="Region file in BED or INTERVAL format"
                    help="Coverage is computed for the number of reads that overlap such regions."/>
            </when>
        </conditional>

        <expand macro="region_limit_operation" />

        <expand macro="advancedOpt_scaffold">
            <expand macro="read_processing_options" />
            <expand macro="gtf_options" />
            <expand macro="blacklist" />
        </expand>

        <param argument="--outRawCounts" type="boolean" label="Save raw counts (coverages) to file" help=""/>

    </inputs>
    <outputs>
        <data format="deeptools_coverage_matrix" name="outFile" label="${tool.name} on ${on_string}: correlation matrix" />
        <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
            <filter>outRawCounts is True</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="bamfiles" value="bowtie2 test1.bam,bowtie2 test1.bam" ftype="bam" />
            <param name="modeOpt" value="bins" />
            <param name="binSize" value="10" />
            <output name="outFile" file="multiBamSummary_result1.npz" ftype="deeptools_coverage_matrix" compare="sim_size" />
        </test>
        <test>
            <param name="bamfiles" value="bowtie2 test1.bam,bowtie2 test1.bam" ftype="bam" />
            <param name="modeOpt" value="BED-file" />
            <param name="region_file" value="multiBamSummary_regions.bed" />
            <output name="outFile" file="multiBamSummary_result2.npz" ftype="deeptools_coverage_matrix" compare="sim_size" />
        </test>


    </tests>
    <help>
<![CDATA[

What it does
-------------

This tool generates a matrix of read coverages for a list of genomic regions and at least two samples (BAM files).
The genome is split into bins of the given size. For each bin, the number of reads found in each BAM file is counted.
Alternatively, an interval file with pre-defined genomic regions can be provided.

In principle, this tool does the same as ``multiBigwigSummary``, but for BAM files.

A typical follow-up application is to check and visualize the similarity and variability between replicates or published data sets (see: ``plotPCA`` and ``plotCorrelation``).

Output
--------

The default output is a **compressed file** that can only be used with ``plotPCA`` or ``plotCorrelation``.

To analyze the coverage scores yourself, you can get the **uncompressed score matrix** where every row corresponds to a genomic region (or bin) and each column corresponds to a sample (BAM file). (To obtain this output file, select "Save raw counts (coverages) to file" )

.. image:: $PATH_TO_IMAGES/multiBamSummary_output.png
   :width: 600
   :height: 443

-----

@REFERENCES@
]]>
    </help>
    <expand macro="citations" />
</tool>