application: fneighbor [
  documentation: "Phylogenies from distance matrix by N-J or
                  UPGMA method"
  groups: "Phylogeny:Distance matrix"
  gui: "yes"
  batch: "yes"
  cpu: "high"
  embassy: "phylipnew"
  relations: "EDAM_topic:0084 Phylogenetics"
  relations: "EDAM_operation:0546 Phylogenetic tree construction (minimum distance methods)"
]

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

  distances: datafile [
    parameter: "Y"
    knowntype: "distance matrix"
    information: "Phylip distance matrix file"
    relations:  "EDAM_data:0870 Sequence distance matrix"
  ]

endsection: input

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

  list: matrixtype [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Matrix type"
    values: "s:Square; u:Upper triangular; l:Lower triangular"
    information: "Type of data matrix"
    default: "s"
    relations: "EDAM_data:2527 Parameter"
  ]

  list: treetype [
    additional: "Y"
    minimum: "1"
    maximum: "1"
    header: "Tree type"
    values: "n:Neighbor-joining; u:UPGMA"
    information: "Neighbor-joining or UPGMA tree"
    default: "n"
    relations: "EDAM_data:2527 Parameter"
  ]

  integer: outgrno [
    additional: "@($(treetype)==n)"
    minimum: "0"
    maximum: "$(datafile.distancesize)"
    failrange: "N"
    trueminimum: "Y"
    default: "0"
    information: "Species number to use as outgroup"
    relations: "EDAM_data:2527 Parameter"
  ]

  toggle: jumble [
    additional: "Y"
    default: "N"
    information: "Randomise input order of species"
    relations: "EDAM_data:2527 Parameter"
  ]

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

  boolean: replicates [
    additional: "Y"
    default: "N"
    information: "Subreplicates"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: additional

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

  outfile: outfile [
    parameter: "Y"
    knowntype: "neighbor output"
    information: "Phylip neighbor program output file"
    relations:  "EDAM_data:0872 Phylogenetic tree"
  ]

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

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

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

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

  boolean: treeprint [
    additional: "Y"
    default: "Y"
    information: "Print out tree"
    relations: "EDAM_data:2527 Parameter"
  ]

endsection: output
