Code Bust - SBOL Leng Attribute

 
  • OK I'm stumped.

    I am trying to capture the length attribute for the SBOL element and it is not happening.

    In fact, I can't Q LENG without getting an error.

    It does work if I Q VAR !!CE.leng.

    Relevant code portion:

    var !Sbols collect all (SBOL) for CE                     -- Works ok

    var !lengs evaluate (Length) for all from !Sbols     -- I get an error

    Does anyone have a clue on what code to use?

    RocketMan
  • The Length attribute of the SBOL element has problem with syntax clash.

    If we use "Q LENGTH" command, we will get a syntax error, and "Q LENGTH $Q" replies it need "(" next to the command.
    This means that "LENGTH" will be recognized as "LENGTH()" function, not "LENGTH" attribute of SBOL.

    All PDMS attributes and commands/functions name are unique, but this is an exception.
    This is only one command/attribute name clash I know.  


    To prevent this conflict, we can use "ATTRIBUTE" command with round brakets, like "Q (ATTRIB LENGTH)".

    Try the following style to prevent the problem,
    ----------------------------------
    var !a collect all sbol for ce
    var !b eval (attrib length) for all from !a
    ----------------------------------
  • Thanks!  I tried the new code and it worked fine.

    Great explanation, also.

    I appreciate the help.

    RocketMan