Mercurial > repos > devteam > column_maker
annotate column_maker.xml @ 2:292c605c2dc7 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
author | devteam |
---|---|
date | Fri, 18 Dec 2015 18:52:53 -0500 |
parents | d3f10c90fc96 |
children | 35937a6b04fb |
rev | line source |
---|---|
0 | 1 <tool id="Add_a_column1" name="Compute" version="1.1.0"> |
2 <description>an expression on every row</description> | |
3 <command interpreter="python"> | |
4 column_maker.py $input $out_file1 "$cond" $round ${input.metadata.columns} "${input.metadata.column_types}" | |
5 </command> | |
6 <inputs> | |
1
d3f10c90fc96
planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents:
0
diff
changeset
|
7 <param name="cond" type="text" value="c3-c2" label="Add expression"/> |
0 | 8 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> |
9 <param name="round" type="select" label="Round result?"> | |
10 <option value="no">NO</option> | |
11 <option value="yes">YES</option> | |
12 </param> | |
13 </inputs> | |
14 <outputs> | |
15 <data format="input" name="out_file1" metadata_source="input"/> | |
16 </outputs> | |
17 <tests> | |
18 <test> | |
19 <param name="cond" value="c3-c2"/> | |
20 <param name="input" value="1.bed"/> | |
21 <param name="round" value="no"/> | |
22 <output name="out_file1" file="column_maker_out1.interval"/> | |
23 </test> | |
24 <test> | |
25 <param name="cond" value="c4*1"/> | |
26 <param name="input" value="1.interval"/> | |
27 <param name="round" value="no"/> | |
28 <output name="out_file1" file="column_maker_out2.interval"/> | |
29 </test> | |
30 <test> | |
31 <param name="cond" value="c4*1"/> | |
32 <param name="input" value="1.interval"/> | |
33 <param name="round" value="yes"/> | |
34 <output name="out_file1" file="column_maker_out3.interval"/> | |
35 </test> | |
36 </tests> | |
37 <help> | |
38 | |
39 .. class:: infomark | |
40 | |
41 **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* | |
42 | |
43 ----- | |
44 | |
45 **What it does** | |
46 | |
47 This tool computes an expression for every row of a dataset and appends the result as a new column (field). | |
48 | |
49 - Columns are referenced with **c** and a **number**. For example, **c1** refers to the first column of a tab-delimited file | |
50 | |
51 - **c3-c2** will add a length column to the dataset if **c2** and **c3** are start and end position | |
52 | |
53 ----- | |
54 | |
55 **Example** | |
56 | |
57 If this is your input:: | |
58 | |
59 chr1 151077881 151077918 2 200 - | |
60 chr1 151081985 151082078 3 500 + | |
61 | |
62 computing "c4*c5" will produce:: | |
63 | |
64 chr1 151077881 151077918 2 200 - 400.0 | |
65 chr1 151081985 151082078 3 500 + 1500.0 | |
66 | |
67 if, at the same time, "Round result?" is set to **YES** results will look like this:: | |
68 | |
69 chr1 151077881 151077918 2 200 - 400 | |
70 chr1 151081985 151082078 3 500 + 1500 | |
71 | |
72 You can also use this tool to evaluate expressions. For example, computing "c3>=c2" for Input will result in the following:: | |
73 | |
74 chr1 151077881 151077918 2 200 - True | |
75 chr1 151081985 151082078 3 500 + True | |
76 | |
77 or computing "type(c2)==type('') for Input will return:: | |
78 | |
79 chr1 151077881 151077918 2 200 - False | |
80 chr1 151081985 151082078 3 500 + False | |
81 | |
2
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
82 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
83 The following build-in functions are available:: |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
84 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
85 abs | all | any | bin | bool | chr | ceil | cmp | complex |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
86 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
87 divmod | exp | float | log | floor | hex | int | len | long |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
88 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
89 max | min | oct | ord | pow | range | reversed |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
90 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
91 round | sorted | sqrt | str | sum | type | unichr | unicode | |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
92 |
292c605c2dc7
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit de7140295cce07e1bc1697e51dab4271c8d7a8a6
devteam
parents:
1
diff
changeset
|
93 </help> |
0 | 94 </tool> |