required vs optional

James Bonfield jkb at
Wed Feb 7 15:13:29 UTC 2001

Hello all,

I'm confused about the precise use for the required and optional
parameters. The observed usage varies and seems to disagree with the
documentation. Some examples help, but I should warn you that I'm still using
emboss 1.5.5 so things may have changed.


 bool: plot [ opt: N info: "Produce plot" ] 
 xygraph: graph [ req: $(plot) multi: 3 ] 
 outfile: outfile [ req: @(!$(plot)) ] 

Here plot is a boolean. If "Produce plot" is answered as yes then the xygraph
type is a suitable question (althouugh whether or not it's asked for is
another matter) and the outfile is redundant. The produce plot is answered as
no then vice versa is true. It's clear to see how this is implemented via the
"req: $(plot)" code. In the graphical interface, where all command options are 
displayed simultaneously, this produces code which automatically "greys-out"
arguments that are superfluous.

However if we look at shuffleseq.acd

  int: shuffle [ req: N def: 1 info: "Number of shuffles" ] 

Here this is implying that 'shuffle' is never required. So required is both
indicating parameters which are merely optional and parameters which are not
needed. In my current GUI this causes shuffle to be permanently greyed-out,
which is obviously incorrect. As a hack I can ignore fixed "req:N" statements
and only grey-out when the value of req: is an expression, but that's also

Even more confusing is pepwheel.acd:

  bool: wheel [ 
        def: Y
        info: "Plot the wheel"

  int: steps [
        opt: Y
        min: 2
        max: 100
        def: 18
        info: "Number of steps"
        help: "The number of residues plotted per turn is this value
divided by the 'turns' value."

steps is listed using "opt" and not "req". It also has no dependency on wheel, 
which doesn't make sense. Wheel mentions neither optional or required settings 
- what are the default values for these?

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.

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
req:N opt:N?).

Any suggestions?


James Bonfield (jkb at   Tel: 01223 402499   Fax: 01223 213556
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Also see Staden Package WWW site at

More information about the emboss-dev mailing list