view plotProfiler.xml @ 30:6662b1a8d326 draft default tip

planemo upload for repository https://github.com/deeptools/deepTools/tree/master/galaxy/wrapper/ commit 4a4029b5c2e725b7cebc27217b76d23910508412
author bgruening
date Wed, 27 Sep 2023 20:23:45 +0000
parents 10301d137111
children
line wrap: on
line source

<tool id="deeptools_plot_profile" name="plotProfile" version="@TOOL_VERSION@+galaxy0" profile="@GALAXY_VERSION@">
    <description>
        creates a profile plot for score distributions across genomic regions
    </description>
    <macros>
        <token name="@BINARY@">plotProfile</token>
        <import>deepTools_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command>
<![CDATA[
        @BINARY@
            --matrixFile "$matrixFile"
            --outFileName "$outFileName"

            #if $output.showOutputSettings == "yes"
                --plotFileFormat $output.outFileFormat

                #if $output.dpi:
                    --dpi '$output.dpi'
                #end if

                #if $output.saveSortedRegions:
                    --outFileSortedRegions '$outFileSortedRegions'
                #end if
            #else
                --plotFileFormat 'png'
            #end if

            #if $scaleRegions.showScaleRegionsOpt == "yes":
                --startLabel '$scaleRegions.startLabel'
                --endLabel '$scaleRegions.endLabel'
            #end if

            #if $advancedOpt.showAdvancedOpt == "yes":
                #if $advancedOpt.averageType:
                    --averageType '$advancedOpt.averageType'
                #end if
                --plotHeight $advancedOpt.plotHeight
                --plotWidth $advancedOpt.plotWidth
                --plotType $advancedOpt.plotType
                #if $advancedOpt.samplesLabel and str($advancedOpt.samplesLabel).strip() != "":
                    --samplesLabel $advancedOpt.samplesLabel
                #end if

                #if $advancedOpt.regionsLabel and str($advancedOpt.regionsLabel).strip() != "":
                    --regionsLabel $advancedOpt.regionsLabel
                #end if

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

                #if str($advancedOpt.colors).strip() != "":
                    --colors #echo ' '.join( ["'%s'" % $color for $color in $advancedOpt.colors.split()] )#
                #end if

                --legendLocation '$advancedOpt.legendLocation'

                --labelRotation '$advancedOpt.labelRotation'

                $advancedOpt.perGroup

                #if str($advancedOpt.yMin):
                    --yMin $advancedOpt.yMin
                #end if
                #if str($advancedOpt.yMax):
                    --yMax $advancedOpt.yMax
                #end if

                #if $advancedOpt.outFileNameData:
                    --outFileNameData '$output_outFileNameData'
                #end if

                @KMEANS_CLUSTERING@

            #end if
]]>
    </command>
    <inputs>
        <param argument="--matrixFile" format="deeptools_compute_matrix_archive" type="data" label="Matrix file from the computeMatrix tool"/>
        <conditional name="scaleRegions">
            <param name="showScaleRegionsOpt" type="select" label="The input matrix was computed in scale-regions mode">
                <option value="no" selected="true">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="no" />
            <when value="yes">
                <param argument="--startLabel" type="text" value="TSS" size="10"
                    label="Label for the region start"
                    help ="Label shown in the plot
                    for the start of the region. Default is TSS (transcription start site),
                    but could be changed to anything, e.g. &quot;peak start&quot;." />
                <param argument="--endLabel" type="text" value="TES" size="10"
                    label="Label for the region end"
                    help="Label shown in the plot for the region end. Default is TES (transcription end site)."/>
            </when>
        </conditional>

        <expand macro="input_graphic_output_settings">
            <expand macro="input_image_file_format" />
            <expand macro="output_dpi" />
        </expand>

        <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="averageType" type="select" label="Define the type of statistic that should be used for the profile.">
                    <option value="mean" selected="true">mean</option>
                    <option value="median">median</option>
                    <option value="min">min</option>
                    <option value="max">max</option>
                    <option value="sum">sum</option>
                    <option value="std">std</option>
                </param>
                <param argument="--plotHeight" type="integer" value="5" min="3"
                    label="Plot height"
                    help="Height in cm. The default for the plot height is 5 centimeters. The minimum value is 3 cm." />

                <param argument="--plotWidth" type="integer" value="11" min="1"
                    label="Plot width"
                    help="Width in cm. The default value is 11 centimeters. The minimum value is 1 cm." />

                <param argument="--plotType" type="select" label="Plot type"
                    help="The &quot;lines&quot; option will
                    plot the profile line based on the average type selected. The &quot;fill&quot;
                    option fills the region between zero and the profile curve. The filled in color is
                    semi-transparent. The &quot;add standard error&quot;
                    option colors the region between the profile and the standard error of the data.
                    As in the case of fill, a semi-transparent color is used.
                    The option &quot;overlapped_lines&quot; plots each region's value, one on top of
                    the other.">
                    <option value="lines" selected="true">lines</option>
                    <option value="fill">fill</option>
                    <option value="se">add standard error</option>
                    <option value="std">add standard deviation</option>
                    <option value="overlapped_lines">overlapped lines</option>
                    <option value="heatmap">heatmap</option>
                </param>
                <param argument="--samplesLabel" type="text" size="30"
                    label="Labels for the samples (each bigwig) plotted"
                    help="The default is to use the file name of the sample. The sample labels should be separated by
                    spaces and quoted if a label itself contains a space, e.g., label-1 &quot;label 2&quot;">
                    <sanitizer>
                        <valid initial="string.printable">
                        </valid>
                    </sanitizer>
                </param>
                <param argument="--regionsLabel" type="text" size="30"
                    label="Labels for the regions plotted in the heatmap"
                    help="If more than one region is being plotted a list of labels separated by space is required.
                          If a label itself contains a space, then quotes are needed.
                          For example, label_1 &quot;label 2&quot;" />

                <expand macro="plotTitle" />
                <param argument="--colors" type="text" value="" size="40"
                    label="List of colors to use for the plotted lines"
                    help="Color names and html hex strings (e.g. #eeff22) are accepted.
                    The color names should be separated by spaces. (--colors red blue green)">
                    <validator type="expression"
                        message="Only numbers, digits, '#' and spaces are allowed.">all(c in ' #abcdefghijklmnopqrstuvwxyz0123456789' for c in value)</validator>
                </param>
                <expand macro="legendLocation" />
                <expand macro="labelRotation" />

                <param argument="--perGroup" type="boolean" truevalue="--perGroup" falsevalue=""
                    label="Make one plot per group of regions"
                    help="The default is to make one plot per bigWig file, i.e., all samples next to each other. Choosing this option will make one plot per group of regions. " />

                <param argument="--outFileNameData" type="boolean" label="Save the data underlying the average profile"
                    help="This option will create an additional output file." />

                <param argument="--yMin" type="float" value="" size="3" optional="true"
                    label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values"/>
                <param argument="--yMax" type="float" value="" size="3" optional="true"
                    label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values" />

                <expand macro="kmeans_clustering" />

            </when>
        </conditional>
    </inputs>
    <outputs>
        <expand macro="output_image_file_format" />
        <expand macro="output_graphic_outputs" />

        <data format="tabular" name="output_outFileNameData" label="${tool.name} on ${on_string}: Underlying data">
            <filter>advancedOpt['showAdvancedOpt'] == "yes" and advancedOpt['outFileNameData'] is True</filter>
        </data>

    </outputs>
    <tests>
        <test>
            <param name="matrixFile" value="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" />
            <output name="outFileName" file="profiler_result1.png" ftype="png" compare="sim_size" delta="4000" />
        </test>
        <test>
            <param name="matrixFile" value="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" />
            <param name="showAdvancedOpt" value="yes" />
            <param name="showScaleRegionsOpt" value="yes" />
            <param name="outFileNameData" value="True" />
            <output name="outFileName" file="profiler_result2.png" ftype="png" compare="sim_size" delta="4000" />
            <output name="output_outFileNameData" file="profiler_result2.tabular" ftype="tabular" />
        </test>
    </tests>
    <help>
