Mercurial > repos > bebatut > plot_barplot
diff plot_barplot.xml @ 0:a8e03ffaaedc draft
planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_barplot commit 74beefba9d138c892208b103b52e706ab4313a4a-dirty
author | bebatut |
---|---|
date | Mon, 18 Apr 2016 10:35:54 -0400 |
parents | |
children | 7e3103db022d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plot_barplot.xml Mon Apr 18 10:35:54 2016 -0400 @@ -0,0 +1,121 @@ +<tool id="plot_barplot" name="Plot barplot" 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_barplot.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 + + + --data_column $column_with_data + --names_column $names_column + --xlab "$xlab" + --col $col + --bottom_margin $bottom_margin + --left_margin $left_margin + --top_margin $top_margin + --right_margin $right_margin + ]]></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="column_with_data" type="data_column" data_ref="input_file" multiple="false" numerical="true" label="Column containing data?" help="(--data_column)" /> + + <param name="names_column" type="data_column" data_ref="input_file" multiple="false" numerical="false" label="Column containing data names?" help="(--names_column)" /> + + <param name="xlab" type="text" value="" label="Label for x axis" help="(--xlab)"/> + + <param name="col" label="Bar color" type="text" value= "blue" help="R color (--col)"/> + + <param name="bottom_margin" type="integer" value="5" label="Bottom margin" help="(--bottom_margin)"/> + <param name="left_margin" type="integer" value="19" 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 barplot"> + <filter>output_format=="pdf"</filter> + </data> + <data name="output_png_file" format="png" + label="${tool.name} on ${on_string}: PNG barplot"> + <filter>output_format=="png"</filter> + </data> + <data name="output_svg_file" format="svg" + label="${tool.name} on ${on_string}: SVG barplot"> + <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="column_with_data" value="2"/> + <param name="names_column" value="1"/> + <param name="xlab" value=""/> + <param name="col" value="blue"/> + <param name="bottom_margin" value="5"/> + <param name="left_margin" value="19"/> + <param name="top_margin" value="1"/> + <param name="right_margin" value="1"/> + <output name="output_pdf_file" file="output_test_col_2.pdf"/> + </test> + <test> + <param name="input_file" value="input_file.txt"/> + <param name="header" value="FALSE"/> + <param name="output_format" value="pdf"/> + <param name="column_with_data" value="3"/> + <param name="names_column" value="1"/> + <param name="xlab" value=""/> + <param name="col" value="red"/> + <param name="bottom_margin" value="5"/> + <param name="left_margin" value="19"/> + <param name="top_margin" value="1"/> + <param name="right_margin" value="1"/> + <output name="output_pdf_file" file="output_test_col_3.pdf"/> + </test> + </tests> + + <help><![CDATA[ +**What it does** + +This tool plot a barplot. + +.. image:: $PATH_TO_IMAGES/output.png + :scale: 50 % + +This tool relies on R's barplot function. The input file must be a tabular file with multiple columns: a column with row names (for bar names) and a least a column with data. The output image is customizable (margin, legend positions, ...) and can be export in different format. + ]]></help> + + <citations> + </citations> +</tool> \ No newline at end of file