application: domainnr [
  documentation: "Removes redundant domains from a DCF file."
  groups: "Utils:Database creation"
  gui: "yes"
  batch: "yes"
  cpu: "medium"
  embassy: "domainatrix"
]

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

  infile: dcfinfile [
    parameter: "Y"
    information: "Domain classification file"
    help: "This option specifies name of DCF file (domain
           classification file) (input). A 'domain classification file'
           contains classification and other data for domains from SCOP or
           CATH, in DCF format (EMBL-like). The files are generated by using
           SCOPPARSE and CATHPARSE. Domain sequence information can be added
           to the file by using DOMAINSEQS."
    knowntype: "Domain classification"
  ]

  matrixf: datafile [
    additional: "Y"
    information: "Residue substitution matrix."
    help: "This option specifies the residue substitution matrix. This
           is used for sequence comparison."
    default: "EBLOSUM62"
  ]

  toggle: retain [
    standard: "Y"
    information: "Write redundant domains to separate file."
    help: "This option specifies whether to write redundant domains to
           a separate file. If this option is selected, redundant domains
           are written to a separate output file."
    default: "N"
  ]

endsection: input

section: required [
  information: "Required section"
  type: "page"
]

  list: node [
    standard: "Y"
    default: "1"
    minimum: "1"
    maximum: "1"
    values: "1: Class (SCOP), 2: Fold (SCOP), 3: Superfamily (SCOP),
             4: Family (SCOP), 5: Class (CATH), 6: Architecture (CATH), 7:
             Topology (CATH), 8: Homologous Superfamily (CATH), 9: Family
             (CATH)"
    help: "This option specifies the node for redundancy removal.
           Redundancy can be removed at any specified node in the SCOP or
           CATH hierarchies. For example by selecting 'Class' entries
           belonging to the same Class will be non-redundant."
    delimiter: ","
    codedelimiter: ":"
    header: "Node at which to remove redundancy"
    information: "Select number."
  ]

  list: mode [
    standard: "Y"
    default: "1"
    minimum: "1"
    maximum: "1"
    values: "1: Remove redundancy at a single threshold % sequence
             similarity,2: Remove redundancy outside a range of acceptable
             threshold % similarity"
    help: "This option specifies whether to remove redundancy at a
           single threshold % sequence similarity or remove redundancy
           outside a range of acceptable threshold % similarity. All
           permutations of pair-wise sequence alignments are calculated for
           each domain family in turn using the EMBOSS implementation of the
           Needleman and Wunsch global alignment algorithm. Redundant
           sequences are removed in one of two modes as follows: (i) If a
           pair of proteins achieve greater than a threshold percentage
           sequence similarity (specified by the user) the shortest sequence
           is discarded. (ii) If a pair of proteins have a percentage
           sequence similarity that lies outside an acceptable range
           (specified by the user) the shortest sequence is discarded."
    delimiter: ","
    codedelimiter: ":"
    header: "Redundancy removal options"
    information: "Select number."
  ]

  float: threshold [
    standard: "@($(mode)==1)"
    information: "The % sequence identity redundancy
                  threshold."
    help: "This option specifies the % sequence identity redundancy
           threshold, which determines the redundancy calculation. If a pair
           of proteins achieve greater than this threshold the shortest
           sequence is discarded."
    default: "95.0"
  ]

  float: threshlow [
    standard: "@($(mode)==2)"
    information: "The % sequence identity redundancy threshold
                  (lower limit)"
    help: "This option specifies the % sequence identity redundancy
           threshold, which determines the redundancy calculation. If a pair
           of proteins have a percentage sequence similarity that lies
           outside an acceptable range the shortest sequence is discarded."
    default: "30.0"
  ]

  float: threshup [
    standard: "@($(mode)==2)"
    information: "The % sequence identity redundancy threshold
                  (upper limit)."
    help: "This option specifies the % sequence identity redundancy
           threshold, which determines the redundancy calculation. If a pair
           of proteins have a percentage sequence similarity that lies
           outside an acceptable range the shortest sequence is discarded."
    default: "90.0"
  ]

endsection: required

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

  float: gapopen [
    additional: "Y"
    information: "Gap insertion penalty"
    minimum: "1."
    maximum: "100."
    default: "10"
    valid: "Floating point number from 1.0 to 100.0"
    expected: "10.0 for any sequence"
    help: "This option specifies the gap insertion penalty. This is
           the score taken away when a gap is created. The best value depends
           on the choice of comparison matrix. The default value assumes you
           are using the EBLOSUM62 matrix for protein sequences, and the
           EDNAFULL matrix for nucleotide sequences."
  ]

  float: gapextend [
    additional: "Y"
    information: "Gap extension penalty"
    minimum: "0.0"
    maximum: "10."
    default: "0.5"
    valid: "Floating point number from 0.0 to 10.0"
    expected: "0.5 for any sequence"
    help: "This option specifies the gap extension penalty. This is
           added to the standard gap penalty for each base or residue in the
           gap. This is how long gaps are penalized. Usually you will expect
           a few long gaps rather than many short gaps, so the gap extension
           penalty should be lower than the gap penalty."
  ]

endsection: additional

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

endsection: advanced

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

  outfile: dcfoutfile [
    parameter: "Y"
    information: "Domain classification output file"
    help: "This option specifies the name of non-redundant DCF file
           (domain classification file) (output). A 'domain classification
           file' contains classification and other data for domains from SCOP
           or CATH, in DCF format (EMBL-like). The files are generated by
           using SCOPPARSE and CATHPARSE. Domain sequence information can be
           added to the file by using DOMAINSEQS."
    default: "test.scop"
    knowntype: "Domain classification"
  ]

  outfile: redoutfile [
    standard: "$(retain)"
    information: "Domain classification redundant output file
                  (optional)"
    help: "This option specifies the name of DCF file (domain
           classification file) for redundant sequences (output). A 'domain
           classification file' contains classification and other data for
           domains from SCOP or CATH, in DCF format (EMBL-like). The files
           are generated by using SCOPPARSE and CATHPARSE. Domain sequence
           information can be added to the file by using DOMAINSEQS."
    nullok: "Y"
    nulldefault: "Y"
    extension: "scop"
    knowntype: "Domain classification"
  ]

  outfile: logfile [
    standard: "Y"
    information: "Domainatrix log output file"
    help: "This option specifies the name of log file for the build.
           The log file contains messages about any errors arising while
           domainnr ran."
    default: "domainnr.log"
    knowntype: "domainatrix log"
  ]

endsection: output
