view multiBamSummary.xml @ 29:1fcb7adc39b8 draft

planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 810c1359b884661d3f5c7372be0f0f88c859a3b9
author bgruening
date Thu, 01 Jun 2023 15:06:09 +0000
parents 0c8638172059
children
line wrap: on
line source

<tool id="deeptools_multi_bam_summary" name="multiBamSummary" version="@TOOL_VERSION@+galaxy0" profile="@GALAXY_VERSION@">
    <description>calculates average read coverages for a list of two or more BAM/CRAM 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 $scalingFactors:
                --scalingFactors '$scalingFactorsFile'
            #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" MIN="2"/>
        <expand macro="custom_sample_labels" />

        <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,gtf"
                    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=""/>
        <param argument="--scalingFactors" type="boolean" label="Save scaling factors" help="Scaling factors calculated as in DESeq2 and made directly compatible with bamCoverage."/>

    </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>
        <data format="tabular" name="scalingFactorsFile" label="${tool.name} on ${on_string}: scaling factors">
            <filter>scalingFactors 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>