Mercurial > repos > devteam > column_maker
comparison column_maker.xml @ 3:35937a6b04fb draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit f6e96ffa420035051ea4632596dfd171074aa66d
author | devteam |
---|---|
date | Thu, 25 Oct 2018 17:31:05 -0400 |
parents | 292c605c2dc7 |
children | 3335c0d583d8 |
comparison
equal
deleted
inserted
replaced
2:292c605c2dc7 | 3:35937a6b04fb |
---|---|
1 <tool id="Add_a_column1" name="Compute" version="1.1.0"> | 1 <tool id="Add_a_column1" name="Compute" version="1.2.0"> |
2 <description>an expression on every row</description> | 2 <description>an expression on every row</description> |
3 <command interpreter="python"> | 3 <requirements> |
4 column_maker.py $input $out_file1 "$cond" $round ${input.metadata.columns} "${input.metadata.column_types}" | 4 <requirement type="package" version="2.7.13">python</requirement> |
5 </command> | 5 <requirement type="package" version="4.4">sed</requirement> |
6 <inputs> | 6 </requirements> |
7 <param name="cond" type="text" value="c3-c2" label="Add expression"/> | 7 <command detect_errors="aggressive"><![CDATA[ |
8 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> | 8 #if $header_lines_conditional.header_lines_select == "yes": |
9 <param name="round" type="select" label="Round result?"> | 9 (sed -n '1,1p' '$input' | sed "s|$|%${header_lines_conditional.header_new_column_name}|" | tr "%" "\t") > header && |
10 <option value="no">NO</option> | 10 sed '1,1d' '$input' > data && |
11 <option value="yes">YES</option> | 11 #else: |
12 </param> | 12 touch header && |
13 </inputs> | 13 ln -s '$input' data && |
14 <outputs> | 14 #end if |
15 <data format="input" name="out_file1" metadata_source="input"/> | 15 |
16 </outputs> | 16 python '$__tool_directory__/column_maker.py' |
17 <tests> | 17 data column_maker_output |
18 <test> | 18 "$cond" |
19 <param name="cond" value="c3-c2"/> | 19 $round |
20 <param name="input" value="1.bed"/> | 20 ${input.metadata.columns} |
21 <param name="round" value="no"/> | 21 "${input.metadata.column_types}" && |
22 <output name="out_file1" file="column_maker_out1.interval"/> | 22 cat header column_maker_output > '$out_file1' |
23 </test> | 23 ]]></command> |
24 <test> | 24 <inputs> |
25 <param name="cond" value="c4*1"/> | 25 <param name="cond" type="text" value="c3-c2" label="Add expression"/> |
26 <param name="input" value="1.interval"/> | 26 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> |
27 <param name="round" value="no"/> | 27 <param name="round" type="select" label="Round result?"> |
28 <output name="out_file1" file="column_maker_out2.interval"/> | 28 <option value="no">NO</option> |
29 </test> | 29 <option value="yes">YES</option> |
30 <test> | 30 </param> |
31 <param name="cond" value="c4*1"/> | 31 <conditional name="header_lines_conditional"> |
32 <param name="input" value="1.interval"/> | 32 <param name="header_lines_select" type="select" label="Skip a header line" help="# characters are already considered as comments and kept" > |
33 <param name="round" value="yes"/> | 33 <option value="no" >no</option> |
34 <output name="out_file1" file="column_maker_out3.interval"/> | 34 <option value="yes" >yes</option> |
35 </test> | 35 </param> |
36 </tests> | 36 <when value="no"> |
37 <help> | 37 </when> |
38 <when value="yes"> | |
39 <param name="header_new_column_name" type="text" value="New Column" label="The new column name" /> | |
40 </when> | |
41 </conditional> | |
42 </inputs> | |
43 <outputs> | |
44 <data format_source="input" name="out_file1" metadata_source="input"/> | |
45 </outputs> | |
46 <tests> | |
47 <test> | |
48 <param name="cond" value="c3-c2"/> | |
49 <param name="input" value="1.bed"/> | |
50 <param name="round" value="no"/> | |
51 <output name="out_file1" file="column_maker_out1.interval"/> | |
52 </test> | |
53 <test> | |
54 <param name="cond" value="c4*1"/> | |
55 <param name="input" value="1.interval"/> | |
56 <param name="round" value="no"/> | |
57 <output name="out_file1" file="column_maker_out2.interval"/> | |
58 </test> | |
59 <test> | |
60 <param name="cond" value="c4*1"/> | |
61 <param name="input" value="1.header.tsv"/> | |
62 <param name="round" value="no"/> | |
63 <conditional name="header_lines_conditional"> | |
64 <param name="header_lines_select" value="yes" /> | |
65 <param name="header_new_column_name" value="value1_again" /> | |
66 </conditional> | |
67 <output name="out_file1" file="column_maker_out2.header.tsv"/> | |
68 </test> | |
69 <test> | |
70 <param name="cond" value="c4*1"/> | |
71 <param name="input" value="1.interval"/> | |
72 <param name="round" value="yes"/> | |
73 <output name="out_file1" file="column_maker_out3.interval"/> | |
74 </test> | |
75 </tests> | |
76 <help> | |
38 | 77 |
39 .. class:: infomark | 78 .. class:: infomark |
40 | 79 |
41 **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* | 80 **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* |
42 | 81 |
61 | 100 |
62 computing "c4*c5" will produce:: | 101 computing "c4*c5" will produce:: |
63 | 102 |
64 chr1 151077881 151077918 2 200 - 400.0 | 103 chr1 151077881 151077918 2 200 - 400.0 |
65 chr1 151081985 151082078 3 500 + 1500.0 | 104 chr1 151081985 151082078 3 500 + 1500.0 |
66 | 105 |
67 if, at the same time, "Round result?" is set to **YES** results will look like this:: | 106 if, at the same time, "Round result?" is set to **YES** results will look like this:: |
68 | 107 |
69 chr1 151077881 151077918 2 200 - 400 | 108 chr1 151077881 151077918 2 200 - 400 |
70 chr1 151081985 151082078 3 500 + 1500 | 109 chr1 151081985 151082078 3 500 + 1500 |
71 | 110 |
88 | 127 |
89 max | min | oct | ord | pow | range | reversed | 128 max | min | oct | ord | pow | range | reversed |
90 | 129 |
91 round | sorted | sqrt | str | sum | type | unichr | unicode | | 130 round | sorted | sqrt | str | sum | type | unichr | unicode | |
92 | 131 |
93 </help> | 132 </help> |
133 <citations /> | |
94 </tool> | 134 </tool> |