application: cons [
  documentation: "Create a consensus sequence from a multiple alignment"
  groups: "Alignment:Consensus"
    relations: "EDAM_topic:0182 Sequence alignment"
    relations: "EDAM_operation:0448 Sequence alignment analysis
                                       (conservation)"
]

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

  seqset: sequence [
    parameter: "Y"
    type: "gapany"
    aligned: "Y"
    minseqs: "2"
    help: "File containing a sequence alignment."
    relations: "EDAM_data:0863 Sequence alignment"
  ]

  matrix: datafile [
    additional: "Y"
    information: "Scoring matrix"
    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."
    relations: "EDAM_data:0874 Comparison matrix"
  ]

endsection: input

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

  float: plurality [
    additional: "Y"
    information: "Plurality check value"
    help: "Set a cut-off for the number of positive matches below
           which there is no consensus. The default plurality is taken as
           half the total weight of all the sequences in the alignment."
    default: "@( $(sequence.totweight) / 2)"
    expected: "Half the total sequence weighting"
    relations: "EDAM_data:2527 Parameter"
  ]

  integer: identity [
    additional: "Y"
    information: "Required number of identities at a position"
    help: "Provides the facility of setting the required number of
           identities at a site for it to give a consensus at that position.
           Therefore, if this is set to the number of sequences in the
           alignment only columns of identities contribute to the consensus."
    default: "0"
    minimum: "0"
    relations: "EDAM_data:2527 Parameter"
  ]

  float: setcase [
    additional: "Y"
    information: "Define a threshold above which the consensus
                  is given in uppercase"
    help: "Sets the threshold for the positive matches above which the
           consensus is is upper-case and below which the consensus is in
           lower-case."
    default: "@( $(sequence.totweight) / 2)"
    relations: "EDAM_data:2146 Threshold"
  ]

endsection: additional

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

  seqout: outseq [
    parameter: "Y"
    relations: "EDAM_data:0849 Sequence record"
    relations: "EDAM_data:0848 Raw sequence"
  ]

  string: name [
    additional: "Y"
    default: ""
    information: "Name of the consensus sequence"
    knowntype: "sequence id output"
    relations: "EDAM_identifier:1063 Sequence identifier"
  ]

endsection: output
