comparison table_pandas_arithmetics.xml @ 0:e6d5fee8c7a6 draft

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
author recetox
date Wed, 29 Jan 2025 15:35:42 +0000
parents
children d4bacc06365e
comparison
equal deleted inserted replaced
-1:000000000000 0:e6d5fee8c7a6
1 <tool id="table_pandas_arithmetics" name="table arithmetics" version="@PANDAS_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>perform arithmetic operations on a dataframe column</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_arithmetics.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_arithmetics.py'
17 --input_dataset '$input_dataset' '$input_dataset.ext'
18 --column '$column'
19 --operation '$operation'
20 --operand '$operand'
21 --output_dataset '$output_dataset' '$output_dataset.ext'
22 ]]></command>
23 <inputs>
24 <param name="input_dataset" type="data" format="csv,tsv,tabular,parquet" label="Input Dataset" help="The input dataset in CSV, TSV, tabular, or Parquet format."/>
25 <param name="column" type="data_column" data_ref="input_dataset" use_header_names="true" label="Column" help="The column from the dataset to perform the arithmetic operation on."/>
26 <param name="operation" type="select" label="Arithmetic Operation" help="The arithmetic operation to perform on the selected column. Choose from Multiply, Subtract, Divide, Add, or Power.">
27 <option value="mul">Multiply</option>
28 <option value="sub">Subtract</option>
29 <option value="div">Divide</option>
30 <option value="add">Add</option>
31 <option value="pow">Power</option>
32 </param>
33 <param name="operand" type="float" label="Operand" help="The operand value to use in the arithmetic operation. This value will be applied to each element in the selected column."/>
34 </inputs>
35 <outputs>
36 <data name="output_dataset" format_source="input_dataset" label="${tool.name} on ${on_string}">
37 <change_format>
38 <when input="input_dataset.ext" value="tsv" format="tabular" />
39 </change_format>
40 </data>
41 </outputs>
42 <tests>
43 <test>
44 <param name="input_dataset" value="query.tabular" ftype="tabular"/>
45 <param name="column" value="3"/>
46 <param name="operation" value="div"/>
47 <param name="operand" value="100"/>
48 <output name="output_dataset" file="arithmetics/query_divide_ri.tabular" ftype="tabular"/>
49 </test>
50 </tests>
51 <help><![CDATA[
52 This tool performs arithmetic operations on a specified column of a dataframe.
53 Supported operations are: multiply, subtract, divide, add, and power.
54
55 Inputs
56 ------
57
58 - **Input Dataset**: The input dataset in CSV, TSV, tabular, or Parquet format.
59 - **Column**: The column from the dataset to perform the arithmetic operation on. Select the column by its header name.
60 - **Arithmetic Operation**: The arithmetic operation to perform on the selected column. Choose from Multiply, Subtract, Divide, Add, or Power.
61 - **Operand**: The operand value to use in the arithmetic operation. This value will be applied to each element in the selected column.
62
63 Outputs
64 -------
65
66 - **Output Dataset**: The output dataset with the arithmetic operation applied to the specified column.
67 ]]></help>
68 <citations>
69 <citation type="doi">10.5281/zenodo.3509134</citation>
70 <citation type="doi">10.25080/Majora-92bf1922-00a</citation>
71 </citations>
72 </tool>