application: fdiscboot [
  documentation: "Bootstrapped discrete 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 [
    parameter: "Y"
    relations: "EDAM_data:1427 Phylogenetic discrete data"
  ]

  properties: mixfile [
    additional: "Y"
    characters: ""
    information: "File of mixtures"
    nullok: "Y"
    size: "1"
    length: "$(infile.discretelength)"
    relations: "EDAM_data:1427 Phylogenetic discrete data"
  ]

  properties: ancfile [
    additional: "Y"
    characters: ""
    information: "File of ancestors"
    nullok: "Y"
    size: "1"
    length: "$(infile.discretelength)"
    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"
  ]

  properties: factorfile [
    additional: "Y"
    information: "Factors file"
    nullok: "Y"
    length: "$(infile.discretelength)"
    size: "1"
    relations: "EDAM_data:1427 Phylogenetic discrete data"
  ]

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: morphseqtype [
    additional: "@($(test) == r )"
    minimum: "1"
    maximum: "1"
    header: "Output format"
    values: "p:PHYLIP; n:NEXUS"
    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:2527 Parameter"
  ]

  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"
  ]

  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: "seqbootdisc output"
    information: "Phylip seqboot_disc program output file"
    relations:  "EDAM_data:1427 Phylogenetic discrete data"
  ]

  outfile: outancfile [
    parameter: "Y"
    knowntype: "phylip ancestor"
    extension: "ancfile"
    information: "Phylip ancestor data output file (optional)"
    nullok: "@(!$(ancfile.isdefined))"
    relations:  "EDAM_data:1427 Phylogenetic discrete data"
  ]

  outfile: outmixfile [
    parameter: "Y"
    knowntype: "phylip mix"
    extension: "mixfile"
    information: "Phylip mix data output file (optional)"
    nullok: "@(!$(mixfile.isdefined))"
    relations:  "EDAM_data:1427 Phylogenetic discrete data"
  ]

  outfile: outfactfile [
    parameter: "Y"
    extension: "factfile"
    knowntype: "phylip factor"
    information: "Phylip factor data output file (optional)"
    nullok: "@(!$(factorfile.isdefined))"
    relations:  "EDAM_data:1427 Phylogenetic discrete data"
  ]

  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
