appl: distmat [
  documentation: "Creates a distance matrix from multiple alignments"
  groups: "Phylogeny"
]

section: input [ info: "input Section" type: page ]
seqset: msf  [
  parameter: "Y"
  type: "gapany"
  help: "File containing a sequence alignment."
]

endsection: input

section: advanced [ info: "advanced Section" type: page ]
list: nucmethod  [
  required: "@(!$(msf.protein))"
  default: "0"
  minimum: "1"
  maximum: "1"
  header: "Multiple substitution correction methods for nucleotides"
  values: "0:Uncorrected; 1:Jukes-Cantor; 2:Kimura; 3:Tamura; 4:Tajima-Nei; 5:Jin-Nei Gamma"
  delimiter: ";"
  codedelimiter: ":"
  prompt: "Method to use"
  help: "Multiple substitution correction methods for nucleotides."
]

list: protmethod  [
  required: "$(msf.protein)"
  default: "0"
  minimum: "1"
  maximum: "1"
  header: "Multiple substitution correction methods for proteins"
  values: "0:Uncorrected; 1:Jukes-Cantor; 2:Kimura Protein;"
  delimiter: ";"
  codedelimiter: ":"
  prompt: "Method to use"
  help: "Multiple substitution correction methods for proteins."
]

bool: ambiguous  [
  optional: "@(@(@(!$(msf.protein)) & @($(nucmethod)==1)) | @($(msf.protein) & @($(protmethod)!=2)))"
  default: "N"
  information: "Use the abiguous codes in the calculation."
  help: "Option to use the abiguous codes in the calculation of the Jukes-Cantor method or if the sequences are proteins."
]

float: gapweight  [
  optional: "@(@(@($(nucmethod)<2) & @(!$(msf.protein))) | @($(msf.protein) & @($(protmethod)!=2)))"
  information: "Weight given to gaps"
  default: "0."
  help: "Option to weight gaps in the uncorrected (nucleotide) and Jukes-Cantor distance methods."
]

integer: position  [
  optional: "@(@(!$(msf.protein)) & @($(nucmethod)!=4))"
  default: "123"
  information: "Base position to analyse."
  help: "Choose base positions to analyse in each codon i.e. 123 (all bases), 12 (the first two bases), 1, 2, or 3 individual bases."
]

bool: calculatea  [
  optional: "@(@(!$(msf.protein)) & @($(nucmethod)==5))"
  default: "N"
  information: "Calculate the a-parameter"
  help: "This will force the calculation of the a-parameter in the Jin-Nei Gamma distance calculation, otherwise the default is 1.0 (see -parametera option)."
]

float: parametera  [
  optional: "@(@(!$(calculatea)) & @($(nucmethod)==5))"
  default: "1.0"
  information: "a-parameter"
  help: "User defined a parameter to be use in the Jin-Nei Gamma distance calculation. The suggested value to be used is 1.0 [Jin et al.] and this is the default."
]
endsection: advanced

section: output [ info: "output Section" type: page ]
outfile: outf  [
  parameter: "Y"
  information: "Enter a name for the distance matrix"
]

endsection: output

