BioLegato - Menu Format first proposals
From Bioinformatics.Org Wiki
Click here to go back to: BioLegato
Contents |
New syntax proposals #1 (PCD – Pythonesque Command Definition):
Similar to: Python's and CSV's tab structure
Menu: Menu Item: %Variable: field1: value field2: value field3: value on the same line #Button: field: value Menu Item 2:
Practical example
DNA/RNA: Numseq: %START type: int min: 0 max: @sequence.length@ %END type: int min: 0 max: @sequence.length@ %IN: type: sequencefile source: canvas #Run: command: numseq %START% %END% < %IN%
Advantages:
- It is similar to Python syntax, therefore it includes all of the same advantages
- It is easy to see how things are associatedAllows for object encapsulation
- Easy to tell heirchy
- No missing } problems
- Allows explicit typing (buttons vs. variables vs. etc.)
- Intrinsically allows multip
- Allows for object encapsulation
- Easy to tell heirchy
- No missing } problems
- Allows explicit typing (buttons vs. variables vs. etc.)
- Intrinsically allows multiplicity of buttons
- Object abstraction
- Easy to read
Disadvantages:
- Problems with incorrect spacing
- Some editors convert tabs to spaces, this may cause some commands to appear to be spaced correctly, but in reality one is spaced with tabs, the other is with spaces. This will cause parsing problems since tab size can change from editor to editor
New syntax proposals #2 (CCD – C-ish Command Definition):
Similar to C's struct construction
Menu { Menu_Item { Variable_or_button { field value field “multiple line and spaced value” “field with spaces in name” { sub_field1 value sub_field2 value } } } }
Practical example:
DNA/RNA { Numseq { %START% { text “Start position” type int min 0 max #(sequence.length) } % END { text “Start position” type int min 0 max #(sequence.length) } %IN% { type sequencefile source canvas } Run_button { type button text “Run” command “numseq %START% %END% < %IN%” } } }
Advantages:
- It is similar to C syntax, therefore it includes all of the same advantages and disadvantages as C
- It is easy to see how things are associated
- Allows for object encapsulation
- Easy to tell heirchy
- No white-space problems
- Can be made to allow explicit typing (buttons vs. variables vs. etc.)
- Intrinsically allows multiplicity of buttons
- Object abstraction
- Fairly easy to read
Disadvantages:
- Requires closing brace (})
- Can be formatted messily because the syntax does not enforce indentation
Conclusion
PCD – Pythonesque Command Definition was selected in the Bioinformatics Team Meeting