Mercurial > repos > devteam > column_maker
comparison column_maker.xml @ 5:9cd341095afd draft
"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/column_maker commit a993d43d9d1702a6cf584683cf72527a3f999236"
| author | devteam |
|---|---|
| date | Wed, 30 Dec 2020 00:50:15 +0000 |
| parents | 6e8d94597139 |
| children | 13b6f0007d9e |
comparison
equal
deleted
inserted
replaced
| 4:6e8d94597139 | 5:9cd341095afd |
|---|---|
| 1 <tool id="Add_a_column1" name="Compute" version="1.3.1"> | 1 <tool id="Add_a_column1" name="Compute" version="1.4"> |
| 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="3.8">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 <requirement type="package" version="1.19.1">numpy</requirement> |
| 7 </requirements> | 7 </requirements> |
| 8 <command detect_errors="aggressive"><![CDATA[ | 8 <command detect_errors="aggressive"><![CDATA[ |
| 9 #if $header_lines_conditional.header_lines_select == "yes": | 9 #if $header_lines_conditional.header_lines_select == "yes": |
| 10 (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 && |
| 11 sed '1,1d' '$input' > data && | 11 sed '1,1d' '$input' > data && |
| 12 #else: | 12 #else: |
| 13 touch header && | 13 touch header && |
| 14 ln -s '$input' data && | 14 ln -s '$input' data && |
| 15 #end if | 15 #end if |
| 16 | 16 |
| 17 ## inject colums and column_types metadata into inputs json | |
| 18 #import json | |
| 19 #set inputs_dict = json.load(open($inputs)) | |
| 20 #set inputs_dict['columns'] = $input.metadata.columns | |
| 21 #set inputs_dict['column_types'] = $input.metadata.column_types | |
| 22 #set x = json.dump($inputs_dict, open($inputs, 'w')) | |
| 23 | |
| 17 python '$__tool_directory__/column_maker.py' | 24 python '$__tool_directory__/column_maker.py' |
| 18 data column_maker_output | 25 data column_maker_output |
| 19 "$cond" | 26 --load_json '$inputs' |
| 20 $round | 27 && cat header column_maker_output > '$out_file1' |
| 21 ${input.metadata.columns} | |
| 22 "${input.metadata.column_types}" | |
| 23 $avoid_scientific_notation && | |
| 24 cat header column_maker_output > '$out_file1' | |
| 25 ]]></command> | 28 ]]></command> |
| 29 <configfiles> | |
| 30 <inputs name="inputs"/> | |
| 31 </configfiles> | |
| 26 <inputs> | 32 <inputs> |
| 27 <param name="cond" type="text" value="c3-c2" label="Add expression"/> | 33 <param name="cond" type="text" value="c3-c2" label="Add expression"/> |
| 28 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> | 34 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> |
| 29 <param name="round" type="select" label="Round result?"> | 35 <param name="round" type="select" label="Round result?"> |
| 30 <option value="no">NO</option> | 36 <option value="no">NO</option> |
