Mercurial > repos > mvdbeek > add_input_name_as_column
comparison add_input_name_as_column.xml @ 1:07d2cbf43b51 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/add_input_name_as_column commit db90fc6943b99322a6d7459f644a6624c69a0be5-dirty
author | mvdbeek |
---|---|
date | Wed, 06 Mar 2019 09:15:49 -0500 |
parents | bfebefdd5ba4 |
children | ea4ad41e01fc |
comparison
equal
deleted
inserted
replaced
0:bfebefdd5ba4 | 1:07d2cbf43b51 |
---|---|
1 <tool id="addName" name="Add input name as column" version="0.1"> | 1 <tool id="addName" name="Add input name as column" version="0.1.2" profile="17.09"> |
2 <description>to an existing tabular file</description> | 2 <description>to an existing tabular file</description> |
3 <command interpreter="python">add_input_name_as_column.py | 3 <requirements> |
4 --input "$input" | 4 <requirement type="package" version="3.7">python</requirement> |
5 --label "$input.name" | 5 </requirements> |
6 --output "$output" | 6 <command><![CDATA[ |
7 #if $header.contains_header=="yes": | 7 python '$__tool_directory__/'add_input_name_as_column.py |
8 --header "$header.colname" | 8 --input '$input' |
9 #end if | 9 --label '$input.element_identifier' |
10 </command> | 10 --output '$output' |
11 #if $header.contains_header=="yes": | |
12 --header "$header.colname" | |
13 #end if | |
14 ]]></command> | |
11 <inputs> | 15 <inputs> |
12 <param format="tabular" name="input" type="data" label="to Dataset" help="Dataset missing? See TIP below" /> | 16 <param format="txt" name="input" type="data" label="to Dataset" help="Dataset missing? See TIP below" /> |
13 <conditional name="header"> | 17 <conditional name="header"> |
14 <param name="contains_header" type="select" label="input contains a header line?" > | 18 <param name="contains_header" type="select" label="input contains a header line?" > |
15 <option value="yes" selected="true">Yes</option> | 19 <option value="yes" selected="true">Yes</option> |
16 <option value="no">No</option> | 20 <option value="no">No</option> |
17 </param> | 21 </param> |
18 <when value="yes"> | 22 <when value="yes"> |
19 <param name="colname" type="text" value="sample" help="select a column header to be added in the first line"> | 23 <param name="colname" type="text" value="sample" help="select a column header to be added in the first line"> |
20 <validator type="empty_field" message="please add a column header"/> | 24 <validator type="empty_field" message="please add a column header"/> |
21 </param> | 25 </param> |
22 </when> | 26 </when> |
23 <when value="no"> | 27 <when value="no"> |
24 </when> | 28 </when> |
25 </conditional> | 29 </conditional> |
26 </inputs> | 30 </inputs> |
27 <outputs> | 31 <outputs> |
28 <data name="output" format="tabular" /> | 32 <data name="output" format="tabular" /> |
49 ----- | 53 ----- |
50 | 54 |
51 **What it does** | 55 **What it does** |
52 | 56 |
53 Adds a new column with the name of the input file as it appears in the history. | 57 Adds a new column with the name of the input file as it appears in the history. |
54 Written by Marius van den Beek, m.vandenbeek at gmail . com | 58 Written by Marius van den Beek, m.vandenbeek at gmail dot com |
55 </help> | 59 </help> |
56 </tool> | 60 </tool> |
57 | 61 |