application: remap [
  documentation: "Display restriction enzyme binding sites in a
                  nucleotide sequence"
  groups: "Display, Nucleic:Restriction, Nucleic:Translation"
]

section: input [
  information: "Input section"
  type: "page"
]

  seqall: sequence [
    parameter: "Y"
    type: "DNA"
  ]

endsection: input

section: required [
  information: "Required section"
  type: "page"
]

  string: enzymes [
    standard: "Y"
    default: "all"
    information: "Comma separated enzyme list"
    help: "The name 'all' reads in all enzyme names from the REBASE
           database. You can specify enzymes by giving their names with
           commas between then, such as: 'HincII,hinfI,ppiI,hindiii'. \
           The case of the names is not important. You can specify a file of
           enzyme names to read in by giving the name of the file holding the
           enzyme names with a '@' character in front of it, for example,
           '@enz.list'. \
           Blank lines and lines starting with a hash character or '!' are
           ignored and all other lines are concatenated together with a comma
           character ',' and then treated as the list of enzymes to search
           for. \
           An example of a file of enzyme names is: \
           ! my enzymes \
           HincII, ppiII \
           ! other enzymes \
           hindiii \
           HinfI \
           PpiI"
    knowntype: "enzyme list"
  ]

  integer: sitelen [
    standard: "Y"
    minimum: "2"
    maximum: "20"
    default: "4"
    information: "Minimum recognition site length"
    help: "This sets the minimum length of the restriction enzyme
           recognition site. Any enzymes with sites shorter than this will be
           ignored."
  ]

endsection: required

section: additional [
  information: "Additional section"
  type: "page"
]

  integer: mincuts [
    additional: "Y"
    minimum: "1"
    maximum: "1000"
    default: "1"
    information: "Minimum cuts per RE"
    help: "This sets the minimum number of cuts for any restriction
           enzyme that will be considered. Any enzymes that cut fewer times
           than this will be ignored."
  ]

  integer: maxcuts [
    additional: "Y"
    minimum: "$(mincuts)"
    maximum: "2000000000"
    default: "2000000000"
    information: "Maximum cuts per RE"
    help: "This sets the maximum number of cuts for any restriction
           enzyme that will be considered. Any enzymes that cut more times
           than this will be ignored."
  ]

  boolean: single [
    additional: "Y"
    default: "N"
    information: "Force single site only cuts"
    help: "If this is set then this forces the values of the mincuts
           and maxcuts qualifiers to both be 1. Any other value you may have
           set them to will be ignored."
  ]

  boolean: blunt [
    additional: "Y"
    default: "Y"
    information: "Allow blunt end cutters"
    help: "This allows those enzymes which cut at the same position on
           the forward and reverse strands to be considered."
  ]

  boolean: sticky [
    additional: "Y"
    default: "Y"
    information: "Allow sticky end cutters"
    help: "This allows those enzymes which cut at different positions
           on the forward and reverse strands, leaving an overhang, to be
           considered."
  ]

  boolean: ambiguity [
    additional: "Y"
    default: "Y"
    information: "Allow ambiguous matches"
    help: "This allows those enzymes which have one or more 'N'
           ambiguity codes in their pattern to be considered"
  ]

  boolean: plasmid [
    additional: "Y"
    default: "N"
    information: "Allow circular DNA"
    help: "If this is set then this allows searches for restriction
           enzyme recognition site and cut postions that span the end of the
           sequence to be considered."
  ]

  boolean: commercial [
    additional: "Y"
    default: "Y"
    information: "Only enzymes with suppliers"
    help: "If this is set, then only those enzymes with a commercial
           supplier will be searched for. This qualifier is ignored if you
           have specified an explicit list of enzymes to search for, rather
           than searching through 'all' the enzymes in the REBASE database.
           It is assumed that, if you are asking for an explicit enzyme, then
           you probably know where to get it from and so all enzymes names
           that you have asked to be searched for, and which cut, will be
           reported whether or not they have a commercial supplier."
  ]

  list: table [
    additional: "Y"
    default: "0"
    minimum: "1"
    maximum: "1"
    header: "Genetic codes"
    values: "0:Standard; 1:Standard (with alternative initiation
             codons); 2:Vertebrate Mitochondrial; 3:Yeast Mitochondrial;
             4:Mold, Protozoan, Coelenterate Mitochondrial and
             Mycoplasma/Spiroplasma; 5:Invertebrate Mitochondrial; 6:Ciliate
             Macronuclear and Dasycladacean; 9:Echinoderm Mitochondrial;
             10:Euplotid Nuclear; 11:Bacterial; 12:Alternative Yeast Nuclear;
             13:Ascidian Mitochondrial; 14:Flatworm Mitochondrial;
             15:Blepharisma Macronuclear; 16:Chlorophycean Mitochondrial;
             21:Trematode Mitochondrial; 22:Scenedesmus obliquus;
             23:Thraustochytrium Mitochondrial"
    delimiter: ";"
    codedelimiter: ":"
    information: "Genetic code to use"
  ]

  list: frame [
    additional: "Y"
    default: "6"
    minimum: "1"
    maximum: "6"
    header: "Translation frames"
    values: "1:1, 2:2, 3:3, F:Forward three frames, -1:-1, -2:-2,
             -3:-3, R:Reverse three frames, 6:All six frames"
    delimiter: ","
    codedelimiter: ":"
    information: "Frame(s) to translate"
    help: "This allows you to specify the frames that are translated.
           If you are not displaying cut sites on the reverse sense, then the
           reverse sense translations will not be displayed even if you have
           requested frames 4, 5 or 6. By default, all six frames will be
           displayed."
  ]

