# HG changeset patch # User iuc # Date 1620226958 0 # Node ID d7c7ee140920e0ce306ce1cb18eb3e73843cb26a "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/calculate_numeric_param commit b8635afd6cef6704f21f08caf4ffa89e672a96f8" diff -r 000000000000 -r d7c7ee140920 calculate_numeric_param.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calculate_numeric_param.xml Wed May 05 15:02:38 2021 +0000 @@ -0,0 +1,134 @@ + + from parameters + +{ + let s = ""; + for (const repeat of $job.components) { + s += repeat.param_type.component_value + s += repeat.arith + if (repeat.arith == "") { + break; + } + }; + let e; + if ($job.output_type == "integer") { + e = parseInt(eval(s)); + } else { + e = eval(s); + } + return {'output': e}; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + output_type == 'float' + + + output_type == 'integer' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +