1 | <tool id="histogram_rpy" name="Histogram" version="1.0.2">
|
---|
2 | <description>of a numeric column</description>
|
---|
3 | <command interpreter="python">histogram.py $input $out_file1 $numerical_column "$title" "$xlab" $breaks $density</command>
|
---|
4 | <inputs>
|
---|
5 | <param name="input" type="data" format="tabular" label="Dataset" help="Query missing? See TIP below"/>
|
---|
6 | <param name="numerical_column" type="data_column" data_ref="input" numerical="True" label="Numerical column for x axis" />
|
---|
7 | <param name="breaks" type="integer" size="4" value="0" label="Number of breaks (bars)"/>
|
---|
8 | <param name="title" type="text" size="30" value="Histogram" label="Plot title"/>
|
---|
9 | <param name="xlab" type="text" size="30" value="V1" label="Label for x axis"/>
|
---|
10 | <param name="density" type="boolean" checked="yes" label="Include smoothed density"/>
|
---|
11 | </inputs>
|
---|
12 | <outputs>
|
---|
13 | <data format="pdf" name="out_file1" />
|
---|
14 | </outputs>
|
---|
15 | <tests>
|
---|
16 | <test>
|
---|
17 | <param name="input" value="histogram_in1.tabular" ftype="tabular"/>
|
---|
18 | <param name="numerical_column" value="2"/>
|
---|
19 | <param name="breaks" value="0"/>
|
---|
20 | <param name="title" value="Histogram"/>
|
---|
21 | <param name="xlab" value="V1"/>
|
---|
22 | <param name="density" value="true"/>
|
---|
23 | <output name="out_file1" file="histogram_out1.pdf" />
|
---|
24 | </test>
|
---|
25 | </tests>
|
---|
26 | <requirements>
|
---|
27 | <requirement type="python-module">rpy</requirement>
|
---|
28 | </requirements>
|
---|
29 | <help>
|
---|
30 |
|
---|
31 | .. class:: infomark
|
---|
32 |
|
---|
33 | **TIP:** To remove comment lines that do not begin with a *#* character, use *Text Manipulation->Remove beginning*
|
---|
34 |
|
---|
35 | .. class:: infomark
|
---|
36 |
|
---|
37 | **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
|
---|
38 |
|
---|
39 | -----
|
---|
40 |
|
---|
41 | **Syntax**
|
---|
42 |
|
---|
43 | This tool computes a histogram of the numerical values in a column of a query.
|
---|
44 |
|
---|
45 | - All invalid, blank and comment lines in the query are skipped. The number of skipped lines is displayed in the resulting history item.
|
---|
46 | - **Column for x axis** - only numerical columns are possible.
|
---|
47 | - **Number of breaks(bars)** - breakpoints between histogram cells. Value of '0' will determine breaks automatically.
|
---|
48 | - **Plot title** - the histogram title.
|
---|
49 | - **Label for x axis** - the label of the x axis for the histogram.
|
---|
50 | - **Include smoothed density** - if checked, the resulting graph will join the given corresponding points with line segments.
|
---|
51 |
|
---|
52 | -----
|
---|
53 |
|
---|
54 | **Example**
|
---|
55 |
|
---|
56 | - Input file::
|
---|
57 |
|
---|
58 | 1 68 4.1
|
---|
59 | 2 71 4.6
|
---|
60 | 3 62 3.8
|
---|
61 | 4 75 4.4
|
---|
62 | 5 58 3.2
|
---|
63 | 6 60 3.1
|
---|
64 | 7 67 3.8
|
---|
65 | 8 68 4.1
|
---|
66 | 9 71 4.3
|
---|
67 | 10 69 3.7
|
---|
68 |
|
---|
69 | - Create a histogram on column 2 of the above dataset.
|
---|
70 |
|
---|
71 | .. image:: ../static/images/histogram2.png
|
---|
72 |
|
---|
73 | </help>
|
---|
74 | </tool>
|
---|