comparison table_pandas_transform.xml @ 0:b722dba91064 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
author recetox
date Wed, 29 Jan 2025 15:35:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b722dba91064
1 <tool id="table_pandas_transform" name="table column transformations" version="@PANDAS_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>apply transformations on multiple columns</description>
3 <macros>
4 <import>macros.xml</import>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <requirements>
8 <expand macro="requirement_pandas_pyarrow"/>
9 </requirements>
10 <required_files>
11 <include path="table_pandas_transform.py" />
12 <include path="utils.py" />
13 </required_files>
14 <expand macro="creator" />
15 <command detect_errors="exit_code"><![CDATA[
16 python3 '$__tool_directory__/table_pandas_transform.py'
17 --input_dataset '$input_dataset' '$input_dataset.ext'
18 --columns '$columns'
19 --transformation '$transformation'
20 --output_dataset '$output_dataset' '$output_dataset.ext'
21 ]]></command>
22 <inputs>
23 <param name="input_dataset" type="data" format="csv,tsv,tabular,parquet" label="Input Dataset"/>
24 <param name="columns" type="data_column" data_ref="input_dataset" use_header_names="true" multiple="true" label="Column" help="Column from the dataset to perform the computation on."/>
25 <param name="transformation" type="select" label="Transformation">
26 <option value="log2">Log2</option>
27 <option value="log10">Log10</option>
28 <option value="ln">Ln</option>
29 <option value="sqrt">Sqrt</option>
30 <option value="exp">Exp</option>
31 <option value="abs">Abs</option>
32 <option value="floor">Floor</option>
33 <option value="ceil">Ceil</option>
34 </param>
35 </inputs>
36 <outputs>
37 <data name="output_dataset" format_source="input_dataset" label="${transformation} transform on ${on_string}">
38 <change_format>
39 <when input="input_dataset.ext" value="tsv" format="tabular" />
40 </change_format>
41 </data>
42 </outputs>
43 <tests>
44 <test expect_num_outputs="1">
45 <param name="input_dataset" value="query.tabular" ftype="tabular"/>
46 <param name="columns" value="1,3"/>
47 <param name="transformation" value="ln"/>
48 <output name="output_dataset" file="transform/query_log.tabular" ftype="tabular"/>
49 </test>
50 </tests>
51 <help><![CDATA[
52 This tool applies mathematical transformations to specified columns in a dataframe.
53
54 Inputs
55 ------
56
57 - **Input Dataset**: The input dataset in CSV, TSV, tabular, or Parquet format.
58 - **Columns to Transform**: Select one or more columns from the dataset to transform. You can select columns by their header names.
59 - **Transformation**: The mathematical transformation to apply to the selected columns. Choose from log, log10, ln, sqrt, exp, abs, floor, or ceil.
60
61 Outputs
62 -------
63
64 - **Output Dataset**: The output dataset with the transformed columns.
65 ]]></help>
66 <citations>
67 <citation type="doi">10.5281/zenodo.3509134</citation>
68 <citation type="doi">10.25080/Majora-92bf1922-00a</citation>
69 </citations>
70 </tool>