[EMBnet ADMIN] required vs optional

David Martin david.martin at biotek.uio.no
Wed Feb 7 15:41:28 UTC 2001


On Wed, 7 Feb 2001, James Bonfield wrote:

> 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.


Unless I am mistaken parameters are defined inthe following way:

req: Y - a required parameter
opt: y - an optional parameter
everything else : an advanced parameter

I would expect the opt: N to be redundant. The reason one can set opt: N
or req: N is so that it can be implemented programatically (as your first
example shows.)


>
> syco.acd:
>
>  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
> wrong.

I would interpret this as being that shuffle is an advanced qualifier,
which is as EMBOSS appears to give it. It is not that it isn't required,
but that it is already set. It is probably needed but isn't required to be
prompted for.




>
> 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?

But the opt/req controlls which parameters are prompted for.. I suppose it
should really be dependent so it is not prompted if -nowheel is set on the
comamnd line.

>
> 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.

yup. if req is Y then it is in mandatory, opt is Y then it is in optional,
neither then it is in advanced. What it does if both are set is a mystery,
probably throws an error.

>
> 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?).

Can both be defined in a valid ACD file?


On a sideways but related note, is it possible to configure the windows
versions of SIP/NIP to import sequences from an external program? this
would be very nice. I am thinking of a  java thinghy with a gui to
cover seqret/entret/showdb from a remote EMBOSS machine.

..d

---------------------------------------------------------------------
*  Dr. David Martin                  Biotechnology Centre of Oslo   *
*  Node Manager                      Gaustadalleen 21               *
*  The Norwegian EMBNet Node         P.O. box 1125 Blindern         *
*  tel +47 22 84 05 35               N-0317 Oslo                    *
*  fax +47 22 84 05 01               Norway                         *
---------------------------------------------------------------------
I will be leaving the Norwegian EMBnet node on 23rd February.
All work related mail should be addressed to admin at embnet.uio.no where
my successor, Rune Groven will deal with it.
All personal email should be sent to dmartin at hgmp.mrc.ac.uk from whence
it will be automatically forwarded to me.
Spam should continue to be sent to /dev/null








More information about the emboss-dev mailing list