appl: trimseq [
  documentation: "Trim ambiguous bits off the ends of sequences"
  groups: "Edit"
]

section: input [ info: "input Section" type: page ]
seqall: sequence  [
  parameter: "Y"
  type: "gapany"
]

endsection: input

section: advanced [ info: "advanced Section" type: page ]
integer: window  [
  optional: "Y"
  default: "1"
  prompt: "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."
]

float: percent  [
  optional: "Y"
  default: "100.0"
  prompt: "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."
]

bool: strict  [
  optional: "Y"
  default: "N"
  prompt: "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."
]

bool: star  [
  optional: "Y"
  default: "N"
  prompt: "Trim off asterisks"
  help: "In protein sequences, trim off not only X's, but also the *'s"
]

bool: left  [
  default: "Y"
  prompt: "Trim at the start"
]

bool: right  [
  default: "Y"
  prompt: "Trim at the end"
]
endsection: advanced

section: output [ info: "output Section" type: page ]
seqoutall: outseq  [
  parameter: "Y"
]

endsection: output
