Source code

Download source archive ↓

upstream-extended/community/tools/text_processing/text_processing/unfold_column.xml

1<tool id="tp_unfold_column_tool" name="Unfold" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2    <description>columns from a table</description>
3    <macros>
4        <import>macros.xml</import>
5    </macros>
6    <expand macro="creator"/>
7    <requirements>
8        <requirement type="package" version="3.12">python</requirement>
9    </requirements>
10    <command>
11<![CDATA[
12        python '$__tool_directory__/unfold_column.py'
13            '${infile}'
14            $column
15            "${delimiter}"
16            '${outfile}'
17]]>
18    </command>
19    <inputs>
20        <param name="infile" format="tabular" type="data" label="File to unfold" />
21        <param name="column" type="data_column" data_ref="infile" accept_default="true" label="Column to use for unfolding" />
22        <param name="delimiter" type="select" label="Values in column are delimited by">
23            <option value=" ">Whitespace</option>
24            <option value=".">Dot</option>
25            <option value=",">Comma</option>
26            <option value="-">Dash</option>
27            <option value="_">Underscore</option>
28            <option value="|">Pipe</option>
29            <option value=";">Semicolon</option>
30        </param>
31    </inputs>
32    <outputs>
33        <data name="outfile" format_source="infile" metadata_source="infile" />
34    </outputs>
35    <tests>
36        <test>
37            <param name="infile" value="unfold_column1.tabular" ftype="tabular"/>
38            <param name="delimiter" value=" "/>
39            <param name="column" value="3"/>
40            <output name="outfile" file="unfold_column_result1.tabular" ftype="tabular"/>
41        </test>
42    </tests>
43    <help>
44<![CDATA[
45**What it does**
46
47This tool will unfold one column of your input dataset.
48
49-----
50
51Input Example::
52
53    a	b	1,2,3,4,5	c
54
55
56Output Example::
57
58    a	b	1	c
59    a	b	2	c
60    a	b	3	c
61    a	b	4	c
62    a	b	5	c
63
64]]>
65  </help>
66  <expand macro="citations" />
67</tool>