upstream/add_value/fixedValueColumn.xml
1<tool id="addValue" name="Add column" version="1.0.1" profile="16.04">
2 <description>to an existing dataset</description>
3 <requirements>
4 <requirement type="package" version="5.26">perl</requirement>
5 </requirements>
6 <command>
7 perl $__tool_directory__/fixedValueColumn.pl
8 "${input}"
9 "${out_file1}"
10 "${exp}"
11 "${iterate}"
12 </command>
13 <inputs>
14 <param name="exp" type="text" value="1" label="Add this value"/>
15 <param format="tabular" name="input" type="data" label="to Dataset" help="Dataset missing? See TIP below" />
16 <param name="iterate" type="select" label="Iterate?">
17 <option value="no">NO</option>
18 <option value="yes">YES</option>
19 </param>
20 </inputs>
21 <outputs>
22 <data name="out_file1" format_source="input"/>
23 </outputs>
24 <tests>
25 <test>
26 <param name="exp" value="1"/>
27 <param name="input" value="1.bed"/>
28 <param name="iterate" value="no"/>
29 <output name="out_file1" file="eq-addvalue.dat"/>
30 </test>
31 </tests>
32 <help>
33
34.. class:: infomark
35
36**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
37
38-----
39
40**What it does**
41
42You can enter any value and it will be added as a new column to your dataset
43
44-----
45
46**Example**
47
48If you original data looks like this::
49
50 chr1 10 100 geneA
51 chr2 200 300 geneB
52 chr2 400 500 geneC
53
54Typing **+** in the text box will generate::
55
56 chr1 10 100 geneA +
57 chr2 200 300 geneB +
58 chr2 400 500 geneC +
59
60
61You can also add line numbers by selecting **Iterate: YES**. In this case if you enter **1** in the text box you will get::
62
63 chr1 10 100 geneA 1
64 chr2 200 300 geneB 2
65 chr2 400 500 geneC 3
66
67 </help>
68</tool>
69