Mercurial > repos > bebatut > plot_grouped_barplot
comparison plot_grouped_barplot.xml @ 0:217f96dbd973 draft
planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/plot_grouped_barplot commit 5c45ed58045ce1686aa069403f8a9426ea20bac5-dirty
| author | bebatut |
|---|---|
| date | Tue, 12 Apr 2016 03:11:25 -0400 |
| parents | |
| children | ed13c93bfdf0 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:217f96dbd973 |
|---|---|
| 1 <tool id="plot_grouped_barplot" name="Plot grouped barplot" version="0.1.0"> | |
| 2 <description>with R</description> | |
| 3 | |
| 4 <requirements> | |
| 5 <requirement type="package" version="3.2.1">R</requirement> | |
| 6 <requirement type="package" version="1.20.0">getopt</requirement> | |
| 7 </requirements> | |
| 8 | |
| 9 <stdio> | |
| 10 <exit_code range="1:" /> | |
| 11 <exit_code range=":-1" /> | |
| 12 </stdio> | |
| 13 | |
| 14 <version_command></version_command> | |
| 15 | |
| 16 <command><![CDATA[ | |
| 17 Rscript $__tool_directory__/plot_grouped_barplot.R | |
| 18 --input_file $input_file | |
| 19 --header $header | |
| 20 | |
| 21 #if str($output_format)=="pdf" | |
| 22 --output_pdf_file $output_pdf_file | |
| 23 #else | |
| 24 --output_svg_file $output_svg_file | |
| 25 #end if | |
| 26 | |
| 27 #set $column_with_data="" | |
| 28 #set $colors="" | |
| 29 #set $names="" | |
| 30 #set $sep="" | |
| 31 #for sample in $samples: | |
| 32 #set $column_with_data = $column_with_data + $sep + str($sample.column_id) | |
| 33 #set $colors = $colors + $sep + str($sample.color) | |
| 34 #set $names = $names + $sep +str($sample.name) | |
| 35 #set $sep="," | |
| 36 #end for | |
| 37 #set $column_with_data = $column_with_data | |
| 38 #set $colors = $colors | |
| 39 #set $names = $names | |
| 40 | |
| 41 --data_column $column_with_data | |
| 42 --col "$colors" | |
| 43 --names "$names" | |
| 44 --replace_null $replace_null | |
| 45 --order $order | |
| 46 --names_column $names_column | |
| 47 --xlab "$xlab" | |
| 48 --log $log | |
| 49 --bottom_margin $bottom_margin | |
| 50 --left_margin $left_margin | |
| 51 --top_margin $top_margin | |
| 52 --right_margin $right_margin | |
| 53 --legend_pos $legend_pos | |
| 54 ]]></command> | |
| 55 | |
| 56 <inputs> | |
| 57 <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)"/> | |
| 58 | |
| 59 <param name="header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Header in first line?" help="(--header)"/> | |
| 60 | |
| 61 <param name="output_format" label="Format for output image" type="select" help=""> | |
| 62 <option value="pdf" selected="True">PDF</option> | |
| 63 <option value="svg">SVG</option> | |
| 64 </param> | |
| 65 | |
| 66 <repeat name="samples" title="Add sample information (column id, name, color)" > | |
| 67 <param name="name" type="text" label="Name of the data" help="(--sample_name)"/> | |
| 68 <param name="column_id" type="data_column" data_ref="input_file" label="Column containing corresponding data" multiple="false" numerical="true" help="(after normalization, --charact_input_file)"/> | |
| 69 <param name="color" label="Bar color" type="text" value= "blue" help="R color (--col)"/> | |
| 70 </repeat> | |
| 71 <param name="replace_null" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Replace null values by NA?" help="(--replace_null)"/> | |
| 72 <param name="order" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Order given the first chosen data?" help="(--order)"/> | |
| 73 | |
| 74 <param name="names_column" type="data_column" data_ref="input_file" multiple="false" numerical="false" label="Column containing data names?" help="(--names_column)" /> | |
| 75 | |
| 76 <param name="xlab" type="text" value="" label="Label for x axis" help="(--xlab)"/> | |
| 77 | |
| 78 <param name="log" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Log scale?" help="(--log)"/> | |
| 79 | |
| 80 <param name="bottom_margin" type="integer" value="5" label="Bottom margin" help="(--bottom_margin)"/> | |
| 81 <param name="left_margin" type="integer" value="19" label="Left margin" help="(--left_margin)"/> | |
| 82 <param name="top_margin" type="integer" value="1" label="Top margin" help="(--top_margin)"/> | |
| 83 <param name="right_margin" type="integer" value="1" label="Right margin" help="(--right_margin)"/> | |
| 84 <param name="legend_pos" label="Position of the legend" type="select" help=""> | |
| 85 <option value="topright" selected="True">Top right</option> | |
| 86 <option value="topleft">Top left</option> | |
| 87 <option value="bottomright">Bottom right</option> | |
| 88 <option value="bottomleft">Bottom left</option> | |
| 89 </param> | |
| 90 </inputs> | |
| 91 | |
| 92 <outputs> | |
| 93 <data name="output_pdf_file" format="pdf" | |
| 94 label="${tool.name} on ${on_string}: PDF barplot"> | |
| 95 <filter>output_format=="pdf"</filter> | |
| 96 </data> | |
| 97 <data name="output_png_file" format="png" | |
| 98 label="${tool.name} on ${on_string}: PNG barplot"> | |
| 99 <filter>output_format=="png"</filter> | |
| 100 </data> | |
| 101 <data name="output_svg_file" format="svg" | |
| 102 label="${tool.name} on ${on_string}: SVG barplot"> | |
| 103 <filter>output_format=="svg"</filter> | |
| 104 </data> | |
| 105 </outputs> | |
| 106 | |
| 107 <tests> | |
| 108 </tests> | |
| 109 | |
| 110 <help><![CDATA[ | |
| 111 **What it does** | |
| 112 | |
| 113 This tool plot a grouped barplot from a tabular file into different format files given different customizable parameters: | |
| 114 | |
| 115 .. image:: $PATH_TO_IMAGES/output.png | |
| 116 :scale: 50 % | |
| 117 | |
| 118 This tool relies on R's barplot function. | |
| 119 | |
| 120 ]]></help> | |
| 121 | |
| 122 <citations> | |
| 123 </citations> | |
| 124 </tool> |
