item:Phylip Distance Methods (Simple GUI Based Interface)
itemmeta: G
seqtype:*
itemmethod:(GOTO_LOCAL_DIR;GEN_PHYLIP(infile) && \
            RUN_IN_WINDOW(($CORRECTION_PROT;$CORRECTION_DNA;$PROGRAM_SEL;\
                           $DPGM;\
                           mv infile infile.1; \
                           mv -f outfile infile;\
                           (arb_echo $PROGRAM_FLAGS |$PROGRAM || STOP_ON_FAILURE($PROGRAM)) && \
                           $DISPLAY_FUNC));\
            RM_LOCAL_FILES(TmpInputFile infile.1))&
itemhelp:phylip_distance.help

arg:DISPLAY_FUNC
argtype:choice_menu
arglabel:What to do with the tree?
argchoice:ARB ('tree_ph_'):($CORRECTION_PROT;$CORRECTION_DNA;$PROGRAM_SEL;echo||$DPGM;arb_read_tree tree_ph_$$ outtree "PRG=$PROGRAM_NAME CORR=$TEXT FILTER=$FILTER PKG=phylip")
argchoice:TextEdit:arb_textedit outfile &
argchoice:Treetool:treetool outtree

arg:PROGRAM_SEL
arglabel:Which method?
argtype:choice_menu
argchoice:Neighbor: PROGRAM=neighbor; PROGRAM_FLAGS="y";   PROGRAM_NAME=neighbor
argchoice:UPGMA:    PROGRAM=neighbor; PROGRAM_FLAGS="n y"; PROGRAM_NAME=UPGMA
argchoice:Fitch:    PROGRAM=fitch;    PROGRAM_FLAGS="y";   PROGRAM_NAME=fitch
argchoice:Kitsch:   PROGRAM=kitsch;   PROGRAM_FLAGS="y";   PROGRAM_NAME=kitsch

arg:DPGM
arglabel:Treat data as..
argtype:choice_menu
argchoice:DNA/RNA:(arb_echo $DNAFLAGS |dnadist);TEXT=$DNATEXT
argchoice:AA:(arb_echo $PROFLAGS |protdist);TEXT=$PROTEXT

arg:CORRECTION_DNA
arglabel:Correction (DNA)
argtype:choice_menu
argchoice:F84:                DNATEXT=F84;          DNAFLAGS="y"
argchoice:Kimura 2-parameter: DNATEXT=Kimura;       DNAFLAGS="d y"
argchoice:Jukes-Cantor:       DNATEXT=Jukes-Cantor; DNAFLAGS="d d y"
// the following options cause crash with all distance programs:
// argchoice:LogDet:             DNATEXT=LogDet;       DNAFLAGS="d d d y"
// argchoice:Manual:             DNATEXT=User;         DNAFLAGS=""

arg:CORRECTION_PROT
arglabel:Correction (PROT)
argtype:choice_menu
argchoice:Jones-Taylor-Thornton:  PROTEXT=JTT;     PROFLAGS="y"
argchoice:Dayhoff PAM matrix:     PROTEXT=Dayhoff; PROFLAGS="p y"
argchoice:Kimura formula:         PROTEXT=Kimura;  PROFLAGS="p p y"
argchoice:Manual:                 PROTEXT=User;    PROFLAGS=""

in:TmpInputFile
informat:genbank
insave:

// --------------------------------------------------------------------------------

item:Phylip Distance Matrix
itemmeta: M
seqtype:*
itemmethod: GOTO_LOCAL_DIR;GEN_PHYLIP(infile) && \
            RUN_IN_WINDOW(( $PREEDIT  \
                            $DPGM ; \
                            arb_textedit outfile & )) ; \
            RM_LOCAL_FILES(TmpInputFile)
itemhelp:phylip_distance.help

arg:DPGM
arglabel:Treat data as..
argtype:choice_menu
argchoice:DNA/RNA:dnadist
argchoice:AA:protdist

arg:PREEDIT
argtype:choice_menu
arglabel:Edit input before running?
argchoice:No:
argchoice:Yes:arb_textedit infile ;

in:TmpInputFile
informat:genbank
insave:

