DNALD Syntax

DNApl is a simple programming language that allows the easy description of DNA molecule. This short tutorial will provide you with the basics and allow you to get going.

Another useful way to start is by editing a similar DNApl specification that can be found under the "Examples" section, to suit you needs.



Definition of a DNA fragment is of the form:

symbol_name :=  DNA-sequence;



This defines a fragment called XhoI which corresponds to the DNA sequence CTCGAG. Note the semicolon at the end of the line.


Common signs

  • Square brackets [ ] denotes index in a sequence:
    XhoI[2] refers to the second letter of the symbol called XhoI (in this case from the previous example 'T');
  • Colon ( : ) is used to denote a range a of indices.
    XhoI[2:5] means a sequence of  4 letters starting from the second letter until the fifth letter of XhoI ('TCGA').
  • Dot ( . ) denotes concatenation of two sequences:
    XhoI[1].XhoI[5:6]  refers to the sequence starting with the first letter of XhoI  followed by the sequence of the 5 and 6 letters of XhoI –  in this case 'CAG'.
  • Equal sign (=) is an operator used to assign and change existing sequences.
    XhoI := CTCGAG;
    Mut := XhoI[1=A];
    Defines a symbol named Mut with the sequence ATCGAG.
  • Comma ( , ) is used to separate assignment expressions inside square brackets.
    Mut := XhoI[1 = A, 5:6 = CT];
    The resulting sequence would be ATCGCT.
  • Astrix (*) is used to denote repetitive sequences:
    DoubleXhoI := XhoI*2;
    Resulting sequence will be CTCGAGCTCGAG.
  • Vertical bar ( | ) represents  “or” operation to be carried out in separate wells.
  • Double vertical bar ( || )  represents  “or” operation to be carried out in the same well.



  • The set of input sequences begins with the word “Input:” in a separate line.
  • The set of sequences that are not within the input sequences and are not required as independent, standalone output targets is marked under “definition” section. This section is optional and may not appear in every spec (see detailed futerman example).
  • The set of output (target) sequences begins with the word “Output:” in a separate line.




seq := “act”;


target1 := seq[3 = “a” || 3 = “c” ] ;

  • Then target1 will be generated in the same well : 50 % “aca” and 50% “acc”.
  • The last line can also be written in the following manner:
    target1:= seq[3 = ”a” ] || seq[3 = “c”];



The folowing DNApl program illustrates most of the operations mentioned above.