Mercurial > repos > iuc > ampvis2_setmetadata
comparison setmetadata.xml @ 0:e4e8e349c2c0 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 9ed0c3078be166bd22136771f517ae91a5198ecf
| author | iuc |
|---|---|
| date | Fri, 16 Aug 2024 08:55:07 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e4e8e349c2c0 |
|---|---|
| 1 <tool id="ampvis2_setmetadata" name="ampvis2 set metadata" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> | |
| 2 <description>types</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="header"/> | |
| 7 <command detect_errors="exit_code"><![CDATA[ | |
| 8 Rscript '$rscript' | |
| 9 ]]></command> | |
| 10 <configfiles> | |
| 11 <configfile name="rscript"><![CDATA[ | |
| 12 library(lubridate, quietly = TRUE) | |
| 13 data <- readRDS("$data") | |
| 14 #for col in $numbers | |
| 15 data\$metadata\$$col <- as.numeric(data\$metadata\$$col) | |
| 16 #end for | |
| 17 #for col in $integers | |
| 18 data\$metadata\$$col <- as.integer(data\$metadata\$$col) | |
| 19 #end for | |
| 20 #for col in $dates | |
| 21 data\$metadata\$$col <- as_date(data\$metadata\$$col) | |
| 22 #end for | |
| 23 saveRDS(data, "$ampvis") | |
| 24 @SAVE_METADATA_LIST@ | |
| 25 ]]></configfile> | |
| 26 </configfiles> | |
| 27 <inputs> | |
| 28 <expand macro="rds_metadata_input_macro" metadata_optional="false"/> | |
| 29 <expand macro="metadata_select" an="name" argument="character" multiple="true" label="Character metadata variables"/> | |
| 30 <expand macro="metadata_select" an="name" argument="numbers" multiple="true" label="Numerical metadata variables"> | |
| 31 <token name="options"> | |
| 32 <filter type="param_value" column="0" ref="character" keep="false"/> | |
| 33 </token> | |
| 34 </expand> | |
| 35 <expand macro="metadata_select" an="name" argument="integers" multiple="true" label="Discrete numerical metadata variables (integers)"> | |
| 36 <token name="options"> | |
| 37 <filter type="param_value" column="0" ref="character" keep="false"/> | |
| 38 <filter type="param_value" column="0" ref="numbers" keep="false"/> | |
| 39 </token> | |
| 40 </expand> | |
| 41 <expand macro="metadata_select" an="name" argument="dates" multiple="true" label="Date metadata variables"> | |
| 42 <token name="options"> | |
| 43 <filter type="param_value" column="0" ref="character" keep="false"/> | |
| 44 <filter type="param_value" column="0" ref="numbers" keep="false"/> | |
| 45 <filter type="param_value" column="0" ref="integers" keep="false"/> | |
| 46 </token> | |
| 47 </expand> | |
| 48 </inputs> | |
| 49 <outputs> | |
| 50 <data name="ampvis" format="ampvis2"/> | |
| 51 <data name="metadata_list_out" format="tabular" label="${tool.name} on ${on_string}: metadata list"/> | |
| 52 </outputs> | |
| 53 <tests> | |
| 54 <!-- --> | |
| 55 <test expect_num_outputs="2"> | |
| 56 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> | |
| 57 <param name="metadata_list" value="AalborgWWTPs-metadata.list"/> | |
| 58 <param name="numbers" value="Year"/> | |
| 59 <param name="dates" value="Date"/> | |
| 60 <output name="ampvis" ftype="ampvis2"> | |
| 61 <assert_contents> | |
| 62 <has_size value="11966" delta="1000"/> | |
| 63 </assert_contents> | |
| 64 </output> | |
| 65 </test> | |
| 66 </tests> | |
| 67 <help><![CDATA[ | |
| 68 What it does | |
| 69 ============ | |
| 70 | |
| 71 Allows to manually set the data types of metadata. `ampvis2: load` tries to | |
| 72 detect the metadata data types automatically. If this is not as desired | |
| 73 the data types can be set manually with this tool. | |
| 74 | |
| 75 Input | |
| 76 ===== | |
| 77 | |
| 78 @HELP_RDS_INPUT@ | |
| 79 | |
| 80 @HELP_METADATA_LIST_INPUT@ | |
| 81 | |
| 82 Output | |
| 83 ====== | |
| 84 | |
| 85 **RDS** | |
| 86 | |
| 87 The main output of the tool is an RDS data set that contains the R representation of | |
| 88 the ampvis2 object containing the same data as the input, but with data types changes | |
| 89 as chosen in the input form. | |
| 90 | |
| 91 **Metadata list file** | |
| 92 | |
| 93 Updated metadata (only column 4 should change and reflect the desired datatype changes). | |
| 94 ]]></help> | |
| 95 <expand macro="citations"/> | |
| 96 </tool> |
