Mercurial > repos > recetox > table_scipy_interpolate
annotate table_pandas_arithmetics.py @ 1:ac42a5982210 draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit af4bb1b40252cbb8f91cd1008a4aa5052e19f919
| author | recetox | 
|---|---|
| date | Thu, 14 Aug 2025 15:14:32 +0000 | 
| parents | 0112f08c95ed | 
| children | 
| rev | line source | 
|---|---|
| 0 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 1 import argparse | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 2 import logging | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 3 from typing import List, Tuple | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 4 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 5 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 6 import numpy as np | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 7 import pandas as pd | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 8 from utils import LoadDataAction, SplitColumnIndicesAction, StoreOutputAction | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 9 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 10 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 11 # Constants for operations | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 12 OPERATIONS = { | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 13 "mul": np.multiply, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 14 "sub": np.subtract, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 15 "div": np.divide, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 16 "add": np.add, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 17 "pow": np.power, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 18 } | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 19 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 20 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 21 def perform_operation(df: pd.DataFrame, column_indices: List[int], operation: str, operand: float): | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 22 """ | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 23 Perform the specified arithmetic operation on the given columns of the dataframe. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 24 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 25 Parameters: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 26 df (pd.DataFrame): The input dataframe. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 27 column_indices (list): The 0-based indices of the columns to perform the operation on. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 28 operation (str): The arithmetic operation to perform. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 29 operand (float): The operand for the arithmetic operation. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 30 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 31 Returns: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 32 pd.DataFrame: The dataframe with the operation applied. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 33 """ | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 34 for column_index in column_indices: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 35 column_name = df.columns[column_index] | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 36 df[column_name] = OPERATIONS[operation](df[column_name], operand) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 37 return df | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 38 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 39 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 40 def main(input_dataset: pd.DataFrame, column_indices: List[int], operation: str, operand: float, output_dataset: Tuple[callable, str]): | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 41 """ | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 42 Main function to load the dataset, perform the operation, and save the result. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 43 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 44 Parameters: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 45 input_dataset (tuple): The input dataset and its file extension. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 46 column_indices (list): The 0-based indices of the columns to perform the operation on. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 47 operation (str): The arithmetic operation to perform. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 48 operand (float): The operand for the arithmetic operation. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 49 output_dataset (tuple): The output dataset and its file extension. | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 50 """ | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 51 try: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 52 df = perform_operation(input_dataset, column_indices, operation, operand) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 53 write_func, file_path = output_dataset | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 54 write_func(df, file_path) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 55 except Exception as e: | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 56 logging.error(f"Error in main function: {e}") | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 57 raise | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 58 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 59 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 60 if __name__ == "__main__": | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 61 logging.basicConfig(level=logging.INFO) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 62 parser = argparse.ArgumentParser( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 63 description="Perform arithmetic operations on dataframe columns." | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 64 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 65 parser.add_argument( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 66 "--input_dataset", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 67 nargs=2, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 68 action=LoadDataAction, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 69 required=True, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 70 help="Path to the input dataset and its file extension (csv, tsv, parquet)", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 71 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 72 parser.add_argument( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 73 "--columns", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 74 action=SplitColumnIndicesAction, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 75 required=True, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 76 help="Comma-separated list of 1-based indices of the columns to perform the operation on", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 77 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 78 parser.add_argument( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 79 "--operation", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 80 type=str, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 81 choices=OPERATIONS.keys(), | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 82 required=True, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 83 help="Arithmetic operation to perform", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 84 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 85 parser.add_argument( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 86 "--operand", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 87 type=float, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 88 required=True, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 89 help="Operand for the arithmetic operation", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 90 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 91 parser.add_argument( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 92 "--output_dataset", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 93 nargs=2, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 94 action=StoreOutputAction, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 95 required=True, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 96 help="Path to the output dataset and its file extension (csv, tsv, parquet)", | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 97 ) | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 98 | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 99 args = parser.parse_args() | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 100 main( | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 101 args.input_dataset, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 102 args.columns, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 103 args.operation, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 104 args.operand, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 105 args.output_dataset, | 
| 
0112f08c95ed
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/tables commit d0ff40eb2b536fec6c973c3a9ea8e7f31cd9a0d6
 recetox parents: diff
changeset | 106 ) | 
