view chicPlotViewpoint.xml @ 11:920526260066 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 69bb60ab875c1c1769298678f0890d8b92f1899d
author iuc
date Thu, 05 Dec 2024 18:05:09 +0000
parents f47ac4a0b337
children
line wrap: on
line source

<tool id="hicexplorer_chicplotviewpoint" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>creates plots for viewpoints</description>
    <macros>
        <token name="@BINARY@">chicPlotViewpoint</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #import re

        @BINARY@
          
            --interactionFile '$interactionFile'
            #if $differentialFile:
                --differentialTestResult '$differentialFile'
            #end if

            #if $significantInteractionFile:
                --significantInteractions '$significantInteractionFile'
                $plotSignificantInteractions
            #end if

            --range $rangeUpstream $rangeDownstream
            #if $backgroundModelFile:
                --backgroundModelFile '$backgroundModelFile'
            #end if
            
            --combinationMode $combinationMode_conditional.combinationMode_selector

            #if $combinationMode_conditional.combinationMode_selector == 'oneGene':
                --combinationName $combinationMode_conditional.geneName
            #end if

            #if $dpi:
                --dpi $dpi
            #end if

            #if $maxPValue:
                --maxPValue $maxPValue
            #end if

            #if $minPValue:
                --minPValue $minPValue
            #end if

            
            #if $colormap:
                --colorMapPvalue $colormap
            #end if

            $pvalue
            #if $xFold:
                --xFold $xFold
            #end if
            --colorList $colorList
            --threads @THREADS@
            $truncateZeroPvalues
           
            -o plots.tar.gz
          
    ]]>    </command>
    <inputs>

        <param name="interactionFile" type="data" format="h5" label="Interaction file order" />
        <param name="differentialFile" type="data" format="h5" label="Rejected H0 file order" optional="true" />
        <param name="significantInteractionFile" type="data" format="h5" label="Significant file order" optional="true" />
        <param argument="--plotSignificantInteractions" type="boolean" truevalue="--plotSignificantInteractions" falsevalue="" checked="false" label="Plot significant interactions" help="Select if the significant regions should be highlighted in the plot. If not set, the significant file data is used only to update the p-values." />
        
        <param name="rangeUpstream" type="integer" value="100000" label="Upstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
        <param name="rangeDownstream" type="integer" value="100000" label="Downstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
        <param argument="--backgroundModelFile" type="data" format="tabular" label="Background model" help="The background file computed by chicViewpointBackgroundModel" optional="true" />
        <conditional name="combinationMode_conditional">
            <param name="combinationMode_selector" type="select" label="Combination mode for the plots">
                <option value="dual">Dual</option>
                <option value="single" selected="True">Single</option>
                <option value="allGenes" >All genes</option>
                <option value="oneGene" >One gene</option>
            </param>
            <when value="dual" >
            </when>
            <when value="single" >
            </when>
            <when value="allGenes" >
            </when>
            <when value="oneGene" >
                <param name="geneName" type="text" value="" label="Gene name" help="Gene name that should be plotted." />
            </when>
        </conditional>
    
        <param argument="--maxPValue" type="float" optional="true" label="Max p-value" help="Maximum value of the plotted p-value." />
        <param argument="--minPValue" type="float" optional="true" label="Min p-value" help="Minimum value of the plotted p-value." />
        <param name="pvalue" type="boolean" truevalue="--pValue" falsevalue="" checked="false" label="Plot p-values as a colorbar" />
        <expand macro="colormap" />

        <param name="xFold" type="float" value="" optional="true" label="X-fold mean background" help="Plot x-fold region for the mean background." />

        <param name="image_file_format" type="select" label="Image output format">
            <option value="png" selected="True">png</option>
            <option value="svg">svg</option>
            <option value="pdf">pdf</option>
        </param>
        <param name="dpi" type="integer" optional="true" label="DPI for image" help="Change the default resolution of the plot." />
        <param name="colorList" type="text" value="g b c m y k" optional="true" label="Color list" help="Colorlist for the viewpoint lines. For all available colors please check matplotlib documentation: https://matplotlib.org/stable/gallery/color/named_colors.html">
            <validator type="expression" message="Only alphabetic characters and the colon are allowed.">value.replace(' ', '').replace(':', '').isalpha()</validator>
        </param>
        <param argument="--truncateZeroPvalues" type="boolean" truevalue="--truncateZeroPvalues" falsevalue="" checked="false" label="Truncate zeros by setting them to one." help="Sets all p-values which are equal to zero to one. This has the effect that the associated positions are not disturbing the presenation of small p-values." />
    </inputs>
    <outputs>
        <data name="plotsTar" from_work_dir="plots.tar.gz" format="tar.gz" label="cHi-C viewpoint plots" />
    </outputs>
    <tests>
        <test>
            <param name="interactionFile" value="cHi-C/chicViewpoint/two_matrices.hdf5" />
            <param name="differentialFile" value="cHi-C/chicDifferentialTest/differential.hdf5" />
            <param name="significantInteractionFile" value="cHi-C/chicSignificantInteractions/significantInteractions_dual.hdf5" />
            <conditional name="combinationMode_conditional">
                <param name="combinationMode_selector" value="dual" />
            </conditional>
            <param name="pvalue" value="True" />
            <param name="truncateZeroPvalues" value="True" />

            <param name="backgroundModelFile" value="cHi-C/background.txt" />
            <param name="xFold" value="1.5" />
            <output name="plotsTar" file="cHi-C/plots.tar.gz" ftype="tar.gz" compare="sim_size" />
            
        </test>
    </tests>
    <help><![CDATA[

Plot of viewpoints
==================

chicPlotViewpoint plots one or many viewpoints with the average background model and the computed p-value per sample. Moreover it can highlight differential interactions of two samples and/or significant regions.

An example usage is:

`$ chicPlotViewpoint --interactionFile interactions.hdf5 --range 500000 500000  --backgroundModelFile background_model.txt --pValue --outFileName viewpoint1_2.tar.gz --dpi 300`


For more information about HiCExplorer please consider our documentation on readthedocs.io_

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
]]>    </help>
    <expand macro="citations" />
</tool>