name        "ALIGN - Rigorous global alignment"
icon    "$BIRCH/dat/fasta/FASTAlogo.png"
tip    "pairwise global sequence alignment"
var "in1"
    type        tempfile
    direction   in
    format      fasta
    save        false
var "program"
    type        chooser
    label       "Penalize gaps at ends of sequence?"
    default     0
    choices
        "NO"        "align0"
        "YES"       "align"
var "matrix"
    type        combobox
    label       "SCORING MATRIX"
    default     0
    choices
        "Default (Blosum50)" ""
        "PAM120 (Protein)" "-s $BIRCH/dat/fasta2/pam120.mat"
        "PAM250 (Protein)" "-s $BIRCH/dat/fasta2/pam250.mat"
        "PAM250, Gonnet et al. (Protein)" "-s $BIRCH/dat/fasta2/gonnet.mat"
        "Genetic Code Matrix (Protein)" "-s $BIRCH/dat/fasta2/codaa.mat"
        "Weight Diagonals Only (Protein)" "-s $BIRCH/dat/fasta2/altdiag.mat"
        "Lipman Alt.Matrix (Protein)" "-s $BIRCH/dat/fasta2/altprot.mat"
        "Identity Matrix (Protein)" "-s $BIRCH/dat/fasta2/idnaa.mat"
        "Weighted Identity Matrix (Protein)" "-s $BIRCH/dat/fasta2/idpaa.mat"
var "markx"
    type        combobox
    label       "DISPLAY"
    default     0
    choices
        "Identity=""colon"" Cons. repl.=""."" Mismatch="" """ "-m 0"
        "Identity="" "" Cons. repl.=""x"" Mismatch=""X""" "-m 1"
        "Print only 1st seq; Identity=""."" Mismatch=""residue""" "-m 2"
        "graph of conserved positions" "-m 4"
var "resperline"
    type        number
    label       "aa's printed per line"
    min         40
    max         200
    default     60
panel
    var "Run"
        type        button
        label       "Run"
        shell       "seqkit range -r 1:1 %in1% -o %in1%.seq1; seqkit range -r 2:2 %in1% -o %in1%.seq2; %PROGRAM% -w %RESPERLINE% %MARKX% %MATRIX% %in1%.seq1 %in1%.seq2 > %in1%.out; $BIRCH/script/chooseviewer.py %in1%.out; rm %in1%*"
        close       true
    var "Help"
        type        button
        label       "Help"
        shell       "$BIRCH/script/chooseviewer.py $BIRCH/doc/fasta/align.txt"
        close       false
