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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
1 <tool id="Add_a_column1" name="Compute" version="1.1.0">
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
2 <description>an expression on every row</description>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
3 <command interpreter="python">
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
4 column_maker.py $input $out_file1 "$cond" $round ${input.metadata.columns} "${input.metadata.column_types}"
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
5 </command>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
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
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
8 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
9 <param name="round" type="select" label="Round result?">
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
10 <option value="no">NO</option>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
11 <option value="yes">YES</option>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
12 </param>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
13 </inputs>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
14 <outputs>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
15 <data format="input" name="out_file1" metadata_source="input"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
16 </outputs>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
17 <tests>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
18 <test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
19 <param name="cond" value="c3-c2"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
20 <param name="input" value="1.bed"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
21 <param name="round" value="no"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
22 <output name="out_file1" file="column_maker_out1.interval"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
23 </test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
24 <test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
25 <param name="cond" value="c4*1"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
26 <param name="input" value="1.interval"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
27 <param name="round" value="no"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
28 <output name="out_file1" file="column_maker_out2.interval"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
29 </test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
30 <test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
31 <param name="cond" value="c4*1"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
32 <param name="input" value="1.interval"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
33 <param name="round" value="yes"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
34 <output name="out_file1" file="column_maker_out3.interval"/>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
35 </test>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
36 </tests>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
37 <help>
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
38
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
39 .. class:: infomark
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
40
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
41 **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
42
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
43 -----
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
44
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
45 **What it does**
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
46
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
47 This tool computes an expression for every row of a dataset and appends the result as a new column (field).
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
48
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
49 - Columns are referenced with **c** and a **number**. For example, **c1** refers to the first column of a tab-delimited file
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
50
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
51 - **c3-c2** will add a length column to the dataset if **c2** and **c3** are start and end position
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
52
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
53 -----
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
54
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
55 **Example**
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
56
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
57 If this is your input::
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
58
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
59 chr1 151077881 151077918 2 200 -
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
60 chr1 151081985 151082078 3 500 +
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
61
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
62 computing "c4*c5" will produce::
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
63
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
64 chr1 151077881 151077918 2 200 - 400.0
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
65 chr1 151081985 151082078 3 500 + 1500.0
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
66
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
67 if, at the same time, "Round result?" is set to **YES** results will look like this::
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
68
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
69 chr1 151077881 151077918 2 200 - 400
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
70 chr1 151081985 151082078 3 500 + 1500
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
71
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
72 You can also use this tool to evaluate expressions. For example, computing "c3>=c2" for Input will result in the following::
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
73
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
74 chr1 151077881 151077918 2 200 - True
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
75 chr1 151081985 151082078 3 500 + True
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
76
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
77 or computing "type(c2)==type('') for Input will return::
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
78
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
79 chr1 151077881 151077918 2 200 - False
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
80 chr1 151081985 151082078 3 500 + False
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
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
4dadd821722f Imported from capsule None
devteam
parents:
diff changeset
94 </tool>