endsection: additional

section: output [
  information: "Output section"
  type: "page"
]

  outfile: outfile [
    parameter: "Y"
    knowntype: "remap output"
  ]

  boolean: cutlist [
    additional: "Y"
    default: "Y"
    information: "List the enzymes that cut"
    help: "This produces lists in the output of the enzymes that cut,
           those that cut but are excluded because that cut fewer times than
           mincut or more times than maxcut and those enzymes that do not
           cut."
  ]

  boolean: flatreformat [
    additional: "Y"
    default: "N"
    information: "Display RE sites in flat format"
    help: "This changes the output format to one where the recognition
           site is indicated by a row of '===' characters and the cut site
           is pointed to by a '>' character in the forward sense, or a '<' in
           the reverse sense strand."
  ]

  boolean: limit [
    additional: "Y"
    default: "Y"
    information: "Limits reports to one isoschizomer"
    help: "This limits the reporting of enzymes to just one enzyme
           from each group of isoschizomers. The enzyme chosen to represent
           an isoschizomer group is the prototype indicated in the data file
           'embossre.equ', which is created by the program 'rebaseextract'.
           If you prefer different prototypes to be used, make a copy of
           embossre.equ in your home directory and edit it. If this value is
           set to be false then all of the input enzymes will be reported.
           You might like to set this to false if you are supplying an
           explicit set of enzymes rather than searching 'all' of them."
  ]

  boolean: translation [
    default: "Y"
    information: "Display translation"
    help: "This displays the 6-frame translations of the sequence in
           the output."
  ]

  boolean: reverse [
    default: "Y"
    information: "Display cut sites and translation of reverse
                  sense"
    help: "This displays the cut sites and translation of the reverse
           sense."
  ]

  integer: orfminsize [
    default: "0"
    minimum: "0"
    information: "Minimum size of ORFs"
    help: "This sets the minimum size of Open Reading Frames (ORFs) to
           display in the translations. All other translation regions are
           masked by changing the amino acids to '-' characters."
    expected: "If this value is left as 0 then all of the
               translation is shown."
  ]

  range: uppercase [
    default: ""
    information: "Regions to put in uppercase (eg: 4-57,78-94)"
    help: "Regions to put in uppercase. \
           If this is left blank, then the sequence case is left alone. \
           A set of regions is specified by a set of pairs of positions. \
           The positions are integers. \
           They are separated by any non-digit, non-alpha character. \
           Examples of region specifications are: \
           24-45, 56-78 \
           1:45, 67=99;765..888 \
           1,5,8,10,23,45,57,99"
    expected: "If this is left blank, then the sequence case is
               left alone."
  ]

  range: highlight [
    default: ""
    information: "Regions to colour in HTML (eg: 4-57 red 78-94
                  green)"
    help: "Regions to colour if formatting for HTML. \
           If this is left blank, then the sequence is left alone. \
           A set of regions is specified by a set of pairs of positions. \
           The positions are integers. \
           They are followed by any valid HTML font colour. \
           Examples of region specifications are: \
           24-45 blue 56-78 orange \
           1-100 green 120-156 red \
           A file of ranges to colour (one range per line) can be specifed as
           '@filename'."
  ]

  boolean: threeletter [
    default: "N"
    information: "Display protein sequences in three-letter
                  code"
  ]

  boolean: number [
    default: "N"
    information: "Number the sequences"
  ]

  integer: width [
    default: "60"
    minimum: "1"
    information: "Width of sequence to display"
  ]

  integer: length [
    default: "0"
    minimum: "0"
    information: "Line length of page (0 for indefinite)"
  ]

  integer: margin [
    default: "10"
    minimum: "0"
    information: "Margin around sequence for numbering"
  ]

  boolean: name [
    default: "Y"
    information: "Display sequence ID"
    help: "Set this to be false if you do not wish to display the ID
           name of the sequence"
  ]

  boolean: description [
    default: "Y"
    information: "Display description"
    help: "Set this to be false if you do not wish to display the
           description of the sequence"
  ]

  integer: offset [
    default: "1"
    information: "Offset to start numbering the sequence from"
  ]

  boolean: html [
    default: "N"
    information: "Use HTML formatting"
    outputmodifier: "Y"
  ]

endsection: output
