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