view bamPEFragmentSize.xml @ 8:dc8d6e07d829 draft

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

<tool id="deeptools_bam_pe_fragmentsize" name="bamPEFragmentSize" version="@WRAPPER_VERSION@.0">
    <description>Estimate the predominant cDNA fragment length from paired-end sequenced BAM files</description>
    <macros>
        <token name="@BINARY@">bamPEFragmentSize</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
<![CDATA[
        @multiple_input_bams@
        @BINARY@
            @THREADS@
            --bamfiles #echo " ".join($files)
            #if $samplesLabel:
                --samplesLabel #echo " ".join($samplesLabel)
            #end if
            #if $histogram:
                --histogram ./hist.png
            #end if
            --plotTitle "$plotTitle"
            #if $advancedOpt.showAdvancedOpt == 'yes'
                --binSize '$advancedOpt.binSize'
                --distanceBetweenBins '$advancedOpt.distanceBetweenBins'
                $advancedOpt.logScale
                --maxFragmentLength '$advancedOpt.maxFragmentLength'
                @blacklist@
            #end if
            > $outfile
]]>
    </command>
    <inputs>
        <expand macro="multiple_input_bams" />
        <param argument="--histogram" type="boolean" truevalue="--histogram" falsevalue=""
            label="Get the distribution of fragment lengths as a histogram"
            help=""/>
        <param argument="--samplesLabel" type="text" size="30"
            label="Labels for the samples (each BAM file) plotted"
            help="The default is to use the file name of the sample. The sample labels should be separated by
            spaces and quoted if a label itself contains a space E.g. label-1 &quot;label 2&quot;">
            <sanitizer>
               <valid initial="string.printable">
               </valid>
            </sanitizer>
        </param>
        <expand macro="plotTitle" />
        <conditional name="advancedOpt">
            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
                <option value="no" selected="true">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param argument="--binSize" type="integer" value="1000" min="1" optional="true"
                    label="bin size, in bases" help="Length in bases of the window used to sample the genome. (--binSize)"/>
                <param argument="--distanceBetweenBins" type="integer" value="1000000" min="0" optional="true"
                    label="bin spacing, in bases"
                    help="To reduce the computation time, not every possible genomic bin is sampled. This option allows you to set the distance between bins actually sampled from. Larger numbers are sufficient for high coverage samples, while smaller values are useful for lower coverage samples. Note that if you specify a value that results in too few (&lt;1000) reads sampled, the value will be decreased. (--distanceBetweenBins)"/>
                <param argument="--logScale" type="boolean" truevalue="--logScale" falsevalue=""
                    label="Plot log frequencies"
                    help="Plot the frequencies on the log10 scale" />

                <param argument="--maxFragmentLength" type="integer" min="0" value="0"
                    label="Maximum fragment length"
                    help="Maximum fragment length included in the histogram. A value of 0 (the default) denotes twice the mean fragment length" />
                <expand macro="blacklist" />
            </when>
        </conditional>

    </inputs>
    <outputs>
        <data name="outfile" format="txt"/>
        <data name="histogram_outfile" from_work_dir="hist.png" format="png">
            <filter>histogram is True</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="bamfiles" value="bowtie2 test1.bam" ftype="bam" />
            <param name="histogram" value="True" />
            <param name="plotTitle" value="Test Plot" />
            <output name="outfile" file="bamPEFragmentSize_result1.txt" ftype="txt" />
            <output name="histogram_outfile" file="bamPEFragmentSize_histogram_result1.png" ftype="png" compare="sim_size" />
        </test>
    </tests>
    <help>
<![CDATA[

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

This tool samples the given BAM files with paired-end data to estimate the fragment length distribution.
Properly paired reads are preferred for computation, i.e., unless a region does not contain any concordant pairs, discordant pairs are ignored.

Output
------

The **default** output is a simple summary statistic for the observed fragment lengths.

Optionally, you can obtain a histogram of fragment sizes, which will give you a better idea of the distribution of fragment lengths.

.. image:: $PATH_TO_IMAGES/bamPEFragmentSize_output.png
   :width: 600
   :height: 520


-----

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