<![CDATA[

What it does
-------------

This tool plots the average enrichments over all genomic
regions supplied to ``computeMarix``. It requires that ``computeMatrix`` was successfully run.
It is a very useful complement to ``plotHeatmap``, especially in cases where you want to
compare the scores for many different groups. Like ``plotHeatmap``, ``plotProfile`` does not change the
values that were computed by ``computeMatrix``, but you can modify the color and other display properties of the plots.

Output
-------------

.. image:: $PATH_TO_IMAGES/plotProfiler_examples.png
   :width: 600
   :height: 858

=======

In addition to the image, ``plotProfile`` can also generate the values underlying the profile.

See the following table for the **optional output** options:

+-----------------------------------+--------------------+-----------------+-----------------+
|  **optional output type**         |  **computeMatrix** | **plotHeatmap** | **plotProfile** |
+-----------------------------------+--------------------+-----------------+-----------------+
| values underlying the heatmap     |  yes               | yes             | no              |
+-----------------------------------+--------------------+-----------------+-----------------+
| values underlying the profile     | no                 | no              | yes             |
+-----------------------------------+--------------------+-----------------+-----------------+
| sorted and/or filtered regions    | yes                | yes             | yes             |
+-----------------------------------+--------------------+-----------------+-----------------+

-----

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