view plot_generic_x_y_plot.xml @ 0:5118d839acae draft default tip

planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_generic_x_y_plot commit e4da8b5a999456b2b6dabdf6b8f3bfea1eba5504-dirty
author bebatut
date Mon, 18 Apr 2016 11:11:02 -0400
parents
children
line wrap: on
line source

<tool id="plot_generic_x_y_plot" name="Plot generic X-Y plot" version="0.1.0">
    <description>with R</description>

    <requirements>
        <requirement type="package" version="3.2.1">R</requirement>
        <requirement type="package" version="1.20.0">r-getopt</requirement>
    </requirements>

    <stdio>
        <exit_code range="1:" />
        <exit_code range=":-1" />
    </stdio>

    <version_command></version_command>

    <command><![CDATA[
        Rscript $__tool_directory__/plot_generic_x_y_plot.R
            --input_file $input_file
            --header $header

            #if str($output_format)=="pdf"
                --output_pdf_file $output_pdf_file
            #else
                --output_svg_file $output_svg_file
            #end if

            --x_column_id $x_column_id
            --y_column_id $y_column_id
            --xlog $xlog
            --ylog $ylog
            --xlab "$xlab"
            --ylab "$ylab"
            --col $color
            --lim $lim
            --abline $abline
            --bottom_margin $bottom_margin
            --left_margin $left_margin
            --top_margin $top_margin
            --right_margin $right_margin
            --pch $pch
    ]]></command>

    <inputs>
        <param name="input_file" type="data" format="tabular,tsv,csv" label="Input file" help="File in tabular format with tab-separated columns and header in first line (--input_file)"/>

        <param name="header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Header in first line?" help="(--header)"/>

        <param name="output_format" label="Format for output image" type="select" help="">
            <option value="pdf" selected="True">PDF</option>
            <option value="svg">SVG</option>
        </param>

        <param name="x_column_id" type="data_column" data_ref="input_file" label="Column containing data for X axis" multiple="false" numerical="true" help="--x_column_id)"/>
        <param name="y_column_id" type="data_column" data_ref="input_file" label="Column containing data for Y axis" multiple="false" numerical="true" help="--y_column_id)"/>

        <param name="xlog" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Scale with log for X axis?" help="(--xlog)"/>
        <param name="ylog" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Scale with log for Y axis?" help="(--ylog)"/>

        <param name="xlab" type="text" value="" label="Label for X axis" help="(--xlab)"/>
        <param name="ylab" type="text" value="" label="Label for Y axis" help="(--ylab)"/>

        <param name="color" label="Color for the points" type="text" value= "grey25" help="R color (--col)"/>
        <param name="pch" type="integer" value="21" label="Point type" help="(--pch)"/>

        <param name="lim" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Use same limits for both axis?" help="(--lim)"/>
        <param name="abline" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Add a line for x = y?" help="(--abline)"/>

        <param name="bottom_margin" type="integer" value="5" label="Bottom margin" help="(--bottom_margin)"/>
        <param name="left_margin" type="integer" value="5" label="Left margin" help="(--left_margin)"/>
        <param name="top_margin" type="integer" value="1" label="Top margin" help="(--top_margin)"/>
        <param name="right_margin" type="integer" value="1" label="Right margin" help="(--right_margin)"/>
    </inputs>

    <outputs>
        <data name="output_pdf_file" format="pdf"
            label="${tool.name} on ${on_string}: PDF X-Y plot">
            <filter>output_format=="pdf"</filter>
        </data>
        <data name="output_png_file" format="png"
            label="${tool.name} on ${on_string}: PNG X-Y plot">
            <filter>output_format=="png"</filter>
        </data>
        <data name="output_svg_file" format="svg"
            label="${tool.name} on ${on_string}: SVG X-Y plot">
            <filter>output_format=="svg"</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="input_file" value="input_file.txt" />
            <param name="header" value="FALSE" />
            <param name="output_format" value="pdf" />    
            <param name="x_column_id" value="2" />
            <param name="y_column_id" value="3" />
            <param name="xlog" value="FALSE" />
            <param name="ylog" value="FALSE" />
            <param name="xlab" value="" />
            <param name="ylab" value="" />
            <param name="color" value= "grey25" />
            <param name="pch" value="21" />
            <param name="lim" value="FALSE" />
            <param name="abline" value="FALSE" />
            <param name="bottom_margin" value="5" />
            <param name="left_margin" value="5" />
            <param name="top_margin" value="1" />
            <param name="right_margin" value="1" />
            <output name="output_pdf_file" file="output_file.pdf" />
        </test>
    </tests>

    <help><![CDATA[
**What it does**

This tool plot a generic X-Y plot:

.. image:: $PATH_TO_IMAGES/output.png
   :scale: 50 %

This tool relies on R's plot function. The input file must be a tabular file with at least two data columns. The output image is customizable (margin, legend positions, ...) and can be export in different format. 
    ]]></help>

    <citations>
    </citations>
</tool>