application: showalign [
  documentation: "Display a multiple sequence alignment in pretty format"
  groups: "Alignment:Multiple, Display"
]

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

  seqset: sequence [
    parameter: "Y"
    type: "gapany"
    aligned: "Y"
    help: "The sequence alignment to be displayed."
  ]

  matrix: matrix [
    additional: "Y"
    information: "Similarity scoring Matrix file"
    protein: "$(acdprotein)"
    help: "This is the scoring matrix file used when comparing
           sequences. By default it is the file 'EBLOSUM62' (for proteins) or
           the file 'EDNAFULL' (for nucleic sequences). These files are
           found in the 'data' directory of the EMBOSS installation."
  ]

endsection: input

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

  string: refseq [
    additional: "Y"
    default: "0"
    information: "The number or the name of the reference
                  sequence"
    help: "If you give the number in the alignment or the name of a
           sequence, it will be taken to be the reference sequence. The
           reference sequence is always show in full and is the one against
           which all the other sequences are compared. If this is set to 0
           then the consensus sequence will be used as the reference
           sequence. By default the consensus sequence is used as the
           reference sequence."
    knowntype: "sequence id input"
  ]

  boolean: bottom [
    additional: "Y"
    default: "Y"
    information: "Display the reference sequence at the bottom"
    help: "If this is true then the reference sequence is displayed at
           the bottom of the alignment as well as at the top."
  ]

  list: show [
    additional: "Y"
    default: "N"
    minimum: "1"
    maximum: "1"
    header: "What to show"
    values: "A:All of the sequences, I:Identities between the
             sequences, N:Non-identities between the sequences,
             S:Similarities between the sequences, D:Dissimilarities between
             the sequences"
    delimiter: ","
    codedelimiter: ":"
    information: "What to show"
  ]

  list: order [
    additional: "Y"
    default: "I"
    minimum: "1"
    maximum: "1"
    header: "Output order of the sequences"
    values: "I:Input order - no change, A:Alphabetical order of the
             names, S:Similarity to the reference sequence"
    delimiter: ","
    codedelimiter: ":"
    information: "Output order of the sequences"
  ]

  boolean: similarcase [
    additional: "Y"
    default: "Y"
    information: "Show similar residues in lower-case"
    help: "If this is set True, then when -show is set to
           'Similarities' or 'Non-identities' and a residue is similar but
           not identical to the reference sequence residue, it will be
           changed to lower-case. If -show is set to 'All' then
           non-identical, non-similar residues will be changed to lower-case.
           If this is False then no change to the case of the residues is
           made on the basis of their similarity to the reference sequence."
  ]

  boolean: consensus [
    additional: "Y"
    default: "Y"
    information: "Display the consensus line"
    help: "If this is true then the consensus line is displayed."
  ]

endsection: additional

section: advanced [
  information: "Advanced section"
  type: "page"
]

  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."
  ]

  boolean: number [
    default: "Y"
    information: "Number the sequences"
    help: "If this option is true then a line giving the positions in
           the alignment is displayed every 10 characters above the
           alignment."
  ]

  boolean: ruler [
    default: "Y"
    information: "Display ruler"
    help: "If this option is true then a ruler line marking every 5th
           and 10th character in the alignment is displayed."
  ]

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

  integer: margin [
    default: "-1"
    minimum: "-1"
    information: "Length of margin for sequence names"
    help: "This sets the length of the left-hand margin for sequence
           names. If the margin is set at 0 then no margin and no names are
           displayed. If the margin is set to a value that is less than the
           length of a sequence name then the sequence name is displayed
           truncated to the length of the margin. If the margin is set to -1
           then the minimum margin width that will allow all the sequence
           names to be displayed in full plus a space at the end of the name
           will automatically be selected."
  ]

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

  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 specified
           as '@filename'."
  ]

  float: plurality [
    default: "50.0"
    minimum: "0.0"
    maximum: "100.0"
    information: "Plurality check % for consensus"
    help: "Set a cut-off for the % of positive scoring matches below
           which there is no consensus. The default plurality is taken as 50%
           of the total weight of all the sequences in the alignment."
  ]

  float: setcase [
    default: "@( $(sequence.totweight) / 2)"
    information: "Threshold above which the consensus is given
                  in uppercase"
    help: "Sets the threshold for the scores of the positive matches
           above which the consensus is in upper-case and below which the
           consensus is in lower-case. By default this is set to be half of
           the (weight-adjusted) number of sequences in the alignment."
  ]

  float: identity [
    default: "0.0"
    minimum: "0.0"
    maximum: "100.0"
    information: "Required % of identities at a position for
                  consensus"
    help: "Provides the facility of setting the required number of
           identities at a position for it to give a consensus. Therefore, if
           this is set to 100% only columns of identities contribute to the
           consensus."
  ]

  boolean: gaps [
    default: "Y"
    information: "Use gap characters in consensus"
    help: "If this option is true then gap characters can appear in
           the consensus. The alternative is 'N' for nucleotide, or 'X' for
           protein"
  ]

endsection: advanced

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

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

endsection: output
