view bamPEFragmentSize.xml @ 6:a14f74993305 draft

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 43d23f495200449aec91a41fd537603014aa93ba-dirty
author bgruening
date Sun, 24 Apr 2016 15:52:25 -0400
parents 6da6f2908463
children dc8d6e07d829
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 a paired-end sequenced BAM file</description>
    <macros>
        <token name="@BINARY@">bamPEFragmentSize</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
<![CDATA[
        ln -s $bamInput one.bam &&
        ln -s '${bamInput.metadata.bam_index}' one.bam.bai &&

        @BINARY@
            @THREADS@
            #if $histogram:
                --histogram ./hist.png
            #end if
            --plotTitle "$plotTitle"
            #if $advancedOpt.showAdvancedOpt == 'yes'
                --binSize '$advancedOpt.binSize'
                --distanceBetweenBins '$advancedOpt.distanceBetweenBins'
            #end if
            one.bam
            > $outfile
]]>
    </command>
    <inputs>
        <param name="bamInput" format="bam" type="data" label="BAM file"
            help=""/>
        <param argument="--histogram" type="boolean" truevalue="--histogram" falsevalue=""
            label="Get the distribution of fragment lengths as a histogram"
            help=""/>
        <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)"/>
            </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="bamInput" 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 a BAM file 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>