Mercurial > repos > iuc > ampvis2_setmetadata
comparison setmetadata.xml @ 0:7499e3a586c0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
author | iuc |
---|---|
date | Mon, 04 Apr 2022 10:30:36 +0000 |
parents | |
children | 20a46ce12854 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7499e3a586c0 |
---|---|
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_datetime(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> | |
31 <expand macro="metadata_select" an="name" argument="numbers" multiple="true" label="Numerical metadata variables"> | |
32 <filter type="param_value" column="0" ref="character" keep="false"/> | |
33 </expand> | |
34 <expand macro="metadata_select" an="name" argument="integers" multiple="true" label="Discrete numerical metadata variables (integers)"> | |
35 <filter type="param_value" column="0" ref="character" keep="false"/> | |
36 <filter type="param_value" column="0" ref="numbers" keep="false"/> | |
37 </expand> | |
38 <expand macro="metadata_select" an="name" argument="dates" multiple="true" label="Date metadata variables"> | |
39 <filter type="param_value" column="0" ref="character" keep="false"/> | |
40 <filter type="param_value" column="0" ref="numbers" keep="false"/> | |
41 <filter type="param_value" column="0" ref="integers" keep="false"/> | |
42 </expand> | |
43 </inputs> | |
44 <outputs> | |
45 <data name="ampvis" format="ampvis2"/> | |
46 <data name="metadata_list_out" format="tabular" label="${tool.name} on ${on_string}: metadata list"/> | |
47 </outputs> | |
48 <tests> | |
49 <!-- --> | |
50 <test expect_num_outputs="2"> | |
51 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> | |
52 <param name="metadata_list" value="AalborgWWTPs-metadata.list"/> | |
53 <param name="numbers" value="Year"/> | |
54 <param name="dates" value="Date"/> | |
55 <output name="ampvis" ftype="ampvis2"> | |
56 <assert_contents> | |
57 <has_size value="11966" delta="1000"/> | |
58 </assert_contents> | |
59 </output> | |
60 </test> | |
61 </tests> | |
62 <help><![CDATA[ | |
63 What it does | |
64 ============ | |
65 | |
66 Allows to manually set the data types of metadata. `ampvis2: load` tries to | |
67 detect the metadata data types automatically. If this is not as desired | |
68 the data types can be set manually with this tool. | |
69 | |
70 Input | |
71 ===== | |
72 | |
73 @HELP_RDS_INPUT@ | |
74 | |
75 @HELP_METADATA_LIST_INPUT@ | |
76 | |
77 Output | |
78 ====== | |
79 | |
80 **RDS** | |
81 | |
82 The main output of the tool is an RDS data set that contains the R representation of | |
83 the ampvis2 object containing the same data as the input, but with data types changes | |
84 as chosen in the input form. | |
85 | |
86 **Metadata list file** | |
87 | |
88 Updated metadata (only column 4 should change and reflect the desired datatype changes). | |
89 ]]></help> | |
90 <expand macro="citations"/> | |
91 </tool> |