view bigwigCompare.xml @ 26:26e7304d6737 draft

"planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 7c89456b6a986259c96b8d280c53e4ab155696ef"
author bgruening
date Sat, 25 Jan 2020 04:15:35 -0500
parents 93eb012d9eed
children 3d211717a775
line wrap: on
line source

<tool id="deeptools_bigwig_compare" name="bigwigCompare" version="@WRAPPER_VERSION@.0">
    <description>normalizes and compares two bigWig files to obtain the ratio, log2ratio or difference between them</description>
    <macros>
        <token name="@BINARY@">bigwigCompare</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command>
<![CDATA[
        @BINARY@
            @THREADS@
            --bigwig1 '$bigwigFile1'
            --bigwig2 '$bigwigFile2'

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

            --operation $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":

              $advancedOpt.skipNAs
              $advancedOpt.skipZeroOverZero
              --scaleFactors '$advancedOpt.scaleFactor1:$advancedOpt.scaleFactor2'
              --binSize $advancedOpt.binSize

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

            #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. To output the scaled values from the first or second bigWig file,
                select 'first' or 'second'.">
                <option value="log2" selected="true">Compute log2 of the signal ratio</option>
                <option value="ratio">Compute the ratio signals</option>
                <option value="subtract">Compute difference (subtract input from treatment) of the signal</option>
                <option value="add">Compute the sum of the signals</option>
                <option value="mean">Compute the mean of the signal in the two files</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>
                <option value="first">Returns the scaled value of the first bigWig file</option>
                <option value="second">Returns the scaled value of the second bigWig file</option>
            </param>
            <when value="log2">
                <expand macro="pseudocount" />
            </when>
            <when value="ratio">
                <expand macro="pseudocount" />
            </when>
            <when value="subtract" />
            <when value="add" />
            <when value="mean" />
            <when value="first" />
            <when value="second" />
            <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 argument="--binSize" type="integer" value="50" min="1"
                    label="Length, in bases, of the non-overlapping bins used for averaging the score over the regions length"
                    help="Size of the bins in bases for the output of the bigwig/bedgraph file."/>

                <expand macro="skipNAs" />
                <expand macro="skipZeroOverZero" />
                <expand macro="scaleFactors" />
                <expand macro="plotTitle" />
                <expand macro="blacklist" />
            </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" compare="sim_size" />
        </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" sort="true" 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 scores (e.g., number of reads) found in each bigWig file are counted for such bins and, finally, a summary 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.

Note that you can actually produce a human-readable bedGraph format instead of the compressed bigWig format if you're interested in having a look at the values yourself.

.. image:: $PATH_TO_IMAGES/bigwigCompare_output.png
   :width: 600
   :height: 436

-----

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