view bigwigCompare.xml @ 31:7889d260cc37 draft default tip

planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 3bc1d1c6f4e28ac7ff8df79fe4e3f00a195938e6-dirty
author bgruening
date Wed, 21 Oct 2015 02:50:24 -0400
parents 5231f398d784
children
line wrap: on
line source

<tool id="deeptools_bigwigCompare" name="bigwigCompare" version="@WRAPPER_VERSION@.0">
    <description>normalizes and compares two bigWig files to obtain the ratio, log2ratio or difference</description>
    <macros>
        <token name="@BINARY@">bigwigCompare</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
<![CDATA[
        bigwigCompare

        @THREADS@

        --bigwig1 '$bigwigFile1'
        --bigwig2 '$bigwigFile2'

        --outFileName '$outFileName'
        --outFileFormat '$outFileFormat'

        --ratio $comparison.comparison_select

        #if $comparison.comparison_select in ['ratio','log2']:
            --pseudocount $comparison.pseudocount
        #end if

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

        #if $advancedOpt.showAdvancedOpt == "yes":

          --missingDataAsZero $advancedOpt.missingDataAsZero
          --scaleFactors '$advancedOpt.scaleFactor1:$advancedOpt.scaleFactor2'
          --binSize $advancedOpt.binSize

            #if $advancedOpt.plotTitle and str($advancedOpt.plotTitle.value) != "":
                --plotTitle '$advancedOpt.plotTitle'
            #end if

        #end if
]]>
    </command>
    <inputs>
        <param name="bigwigFile1" format="bigwig" type="data" label="Treatment bigwig file" />
        <param name="bigwigFile2" format="bigwig" type="data" label="bigWig file" />

        <conditional name="comparison">
            <param name="comparison_select" type="select" 
                label="How to compare the two files"
                help="The default is to output the log2ratio between the two samples.
                The reciprocal ratio returns the negative of the inverse of the ratio if
                the ratio is less than 0. The resulting values are interpreted as negative fold changes. (--ratio)">
                <option value="log2" selected="true">compute log2 of the number of reads ratio</option>
                <option value="ratio">compute the ratio of the number of reads</option>
                <option value="subtract">compute difference (subtract input from treatment) of the number of reads</option>
                <option value="add">compute the sum over all reads</option>
                <option value="reciprocal_ratio">Computes the fold change. If the fold change is less than 1, the negative of the inverse is reported. E.g. A fold change of 10 to 5 would be reported not as 0.5 but as -2</option>
            </param>
            <when value="log2">
                <expand macro="pseudocount" />
            </when>
            <when value="ratio">
                <expand macro="pseudocount" />
            </when>
            <when value="subtract" />
            <when value="add" />
            <when value="reciprocal_ratio">
                <expand macro="pseudocount" />
            </when>
        </conditional>

        <param name="outFileFormat" type="select" label="Coverage file format">
            <option value="bigwig" selected="true">bigwig</option>
            <option value="bedgraph">bedgraph</option>
        </param>

        <expand macro="region_limit_operation" />

        <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 name="binSize" type="integer" value="50" min="1" 
                    label="Length, in base pairs, of the non-overlapping bin for averaging the score over the regions length"
                    help="Size of the bins in bp for the output of the bigwig/bedgraph file. (--binSize)"/>
                <param name="missingDataAsZero" type="boolean" truevalue="yes" falsevalue="no" checked="True"
                    label ="Treat missing data as zero"
                    help  ="This parameter determines if missing data should be replaced with a zero.
                    If set to &quot;no&quot;, missing data will be ignored and will not be included in the
                    output file at all. Missing data is defined as those regions for which no value exists in
                    *any* of the bigwig files. The decision to include or exclude missing data depends on
                    the interpretation of the data. Missing data in a bigwig file may mean that there is no
                    information available for certain regions, for example a repetitive region that is not
                    being considered. In the same file regions with low coverage may get zero read counts.
                    If missing data is replaced by zero, this would convert the excluded repetitive regions
                    into regions of low coverage. (--missingDataAsZero)" />
                <expand macro="scaleFactor" />
                <expand macro="plotTitle" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="bigwig" name="outFileName">
            <change_format>
                <when input="outFileFormat" value="bigwig" format="bigwig" />
                <when input="outFileFormat" value="bedgraph" format="bedgraph" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="bigwigFile1" value="test.bw" ftype="bigwig" />
            <param name="bigwigFile2" value="test.bw" ftype="bigwig" />
            <param name="showAdvancedOpt" value="no" />
            <param name="outFileFormat" value="bigwig" />
            <param name="binSize" value="5" />
            <param name="comparison_select" value="ratio" />
            <output name="outFileName" file="bigwigCompare_result1.bw" ftype="bigwig" />
        </test>
        <test>
            <param name="bigwigFile1" value="test.bw" ftype="bigwig" />
            <param name="bigwigFile2" value="test.bw" ftype="bigwig" />
            <param name="showAdvancedOpt" value="no" />
            <param name="outFileFormat" value="bedgraph" />
            <param name="binSize" value="10" />
            <param name="comparison_select" value="ratio" />
            <output name="outFileName" file="bigwigCompare_result2.bg" ftype="bedgraph" />
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

This tool compares two bigwig files based on the number of mapped reads. To
compare the bigwig files the genome is partitioned into bins of equal size,
then the number of reads found in each BAM file are counted for such bins and
finally a summarizing value is reported. This value can be the ratio of the
number of reads per bin, the log2 of the ratio, the sum or the difference.


-----

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