comparison plot_corr.xml @ 0:0cee38fb62af draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/plot_correlation_matrix commit 8451e17775c0ffcd7fa63ef65081f442bef91496
author mvdbeek
date Fri, 27 Apr 2018 09:48:24 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0cee38fb62af
1 <tool id="plot_correlation" name="Plot correlations" version="0.1.3">
2 <description>for multiple samples</description>
3 <requirements>
4 <requirement type="package" version="0.8.1">seaborn</requirement>
5 <requirement type="package" version="6.7">click</requirement>
6 </requirements>
7 <command detect_errors="exit_code"><![CDATA[
8 python '$__tool_directory__/plot_corr.py'
9 #echo "".join(["'%s' " % f for f in $input_files])
10 -c $c
11 --labels '$labels'
12 #if $plot_type != "None"
13 --plot_path output.$plot_type
14 #end if
15 --correlation_matrix_path $tab_output
16 --method $method
17 --skiprows $skiprows
18 #if $input_files[0].ext == 'csv'
19 --sep ","
20 #end if
21 #if $plot_type != "None"
22 && mv output.$plot_type plot
23 #end if
24 ]]></command>
25 <configfiles>
26 <configfile name="labels">#for f in $input_files
27 $f.element_identifier
28 #end for</configfile>
29 </configfiles>
30 <inputs>
31 <param name="input_files" type="data" multiple="true" format="tabular,csv" label="Select the files for which to calculate the correlation"/>
32 <param argument="-c" type="data_column" data_ref="input_files" value="1" label="Select the numeric column to use"/>
33 <param argument="--skiprows" type="integer" min="0" value="0" label="Skip the first N rows" help="Make sure that all values are numeric"/>
34 <param argument="--plot_type" type="select" label="Select the type of plot to produce">
35 <option value="pdf">PDF</option>
36 <option value="png">PNG</option>
37 <option value="None">Don't output plot</option>
38 </param>
39 <param argument="--method" type="select" label="Select the correlation method">
40 <option value="pearson">Pearson Correlation</option>
41 <option value="spearman">Spearman Correlation</option>
42 <option value="kendall">Kendall-Tau Correlation</option>
43 </param>
44 </inputs>
45 <outputs>
46 <data name="plot_output" format="pdf" from_work_dir="plot" label="${tool.name} plot on ${on_string}">
47 <filter>str(plot_type) != "None"</filter>
48 <change_format>
49 <when input="plot_type" value="png" format="png"/>
50 </change_format>
51 </data>
52 <data name="tab_output" format="tabular" label="${tool.name} table on ${on_string}"/>
53 </outputs>
54 <tests>
55 <test>
56 <param name="input_files" value="1.txt,2.txt,3.txt" ftype="tabular"/>
57 <output name="plot_output" value="corr.pdf" ftype="pdf"/>
58 <output name="tab_output" value="corr.tab" ftype="tabular"/>
59 </test>
60 <test>
61 <param name="input_files" value="1.txt,2.txt,3.txt" ftype="tabular"/>
62 <param name="plot_type" value="png"/>
63 <output name="plot_output" value="corr.png" ftype="png"/>
64 <output name="tab_output" value="corr.tab" ftype="tabular"/>
65 </test>
66 </tests>
67 <help><![CDATA[
68 What it does
69 ------------
70
71 This tool calculates the correlation for a selected colum across many datasets.
72
73 Example output:
74 ---------------
75
76 .. image:: $PATH_TO_IMAGES/corr.png
77
78 ]]></help>
79 </tool>