application: fproml [
  documentation: "Protein phylogeny by maximum likelihood"
  groups: "Phylogeny:Molecular sequence"
  embassy: "phylipnew"
]

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

  seqsetall: sequence [
    parameter: "Y"
    type: "gapproteinphylo"
    aligned: "Y"
    help: "File containing one or more sequence alignments"
  ]

  tree: intreefile [
    parameter: "Y"
    nullok: "Y"
    knowntype: "newick"
    information: "Phylip tree file (optional)"
  ]

  integer: ncategories [
    additional: "Y"
    default: "1"
    minimum: "1"
    maximum: "9"
    information: "Number of substitution rate categories"
  ]

  array: rate [
    additional: "@($(ncategories) > 1)"
    information: "Rate for each category"
    size: "$(ncategories)"
    sumtest: "N"
  ]

  properties: categories [
    additional: "@($(ncategories) > 1)"
    characters: "1-$(ncategories)"
    information: "File of substitution rate categories"
    nullok: "@($(ncategories) == 1)"
    size: "1"
    length: "$(sequence.length)"
  ]

  properties: weights [
    additional: "Y"
    characters: "01"
    information: "Weights file"
    help: "Weights file"
    length: "$(sequence.length)"
    size: "@(@($(sequence.multicount)>1) ? 1:0)"
    nullok: "Y"
  ]

endsection: input

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

  boolean: lengths [
    additional: "$(intreefile.isdefined)"
    default: "N"
    information: "Use branch lengths from user trees"
  ]

  list: model [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Probability model"
    values: "j:Jones-Taylor-Thornton; h:Henikoff/Tillier PMBs;
             d:Dayhoff PAM"
    information: "Probability model for amino acid change"
    default: "Jones-Taylor-Thornton"
  ]

  list: gamma [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Rate variation among sites"
    values: "g:Gamma distributed rates; i:Gamma+invariant sites;
             h:User defined HMM of rates; n:Constant rate"
    information: "Rate variation among sites"
    default: "Constant rate"
  ]

  float: gammacoefficient [
    additional: "@($(gamma)==g)"
    information: "Coefficient of variation of substitution rate
                  among sites"
    minimum: "0.001"
    default: "1"
  ]

  integer: ngammacat [
    additional: "@($(gamma)==g)"
    minimum: "1"
    maximum: "9"
    default: "1"
    information: "Number of categories (1-9)"
  ]

  float: invarcoefficient [
    additional: "@($(gamma)==i)"
    information: "Coefficient of variation of substitution rate
                  among sites"
    minimum: "0.001"
    default: "1"
  ]

  integer: ninvarcat [
    additional: "@($(gamma)==i)"
    minimum: "1"
    maximum: "9"
    default: "1"
    information: "Number of categories (1-9) including one for
                  invariant sites"
  ]

  float: invarfrac [
    additional: "@($(gamma)==i)"
    information: "Fraction of invariant sites"
    default: "0.0"
    minimum: "0.0"
    maximum: "0.9999"
  ]

  integer: nhmmcategories [
    additional: "@($(gamma)==h)"
    default: "1"
    minimum: "1"
    maximum: "9"
    information: "Number of HMM rate categories"
  ]

  array: hmmrates [
    additional: "@($(nhmmcategories) > 1)"
    information: "HMM category rates"
    default: "1.0"
    minimum: "0.0"
    size: "$(nhmmcategories)"
    sumtest: "N"
  ]

  array: hmmprobabilities [
    additional: "@($(nhmmcategories) > 1)"
    information: "Probability for each HMM category"
    default: "1.0"
    minimum: "0.0"
    maximum: "1.0"
    size: "$(nhmmcategories)"
    sum: "1.0"
  ]

  boolean: adjsite [
    additional: "@($(gamma)!=n)"
    default: "N"
    information: "Rates at adjacent sites correlated"
  ]

  float: lambda [
    additional: "$(adjsite)"
    default: "1.0"
    information: "Mean block length of sites having the same
                  rate"
    minimum: "1.0"
  ]

  integer: njumble [
    additional: "@(!$(intreefile.isdefined))"
    default: "0"
    minimum: "0"
    information: "Number of times to randomise, choose 0 if you
                  don't want to randomise"
  ]

  integer: seed [
    additional: "$(njumble)"
    information: "Random number seed between 1 and 32767 (must
                  be odd)"
    minimum: "1"
    maximum: "32767"
    default: "1"
  ]

  boolean: global [
    additional: "@(!$(intreefile.isdefined))"
    default: "N"
    information: "Global rearrangements"
  ]

  integer: outgrno [
    additional: "Y"
    minimum: "0"
    maximum: "$(sequence.count)"
    default: "0"
    information: "Species number to use as outgroup"
  ]

  boolean: rough [
    additional: "Y"
    default: "Y"
    information: "Speedier but rougher analysis"
  ]

endsection: additional

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

  outfile: outfile [
    parameter: "Y"
    knowntype: "proml output"
    information: "Phylip proml program output file"
  ]

  toggle: trout [
    additional: "Y"
    default: "Y"
    information: "Write out trees to tree file"
  ]

  outfile: outtreefile [
    additional: "$(trout)"
    extension: "treefile"
    information: "Phylip tree output file (optional)"
    knowntype: "newick tree"
    nullok: "Y"
  ]

  boolean: printdata [
    additional: "Y"
    default: "N"
    information: "Print data at start of run"
  ]

  boolean: progress [
    additional: "Y"
    default: "Y"
    information: "Print indications of progress of run"
  ]

  boolean: treeprint [
    additional: "Y"
    default: "Y"
    information: "Print out tree"
  ]

  boolean: hypstate [
    additional: "Y"
    default: "N"
    information: "Reconstruct hypothetical sequence"
  ]

endsection: output
