application: siggen [
  documentation: "Generates a sparse protein signature from
                  an alignment"
  groups: "Protein:3D Structure"
  gui: "yes"
  batch: "yes"
  cpu: "low"
  embassy: "signature"
]

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

  dirlist: algpath [
    parameter: "Y"
    information: "Domain alignment directories"
    help: "This option specifies the location of DAF files (domain
           alignment files) (input). A 'domain alignment file' contains a
           sequence alignment of domains belonging to the same SCOP or CATH
           family (or other node in the structural hierarchies). The file is
           in DAF format (CLUSTAL-like) and is annotated with domain family
           classification information. The files generated by using SCOPALIGN
           will contain a structure-based sequence alignment of domains of
           known structure only. Such alignments can be extended with
           sequence relatives (of unknown structure) by using SEQALIGN."
    default: "./"
    extension: "daf"
    knowntype: "domain alignment"
    relations:  "EDAM: EMBASSY domain alignment file"                  
  ]

  list: mode [
    standard: "Y"
    default: "1"
    minimum: "1"
    maximum: "1"
    delimiter: ","
    codedelimiter: ":"
    values: "1: Use positions specified in alignment file, 2: Use a
             scoring method, 3: Generate a randomised signature"
    header: "Specify mode of signature generation"
    help: "This option specifies the mode of signature generation.
           There are 3 modes for signatures generatation: (1) Use positions
           specified in alignment file. The alignment file must contain a
           line beginning with the text 'Positions' for each line of the
           alignment. A '1' in the 'Positions' line indicates that the
           signature should include data from the corresponding alignment
           site. The signature will only include the positions that are
           marked with a '1'. (2) Use a scoring method. The alignment is
           scored (see 'Algorithm') and the signature of a specified sparsity
           is sampled from high scoring positions. (3): Generate a
           randomised signature. A signature of a specified sparsity is
           sampled at random from the alignment."
    information: "Select number"
    relations: "EDAM: Generic string array"                                
  ]

  list: conoption [
    standard: "@($(mode)==2)"
    default: "5"
    minimum: "1"
    maximum: "1"
    delimiter: ","
    codedelimiter: ":"
    values: "1: Number, 2: Conservation, 3: Number and conservation,
             4: None (structural data available), 5: None (no structural
             data available)"
    header: "Residue contacts scoring method"
    information: "Select number"
    help: "This option specifies the structure-based scoring scheme.
           SIGGEN provides 2 structure-based scoring schemes (plus a
           combination method) that are used to score the input alignment."
    relations: "EDAM: Generic string array"                                
  ]

  directory: conpath [
    standard: "@($(conoption)!=5)"
    information: "Structure contacts directory"
    help: "This option specifies the location of CON files (contact
           files) (input). A 'contact file' contains contact data for a
           protein or a domain from SCOP or CATH, in the CON format
           (EMBL-like). The contacts may be intra-chain residue-residue,
           inter-chain residue-residue or residue-ligand. The files are
           generated by using CONTACTS, INTERFACE and SITES."
    default: "./"
    extension: "con"
    knowntype: "contact"
    relations:  "EDAM: Amino acid contact map"                         
  ]

  directory: cpdbpath [
    standard: "@($(conoption)!=5)"
    information: "Clean domain coordinates directory"
    help: "This option specifies the location of domain CCF files
           (clean coordinate files) (input). A 'clean cordinate file'
           contains protein coordinate and derived data for a single PDB file
           ('protein clean coordinate file') or a single domain from SCOP or
           CATH ('domain clean coordinate file'), in CCF format (EMBL-like).
           The files, generated by using PDBPARSE (PDB files) or DOMAINER
           (domains), contain 'cleaned-up' data that is self-consistent and
           error-corrected. Records for residue solvent accessibility and
           secondary structure are added to the file by using PDBPLUS."
    default: "./"
    extension: "ccf"
    knowntype: "domain clean coordinates"
    relations:  "EDAM: Protein tertiary structure"                     
  ]

  list: seqoption [
    standard: "@($(mode)==2)"
    default: "3"
    minimum: "1"
    maximum: "1"
    delimiter: ","
    codedelimiter: ":"
    values: "1: Substitution matrix, 2: Residue class, 3: None"
    header: "Sequence variability scoring method"
    information: "Select number"
    help: "This option specifies the sequence-based scoring scheme.
           SIGGEN provides 2 sequence-based scoring schemes that are used to
           score the input alignment."
    relations: "EDAM: Generic string array"                                
  ]

  matrixf: datafile [
    standard: "@($(seqoption)==1)"
    information: "Substitution matrix to be used"
    help: "This option specifies the the substitution matrix. The
           substitution matrix is used by the sequence-based scoring
           schemes."
    default: "EBLOSUM62"
    relations: "EDAM: Float comparison matrix"                             
  ]

endsection: input

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

  integer: sparsity [
    standard: "@($(mode)!=1)"
    information: "The % sparsity of signature"
    help: "This option specifies the % sparsity of signature. The
           signature sparsity is a user-defined parameter that determines how
           many residues the final signature will contain, for example, if
           the average sequence length of the proteins in the alignment is
           250 residues, then a signature of sparsity 10% (default value)
           will contain 25 key residues or signature positions, that
           correspond to the top 25% highest scoring alignment positions."
    default: "10"
    relations: "EDAM: Generic integer"                                     
  ]

  integer: wsiz [
    standard: "Y"
    information: "Window size"
    help: "This option specifies the window size. When a signature is
           aligned to a protein sequence, the permissible gaps between two
           signature positions is determined by the empirical gaps and the
           window size. The user is prompted for a window size that is used
           for every position in the signature. Likely this is not optimal. A
           future implementation will provide a range of methods for
           generating values of window size depending upon the alignment
           (window size is identified by the WSIZ record in the signature
           output file)."
    default: "0"
    relations: "EDAM: Generic integer"                                     
  ]

  toggle: filtercon [
    standard: "@($(conoption)!=5)"
    information: "Ignore alignment positions making less than a
                  threshold number of contacts"
    help: "This option specifies whether to disregard positions
           forming few contacts only during the selection of signature
           positions."
    default: "N"
    relations: "EDAM: Generic boolean"                                     
  ]

  integer: conthresh [
    standard: "$(filtercon)"
    information: "Threshold contact number"
    help: "This option specifies the threshold contact number. This
           controls the selection of key positions for the structure-based
           scoring scheme (number of contacts)."
    default: "10"
    relations: "EDAM: Generic integer"                                     
  ]

  boolean: filterpsim [
    standard: "@($(mode)==2)"
    information: "Ignore alignment positions with post_similar
                  value of 0"
    help: "This option specifies whether to disregard alignment sites
           that were not aligned satisfactorily (STAMP alignments only)."
    default: "Y"
    relations: "EDAM: Generic boolean"                                     
  ]

endsection: required

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

  outdir: sigoutdir [
    parameter: "Y"
    help: "This option specifies the location of signature files
           (output). A 'signature file' contains a sparse sequence signature
           suitable for use with the SIGSCAN and SIGGEN programs. The files
           are generated by using SIGGEN & SIGGENLIG."
    default: "./"
    extension: "sig"
    knowntype: "domainatrix signature"
    information: "Domainatrix signature file output directory"
    relations:  "EDAM: Domainatrix signature record"                   
  ]

endsection: output
