# HG changeset patch # User iuc # Date 1699347762 0 # Node ID bf793b71559a97b4fe401baa214150c028eb701b planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/pick_value commit ef564483fa8dc267c599af8745aab4e03b0c57e0 diff -r 000000000000 -r bf793b71559a pick_value.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pick_value.xml Tue Nov 07 09:02:42 2023 +0000 @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + style_cond['type_cond']['param_type'] == 'text' + + + style_cond['type_cond']['param_type'] == 'integer' + + + style_cond['type_cond']['param_type'] == 'float' + + + style_cond['type_cond']['param_type'] == 'boolean' + + + style_cond['type_cond']['param_type'] == 'data' + + + +A "null" value is an empty value, it means some input wasn't specified or some tool produced +an empty value or was skipped entirely. This can be thought of as an NA in Excel or a None value +in Python. This expression tool can be fed multiple values - from parameter inputs or the +outputs or other tools or workflows - and pick one. This allows building workflows which can +skip steps and branch in complex ways. + +There are subtle but important distinctions between the selection style - though they all +essentially pick the first value that is non-null (i.e. the first input with a real value). + +- "Pick first value" is the default and will just return its own null value if none of the inputs +are non-null. +- "Pick first value (or provide default)" allows picking a default value that will be used if none of the +inputs are non-null. +- "Pick first value (or fail)" will cause the tool execution to fail if none of the selections are +non-null. This can be important because it provides a clearer indication that something went +wrong and can prevent the further evaluation of a workflow. +- "Pick only value" is like "First value (or fail)" in that it will cause an error if none of the +inputs are non-null but it will go further to ensure that exactly one value is non-null. When +building conditonal paths through a workflow this can ensure that at most one path is +taken. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r bf793b71559a test-data/simple_line.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/simple_line.txt Tue Nov 07 09:02:42 2023 +0000 @@ -0,0 +1,1 @@ +This is a line of text. diff -r 000000000000 -r bf793b71559a test-data/simple_line_alternative.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/simple_line_alternative.txt Tue Nov 07 09:02:42 2023 +0000 @@ -0,0 +1,1 @@ +This is a different line of text.