application: trimseq [
  documentation: "Remove unwanted characters from start and end of sequence(s)"
  groups: "Edit"
    relations: "EDAM_topic:0091 Data handling"
    relations: "EDAM_operation:0369 Sequence cutting"
    relations: "EDAM_operation:0235 Sequence ambiguity calculation"
]

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

  seqall: sequence [
    parameter: "Y"
    type: "gapany"
    relations: "EDAM_data:0849 Sequence record"
  ]

endsection: input

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

  integer: window [
    additional: "Y"
    default: "1"
    minimum: "1"
    maximum: "$(sequence.length)"
    failrange: "N"
    trueminimum: "Y"
    information: "Window size"
    help: "This determines the size of the region that is considered
           when deciding whether the percentage of ambiguity is greater than
           the threshold. A value of 5 means that a region of 5 letters in
           the sequence is shifted along the sequence from the ends and
           trimming is done only if there is a greater or equal percentage of
           ambiguity than the threshold percentage."
    relations: "EDAM_data:1251 Window size"
  ]

  float: percent [
    additional: "Y"
    default: "100.0"
    information: "Percent threshold of ambiguity in window"
    help: "This is the threshold of the percentage ambiguity in the
           window required in order to trim a sequence."
    relations: "EDAM_data:2146 Threshold"
  ]

  boolean: strict [
    additional: "Y"
    default: "N"
    information: "Trim off all ambiguity codes, not just N or
                  X"
    help: "In nucleic sequences, trim off not only N's and X's, but
           also the nucleotide IUPAC ambiguity codes M, R, W, S, Y, K, V, H,
           D and B. In protein sequences, trim off not only X's but also B
           and Z."
    relations: "EDAM_data:2527 Parameter"
  ]

  boolean: star [
    additional: "Y"
    default: "N"
    information: "Trim off asterisks"
    help: "In protein sequences, trim off not only X's, but also the
           *'s"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: additional

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

  boolean: left [
    default: "Y"
    information: "Trim at the start"
    relations: "EDAM_data:2527 Parameter"
  ]

  boolean: right [
    default: "Y"
    information: "Trim at the end"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: advanced

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

  seqoutall: outseq [
    parameter: "Y"
    relations: "EDAM_data:0849 Sequence record"
  ]

endsection: output
