view intervene_pairwise.xml @ 1:08780101bc36 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/intervene commit 6c40eb0ac29429828269cff96401316fc324b7a9"
author iuc
date Mon, 05 Jul 2021 11:24:59 +0000
parents f5fa293605ca
children 33b8c5eedc04
line wrap: on
line source

<tool id="intervene_pairwise" name="Pairwise intersection" version="@TOOL_VERSION@">
    <description>and heatmap for genomic intervals</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">intervene</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
#import re
#set $labels = ",".join(["'%s'" % @ESCAPE_IDENTIFIER@ for file in $input])
#set $type = 'genomic 'if $input[0].is_of_type('interval') else 'list'
intervene pairwise
--type $type
--input #echo " ".join(["'%s'" % file for file in $input])
--names $labels
--compute $compute
#if str($corrtype) != 'None'
    --corr
    --corrtype $corrtype
#end if
--htype $htype
$diagonal
--output results
--barcolor '$barcolor'
--fontsize '$fontsize'
--title '$title'
--figtype $figtype
--figsize $figsize_width $figsize_height
--dpi $dpi &&
mv results/Intervene_pairwise_*.${figtype} results/Intervene_pairwise.plot
    ]]></command>
    <inputs>
        <param argument="--input" type="data" format="interval" multiple="true" label="Select input files for which to produce intersections"/>
        <param argument="--compute" type="select" label="Use this metric for the heatmap">
            <option value="count">count: calculates the number of overlaps</option>
            <option value="frac" selected="true">frac: calculates the fraction of overlap</option>
            <option value="jaccard">jaccard: calculate the Jaccard statistic</option>
            <option value="reldist">reldist: calculate the distribution of relative distances</option>
            <!-- fisher option needs additional genome assembly, probably triggers on demand download
            <option value="fisher">fisher: calculate Fisher`s statistic</option>
            -->
        </param>
        <param argument="--corrtype" type="select" label="Select the type of correlation">
            <option value="None">Don't calculate correlation</option>
            <option value="pearson">Pearson correlation</option>
            <option value="kendall">Kendall correlation</option>
            <option value="spearman">Spearman correlation</option>
        </param>
        <param argument="--htype" type="select" label="Heatmap plot type">
            <option value="tribar">tribar</option>
            <option value="dendrogram">dendrogram</option>
            <option value="color">color</option>
            <option value="pie">pie</option>
            <option value="circle">circle</option>
            <option value="square">square</option>
            <option value="ellipse">ellipse</option>
            <option value="number">number</option>
            <option value="shade">shade</option>
        </param>
        <param argument="--diagonal" type="boolean" truevalue="--diagonal" falsevalue="" label="Show the diagonal values in the heatmap ?"/>
        <!-- the argparse action is wrong for showsize, check this when upgrading tool in future -->
        <param argument="--barcolor" type="color" label="Boxplot color" value="#53cfff">
            <expand macro="color_sanitizer"/>
        </param>
        <param argument="--fontsize" type="integer" value="8" label="Label font size"/>
        <param argument="--title" type="text" label="Heatmap main title" value="Pairwise intersection">
            <expand macro="quote_sanitizer"/>
        </param>
        <expand macro="figure_params"/>
    </inputs>
    <outputs>
        <data name="plot" format="pdf" label="Pairwise plot on ${on_string}" from_work_dir="results/Intervene_pairwise.plot">
            <actions>
                <action type="format">
                    <option type="from_param" name="figtype"/>
                </action>
            </actions>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input" value="a.bed,b.bed,c.bed"/>
            <output name="plot" value="bed_pairwise.pdf" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Plots the pairwise intersections of multiple interval files.

.. image:: $PATH_TO_IMAGES/pairwise.png

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