application: trimest [
  documentation: "Remove poly-A tails from nucleotide sequences"
  groups: "Edit"
]

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

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

endsection: input

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

  integer: minlength [
    additional: "Y"
    default: "4"
    minimum: "1"
    information: "Minimum length of a poly-A tail"
    help: "This is the minimum length that a poly-A (or poly-T) tail
           must have before it is removed. If there are mismatches in the
           tail than there must be at least this length of poly-A tail before
           the mismatch for the mismatch to be considered part of the tail."
  ]

  integer: mismatches [
    additional: "Y"
    default: "1"
    minimum: "0"
    information: "Number of contiguous mismatches allowed in a
                  tail"
    help: "If there are this number or fewer contiguous non-A bases in
           a poly-A tail then, if there are '-minlength' 'A' bases before
           them, they will be considered part of the tail and removed . \
           For example the terminal 4 A's of GCAGAAAA would be removed with
           the default values of -minlength=4 and -mismatches=1 (There are
           not at least 4 A's before the last 'G' and so only the A's after
           it are considered to be part of the tail). The terminal 9 bases of
           GCAAAAGAAAA would be removed; There are at least -minlength A's
           preceeding the last 'G', so it is part of the tail."
  ]

  boolean: reverse [
    additional: "Y"
    default: "Y"
    information: "Write the reverse complement when poly-T is
                  removed"
    help: "When a poly-T region at the 5' end of the sequence is found
           and removed, it is likely that the sequence is in the reverse
           sense. This option will change the sequence to the forward sense
           when it is written out. If this option is not set, then the sense
           will not be changed."
  ]

  toggle: tolower [
    additional: "Y"
    default: "N"
    information: "Change poly-A tail to lower-case"
    help: "The poly-A region can be 'masked' by converting the
           sequence characters to lower-case. Some non-EMBOSS programs e.g.
           fasta can interpret this as a masked region. The sequence is
           unchanged apart from the case change. You might like to ensure
           that the whole sequence is in upper-case before masking the
           specified regions to lower-case by using the '-supper' sequence
           qualifier."
  ]

endsection: additional

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

  boolean: fiveprime [
    default: "Y"
    information: "Remove poly-T tails at the 5' end of the
                  sequence."
    help: "If this is set true, then the 5' end of teh sequence is
           inspected for poly-T tails. These will be removed if they are
           longer than any 3' poly-A tails. If this is false, then the 5' end
           is ignored."
  ]

endsection: advanced

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

  seqoutall: outseq [
    parameter: "Y"
  ]

endsection: output
