comparison column_maker.xml @ 4:3335c0d583d8 draft

"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit 2b17bdfc47ca4d7f1a584216c4bd61a7050df7ea"
author devteam
date Thu, 04 Jun 2020 09:03:25 +0000
parents 35937a6b04fb
children c6fdc1118036
comparison
equal deleted inserted replaced
3:35937a6b04fb 4:3335c0d583d8
1 <tool id="Add_a_column1" name="Compute" version="1.2.0"> 1 <tool id="Add_a_column1" name="Compute" version="1.3.0">
2 <description>an expression on every row</description> 2 <description>an expression on every row</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="2.7.13">python</requirement> 4 <requirement type="package" version="2.7.13">python</requirement>
5 <requirement type="package" version="4.4">sed</requirement> 5 <requirement type="package" version="4.4">sed</requirement>
6 <requirement type="package" version="1.14">numpy</requirement>
6 </requirements> 7 </requirements>
7 <command detect_errors="aggressive"><![CDATA[ 8 <command detect_errors="aggressive"><![CDATA[
8 #if $header_lines_conditional.header_lines_select == "yes": 9 #if $header_lines_conditional.header_lines_select == "yes":
9 (sed -n '1,1p' '$input' | sed "s|$|%${header_lines_conditional.header_new_column_name}|" | tr "%" "\t") > header && 10 (sed -n '1,1p' '$input' | sed "s|$|%${header_lines_conditional.header_new_column_name}|" | tr "%" "\t") > header &&
10 sed '1,1d' '$input' > data && 11 sed '1,1d' '$input' > data &&
16 python '$__tool_directory__/column_maker.py' 17 python '$__tool_directory__/column_maker.py'
17 data column_maker_output 18 data column_maker_output
18 "$cond" 19 "$cond"
19 $round 20 $round
20 ${input.metadata.columns} 21 ${input.metadata.columns}
21 "${input.metadata.column_types}" && 22 "${input.metadata.column_types}"
23 $avoid_scientific_notation &&
22 cat header column_maker_output > '$out_file1' 24 cat header column_maker_output > '$out_file1'
23 ]]></command> 25 ]]></command>
24 <inputs> 26 <inputs>
25 <param name="cond" type="text" value="c3-c2" label="Add expression"/> 27 <param name="cond" type="text" value="c3-c2" label="Add expression"/>
26 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> 28 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/>
37 </when> 39 </when>
38 <when value="yes"> 40 <when value="yes">
39 <param name="header_new_column_name" type="text" value="New Column" label="The new column name" /> 41 <param name="header_new_column_name" type="text" value="New Column" label="The new column name" />
40 </when> 42 </when>
41 </conditional> 43 </conditional>
44 <param name="avoid_scientific_notation" type="select" label="Avoid scientific notation" help="If yes, use fully expanded decimal representation when writing new columns (use only if expression produces decimal numbers).">
45 <option value="no">no</option>
46 <option value="yes">yes</option>
47 </param>
42 </inputs> 48 </inputs>
43 <outputs> 49 <outputs>
44 <data format_source="input" name="out_file1" metadata_source="input"/> 50 <data format_source="input" name="out_file1" metadata_source="input"/>
45 </outputs> 51 </outputs>
46 <tests> 52 <tests>
69 <test> 75 <test>
70 <param name="cond" value="c4*1"/> 76 <param name="cond" value="c4*1"/>
71 <param name="input" value="1.interval"/> 77 <param name="input" value="1.interval"/>
72 <param name="round" value="yes"/> 78 <param name="round" value="yes"/>
73 <output name="out_file1" file="column_maker_out3.interval"/> 79 <output name="out_file1" file="column_maker_out3.interval"/>
80 </test>
81 <test>
82 <param name="cond" value="float(.0000000000001)"/>
83 <param name="input" value="1.bed"/>
84 <param name="round" value="no"/>
85 <output name="out_file1">
86 <assert_contents>
87 <has_text text="CCDS10397" />
88 <has_text text="1e-13" />
89 </assert_contents>
90 </output>
91 </test>
92 <test>
93 <param name="cond" value="float(.0000000000001)"/>
94 <param name="input" value="1.bed"/>
95 <param name="round" value="no"/>
96 <param name="avoid_scientific_notation" value="yes"/>
97 <output name="out_file1">
98 <assert_contents>
99 <has_text text="CCDS10397" />
100 <has_text text=".0000000000001" />
101 <not_has_text text="1e-13" />
102 </assert_contents>
103 </output>
74 </test> 104 </test>
75 </tests> 105 </tests>
76 <help> 106 <help>
77 107
78 .. class:: infomark 108 .. class:: infomark