quick questions

David Mathog mathog at mendel.bio.caltech.edu
Thu Dec 13 19:01:43 UTC 2001


Hmm, after going up and down through the ACD notation I can't find
what I'm looking for there either.  Consider this notation:

bool: usermspA [ 
  opt: Y
  def: N
  info: "False: esim4 calculates mspA, True: mspA from command line."
]

int: mspA [ 
  opt: $(usermspA)
  req: $(usermspA)
  def: 16
  info: "long description. default of 16 is not used unless usermspA is
specified.."
]

If the command is issued with -usermspA then it will prompt for -mspA if
it
wasn't also specified, which gives the desired results. However, if the
command 
has only this on the command line.

  -mspA=16

it clearly means that the user really wants to use the value of 16 for
the parameter.
How then to switch the state on -usermspA automatically, or failing
that, prompt for
-usermspA?  16 happens to be the default value.  It wasn't set to an
illegal (magic) value because we don't want -1000000 showing up in a
GUI.  But it isn't normally used
because -usermspA will be false.  As before, we could use a sort of
magic number and do:

bool: usermspA [ 
  opt: Y
  def: @($(mspa)!=16)
  info: "False: esim4 calculates mspA, True: mspA from command line."
]

and it will correctly flip the bit when the user specifies it - except
when by bad luck
they choose to specify the default value.  And round and round the logic
goes.  I don't suppose that there is a ".specified" or ".online"
attribute in ACD?  Ie, this would do the job:

bool: usermspA [ 
  opt: Y
  def: $(mspa.online)
  info: "False: esim4 calculates mspA, True: mspA from command line."
]

The desired GUI interaction in that case could be one of:

1.  changing value in mspA toggles state of usermspA (messy)
2.  -mspA slot is grayed out unless -usermspA is set (simpler)

In some interfaces this could be covered over with Javascript - but the
command line
variant still wouldn't work exactly right.  

Or am I missing something?


Summary:

works:  command 
works:  command -usermspA -mspA 16
works (prompts for mspA):  command -usermspA
fails to prompt or override usermspA:    command -mspA 16

Thanks,

David Mathog
mathog at caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech




More information about the EMBOSS mailing list