required vs optional
Peter.Rice at uk.lionbioscience.com
Wed Feb 7 15:32:40 UTC 2001
>I'm confused about the precise use for the required and optional
It is all very simple. Honest. Only the expressions make it complicated.
By default, everything is "advanced" (i.e. never prompted for).
If you say "req: Y" then it means required, and will be prompted.
If you say "param: Y" this also means required, and will be prompted.
Incidentally, as "req: N" is the default it is not needed in shuffleseq.acd
If you say "opt: Y" then it means optional, and is only prompted for when
you run with -options on the command line (or EMBOSS_OPTIONS defined as true)
If you want to make life complicated, you can say "req: <expression>" and work
out at run time whether it is required or not. These are the cases that cause
you problems. If you can figure out the result, then fine. If not, you can
assume a true value or make up your own "may be needed, but I can't tell"
>I also do not understand the rules for working out which parameters are listed
>in the help as mandatory, optional, or advanced. The help for pepwheel
>indicates that -steps is optional and -wheel is advanced, which isn't too
>sensible. I assume this information is derived from the use of opt, and req.
The help has the same problem you do. Only worse - it has to guess what would
happen with any expression. At least you get to see the user input :-)
>Anyway, ideally I'd like a needed paramater so that I can distinguish between
>options which have no use (eg "steps" in pepwheel after "wheel" is set to 0)
>and options that have a use but a simply optional. The required setting seems
>redundant, and could be a source of error (what does req:Y opt:Y mean, or
In pepwheel.acd, plotting the wheel is 'advanced' (req: N) so users can only
turn off the plot from the command line. The step increment is optional so
users can try running "pepwheel -options" and be prompted for the step. Yes,
we could turn it off if there is no plot, but the program does not mind and it
would make life even more difficult for interface developers if we had too
many expressions. The obvious solution would be to say "opt: $(wheel)" in
I would guess leaving it as it currently stands is 'best'. Who knows, one day
the program might calculate something that needs the step value, without
displaying the plot :-)
Of course, you are free to play with the settings to find a way that makes
sense for your graphical interface. Most variations would make sense to the
program (just try it from the command line to check what happens).
Hope this helps,
Peter Rice, LION Bioscience Ltd, Cambridge, UK
peter.rice at uk.lionbioscience.com +44 1223 224723
More information about the emboss-dev