Mercurial > repos > devteam > column_maker
comparison column_maker.xml @ 8:02026300aa45 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/column_maker commit 276e05a2c72c031318eef8c57deebbbde822b538"
| author | iuc |
|---|---|
| date | Tue, 09 Mar 2021 18:33:10 +0000 |
| parents | 427903d47026 |
| children | 6595517c2dd8 |
comparison
equal
deleted
inserted
replaced
| 7:427903d47026 | 8:02026300aa45 |
|---|---|
| 3 <requirements> | 3 <requirements> |
| 4 <requirement type="package" version="3.8">python</requirement> | 4 <requirement type="package" version="3.8">python</requirement> |
| 5 <requirement type="package" version="1.19.1">numpy</requirement> | 5 <requirement type="package" version="1.19.1">numpy</requirement> |
| 6 </requirements> | 6 </requirements> |
| 7 <command detect_errors="aggressive"><![CDATA[ | 7 <command detect_errors="aggressive"><![CDATA[ |
| 8 ln -s '$input' data && | 8 ## inject colums and column_types metadata into inputs json |
| 9 #import json | |
| 10 #set inputs_dict = json.load(open($inputs)) | |
| 11 #set inputs_dict['columns'] = $input.metadata.columns | |
| 12 #set inputs_dict['column_types'] = $input.metadata.column_types | |
| 13 ## flatten conditional | |
| 14 #if $header_lines_conditional.header_lines_select == "yes": | |
| 15 #set inputs_dict['header_new_column_name'] = str($header_lines_conditional.header_new_column_name) | |
| 16 #end if | |
| 17 #set x = json.dump($inputs_dict, open($inputs, 'w')) | |
| 9 | 18 |
| 10 ## inject colums and column_types metadata into inputs json | 19 python '$__tool_directory__/column_maker.py' |
| 11 #import json | 20 '$input' |
| 12 #set inputs_dict = json.load(open($inputs)) | 21 '$out_file1' |
| 13 #set inputs_dict['columns'] = $input.metadata.columns | 22 --load_json '$inputs' |
| 14 #set inputs_dict['column_types'] = $input.metadata.column_types | |
| 15 ## flatten conditional | |
| 16 #if $header_lines_conditional.header_lines_select == "yes": | |
| 17 #set inputs_dict['header_new_column_name'] = str($header_lines_conditional.header_new_column_name) | |
| 18 #end if | |
| 19 #set x = json.dump($inputs_dict, open($inputs, 'w')) | |
| 20 | |
| 21 python '$__tool_directory__/column_maker.py' | |
| 22 data '$out_file1' | |
| 23 --load_json '$inputs' | |
| 24 ]]></command> | 23 ]]></command> |
| 25 <configfiles> | 24 <configfiles> |
| 26 <inputs name="inputs"/> | 25 <inputs name="inputs"/> |
| 27 </configfiles> | 26 </configfiles> |
| 28 <inputs> | 27 <inputs> |
| 34 <add value=""" /> | 33 <add value=""" /> |
| 35 <add value="'" /> | 34 <add value="'" /> |
| 36 </valid> | 35 </valid> |
| 37 </sanitizer> | 36 </sanitizer> |
| 38 </param> | 37 </param> |
| 39 <param format="tabular" name="input" type="data" label="as a new column to" help="Dataset missing? See TIP below"/> | 38 <param name="input" type="data" format="tabular" label="as a new column to" help="Dataset missing? See TIP below"/> |
| 40 <param name="round" type="boolean" truevalue="yes" falsevalue="no" label="Round result?" /> | 39 <param name="round" type="boolean" truevalue="yes" falsevalue="no" label="Round result?" /> |
| 41 <param name="avoid_scientific_notation" type="boolean" truevalue="yes" falsevalue="no" | 40 <param name="avoid_scientific_notation" type="boolean" truevalue="yes" falsevalue="no" |
| 42 label="Avoid scientific notation" | 41 label="Avoid scientific notation" |
| 43 help="If yes, use fully expanded decimal representation when writing new columns (use only if expression produces decimal numbers)." /> | 42 help="If yes, use fully expanded decimal representation when writing new columns (use only if expression produces decimal numbers)." /> |
| 44 <conditional name="header_lines_conditional"> | 43 <conditional name="header_lines_conditional"> |
| 45 <param name="header_lines_select" type="select" | 44 <param name="header_lines_select" type="select" |
| 46 label="Input has a header line with column names?" | 45 label="Input has a header line with column names?" |
| 47 help="Select Yes to be able to specify a name for the new column and have it added to the header line. If you select No, the first line will be treated as a regular line: If it is empty or starts with a # character it will be skipped, otherwise the tool will attempt to compute the specified expression on it." > | 46 help="Select Yes to be able to specify a name for the new column and have it added to the header line. If you select No, the first line will be treated as a regular line: If it is empty or starts with a # character it will be skipped, otherwise the tool will attempt to compute the specified expression on it." > |
| 48 <option value="no" >No</option> | 47 <option value="no">No</option> |
| 49 <option value="yes" >Yes</option> | 48 <option value="yes">Yes</option> |
| 50 </param> | 49 </param> |
| 51 <when value="no"> | 50 <when value="no" /> |
| 52 </when> | |
| 53 <when value="yes"> | 51 <when value="yes"> |
| 54 <param name="header_new_column_name" type="text" value="New Column" label="The new column name" /> | 52 <param name="header_new_column_name" type="text" value="New Column" label="The new column name" /> |
| 55 </when> | 53 </when> |
| 56 </conditional> | 54 </conditional> |
| 57 </inputs> | 55 </inputs> |
| 58 <outputs> | 56 <outputs> |
| 59 <data format_source="input" name="out_file1" metadata_source="input"/> | 57 <data name="out_file1" format_source="input" metadata_source="input"/> |
| 60 </outputs> | 58 </outputs> |
| 61 <tests> | 59 <tests> |
| 62 <test> | 60 <test> |
| 63 <param name="cond" value="c3-c2"/> | 61 <param name="cond" value="c3-c2"/> |
| 64 <param name="input" value="1.bed"/> | 62 <param name="input" value="1.bed"/> |
| 118 </assert_contents> | 116 </assert_contents> |
| 119 </output> | 117 </output> |
| 120 </test> | 118 </test> |
| 121 </tests> | 119 </tests> |
| 122 <help><