diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/table_pandas_transform.xml	Wed Jan 29 15:35:51 2025 +0000
@@ -0,0 +1,70 @@
+<tool id="table_pandas_transform" name="table column transformations" version="@PANDAS_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
+    <description>apply transformations on multiple columns</description>
+    <macros>
+        <import>macros.xml</import>
+        <token name="@VERSION_SUFFIX@">0</token>
+    </macros>
+    <requirements>
+        <expand macro="requirement_pandas_pyarrow"/>
+    </requirements>
+    <required_files>
+        <include path="table_pandas_transform.py" />
+        <include path="utils.py" />
+    </required_files>
+    <expand macro="creator" />
+    <command detect_errors="exit_code"><![CDATA[
+        python3 '$__tool_directory__/table_pandas_transform.py' 
+            --input_dataset '$input_dataset' '$input_dataset.ext' 
+            --columns '$columns' 
+            --transformation '$transformation' 
+            --output_dataset '$output_dataset' '$output_dataset.ext'
+    ]]></command>
+    <inputs>
+        <param name="input_dataset" type="data" format="csv,tsv,tabular,parquet" label="Input Dataset"/>
+        <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."/>
+        <param name="transformation" type="select" label="Transformation">
+            <option value="log2">Log2</option>
+            <option value="log10">Log10</option>
+            <option value="ln">Ln</option>
+            <option value="sqrt">Sqrt</option>
+            <option value="exp">Exp</option>
+            <option value="abs">Abs</option>
+            <option value="floor">Floor</option>
+            <option value="ceil">Ceil</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="output_dataset" format_source="input_dataset" label="${transformation} transform on ${on_string}">
+            <change_format>
+                <when input="input_dataset.ext" value="tsv" format="tabular" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_dataset" value="query.tabular" ftype="tabular"/>
+            <param name="columns" value="1,3"/>
+            <param name="transformation" value="ln"/>
+            <output name="output_dataset" file="transform/query_log.tabular" ftype="tabular"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+This tool applies mathematical transformations to specified columns in a dataframe.
+
+Inputs
+------
+
+- **Input Dataset**: The input dataset in CSV, TSV, tabular, or Parquet format.
+- **Columns to Transform**: Select one or more columns from the dataset to transform. You can select columns by their header names.
+- **Transformation**: The mathematical transformation to apply to the selected columns. Choose from log, log10, ln, sqrt, exp, abs, floor, or ceil.
+
+Outputs
+-------
+
+- **Output Dataset**: The output dataset with the transformed columns.
+    ]]></help>
+    <citations>
+        <citation type="doi">10.5281/zenodo.3509134</citation>
+        <citation type="doi">10.25080/Majora-92bf1922-00a</citation>
+    </citations>
+</tool>
\ No newline at end of file