Source code

Download source archive ↓

upstream-extended/community/tools/rpy_statistics_collection/histogram.xml

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