name        "Gblocks - remove highly gapped or poorly conserved positions"
tip    "Selection of conserved blocks from multiple alignments for their use in phylogenetic analysis"

var "mincon"
    type        number
    label       "1. min. % sequences for a conserved posn."
    min         51
    max         100
    default     51

var "minflank"
    type        number
    label       "2. min. % sequences for flank posn."
    min         51
    max         100
    default     85

var "usematrix"
    type        chooser
    label       "     Use similarity matrices for 1 & 2?"
    default     0
    choices
        "Yes (default)"       ""
        "No"        "--b6 n"

var "maxnon"
    type        number
    label       "3. max. number of contiguous non-conserved posns."
    min         1
    max         32000
    default     8

var "minblock"
    type        number
    label       "4. min. length of a conserved block"
    min         2
    max         32000
    default     10

var "allowedgaps"
    type        combobox
    label       "5. Allowed Gap Positions"
    default     0
    choices
        "No gaps allowed in output (default)"       ""
        "Only positions with <=50% gaps included in output"        "--b5 h"
        "All gap positions may be included in output"        "--b5 a"


var "linelen"
    type        number
    label       "length of output line"
    min         50
    max         200
    default     100


var "in1"
    type        tempfile
    direction   in
    format      fasta
    save        false

panel
    var "Run"
        type        button
        label       "Run"
        shell       "Gblocks.py %in1% --type n  --b1 %MINCON% --b2 %MINFLANK%  --b3 %MAXNON% --b4 %MINBLOCK% %ALLOWEDGAPS% %USEMATRIX% --v %LINELEN%; chooseviewer.py %in1%.fsa.htm; blnalign %in1%.fsa; rm %in1%.fsa.htm %in1%.fsa "
        close       true
    var "Guide"
        type        button
        label       "User's Guide"
        shell       "$BIRCH/script/chooseviewer.py http://molevol.cmima.csic.es/castresana/Gblocks/Gblocks_documentation.html"
        close       false
