application: frestboot [
  documentation: "Bootstrapped restriction sites algorithm"
  groups: "Phylogeny:Molecular sequence"
  embassy: "phylipnew"
  relations:  "EDAM_topic:0084 Phylogenetics"
  relations:  "EDAM_operation:0552 Phylogenetic tree bootstrapping"
]

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

  discretestates: infile [
    characters: "01+-?"
    parameter: "Y"
    help: "File containing one or more sets of restriction data"
    relations: "EDAM_data:1427 Phylogenetic discrete data"
  ]

  properties: weights [
    additional: "Y"
    characters: "01"
    information: "Weights file"
    help: "Weights file"
    length: "$(infile.discretelength)"
    nullok: "Y"
    relations: "EDAM_data:2994 Phylogenetic character weights"
  ]

endsection: input

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

  list: test [
    additional: "y"
    minimum: "1"
    maximum: "1"
    header: "Test"
    values: "b:Bootstrap; j:Jackknife; c:Permute species for each
             character; o:Permute character order; s:Permute within species;
             r:Rewrite data"
    information: "Choose test"
    default: "b"
    relations: "EDAM_data:2527 Parameter"
  ]

  toggle: regular [
    additional: "@( $(test) == { b | j } )"
    information: "Altered sampling fraction"
    default: "N"
    relations: "EDAM_data:2527 Parameter"
  ]

  float: fracsample [
    additional: "@(!$(regular))"
    information: "Samples as percentage of sites"
    default: "100.0"
    minimum: "0.1"
    maximum: "100.0"
    relations: "EDAM_data:2527 Parameter"
  ]

  list: rewriteformat [
    additional: "@($(test)==r)"
    minimum: "1"
    maximum: "1"
    header: "test"
    values: "p:PHYLIP; n:NEXUS; x:XML"
    information: "Output format"
    default: "p"
    relations: "EDAM_identifier:2129 File format name"
  ]

  integer: blocksize [
    information: "Block size for bootstraping"
    additional: "@($(test) == b)"
    default: "1"
    minimum: "1"
    relations: "EDAM_data:1249 Sequence length"
  ]

  integer: reps [
    additional: "@($(test) != r)"
    information: "How many replicates"
    minimum: "1"
    default: "100"
    relations: "EDAM_data:2527 Parameter"
  ]

  list: justweights [
    additional: "@( $(test) == { b | j } )"
    minimum: "1"
    maximum: "1"
    header: "Write out datasets or just weights"
    values: "d:Datasets; w:Weights"
    information: "Write out datasets or just weights"
    default: "d"
    relations: "EDAM_data:2527 Parameter"
  ]

  boolean: enzymes [
    additional: "Y"
    information: "Is the number of enzymes present in input
                  file"
    default: "N"
    relations: "EDAM_data:2527 Parameter"
  ]

  integer: seed [
    additional: "@($(test) != r)"
    information: "Random number seed between 1 and 32767 (must
                  be odd)"
    minimum: "1"
    maximum: "32767"
    default: "1"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: additional

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

  outfile: outfile [
    parameter: "Y"
    knowntype: "seqbootrest output"
    information: "Phylip seqboot_rest program output file"
    relations:  "EDAM_data:2245 Sequence set (bootstrapped)"
  ]

  boolean: printdata [
    additional: "Y"
    default: "N"
    information: "Print out the data at start of run"
    relations: "EDAM_data:2527 Parameter"
  ]

  boolean: dotdiff [
    additional: "$(printdata)"
    default: "Y"
    information: "Use dot-differencing"
    relations: "EDAM_data:2527 Parameter"
  ]

  boolean: progress [
    additional: "Y"
    default: "Y"
    information: "Print indications of progress of run"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: output
