name        "DIALIGN-TX - multiple alignment"
tip    "segment-based multiple alignment"
var "smatrix"
    type        combobox
    label       "score matrix"
    default     0
    choices
        "DNA"       "dna_matrix.scr"
var "pfile"
    type        combobox
    label       "Probability distribution file"
    default     0
    choices
        "dna_diag_prob_100_exp_110000" "dna_diag_prob_100_exp_110000"
        "dna_diag_prob_100_exp_220000" "dna_diag_prob_100_exp_220000"
        "dna_diag_prob_100_exp_330000" "dna_diag_prob_100_exp_330000"
        "dna_diag_prob_100_exp_550000" "dna_diag_prob_100_exp_550000"
        "dna_diag_prob_150_exp_110000" "dna_diag_prob_150_exp_110000"
        "dna_diag_prob_200_exp_110000" "dna_diag_prob_200_exp_110000"
        "dna_diag_prob_250_exp_110000" "dna_diag_prob_250_exp_110000"
var "lwindow"
    type        combobox
    label       "Length of a low-scoring region"
    default     4
    choices
        "0"         "0"
        "1"         "1"
        "2"         "2"
        "3"         "3"
        "4 (default)" "4"
        "5"         "5"
        "6"         "6"
        "7"         "7"
        "8"         "8"
        "9"         "9"
        "10"        "10"
var "tlength"
    type        number
    label       "Min. fragment length to allow low-scoring regions"
    min         4
    max         100
    default     40
var "sensitivity"
    type        combobox
    label       "Sensitivity"
    default     0
    choices
        "unlimited (0, default)" "0"
        "reduced sensitivity (1)" "1"
        "strongly reduced sensitivity (2)" "2"
var "fmode"
    type        chooser
    label       "Fast mode"
    default     1
    choices
        "Yes"       "-F"
        "No (default)" ""
var "where"
    type        chooser
    label       "WHERE TO SEND OUTPUT"
    default     0
    choices
        "blnalign"     "readseq -C -p -f=PEARSON %in1%.dialign |sed -e 's/^>/%/' |cut -f1 -d"" "" >%in1%.result; $RM_CMD %in1%.dialign; (blnalign %in1%.result; rm %in1%.result)&"
        "Output file" "mv %in1%.dialign %OUTNAME%.dialign; echo 'DIALIGN completed'"
var "in1"
    type        tempfile
    direction   in
    format      genbank
    save        true
var "outname"
    type        text
    label       "Output file name"
panel
    var "Run"
        type        button
        label       "Run"
        shell       "(tr ""~"" ""-"" <%in1% | readseq -a -p -f=PEARSON | sed ""s/\*//"" > %in1%.fsa; $RM_CMD %in1%; dialign-tx -d2 -m%SMATRIX% -p%PFILE% -n%LWINDOW% -g%TLENGTH% %FMODE% $BIRCH/dat/dialign/conf %in1%.fsa %in1%.dialign; $RM_CMD %in1%.fsa; %WHERE%)&"
        close       true
    var "Help"
        type        button
        label       "Help"
        shell       "$BIRCH/script/chooseviewer.py $BIRCH/doc/dialign/dialign.help"
        close       false
