Debian Codegraph @

scripts/ae2dnaml

raw
1 #! /bin/sh
2 #
3 # ae2dnaml ae2_file_name [ "dnaml_opt1 | dnaml_opt2 | ..." ]
4 #
5 temp_file="$1.$$.phy"
6 stdopt="quickadd | treefile | frequencies"
7
8 if test $# -eq 1; then
9 opts=$stdopt;
10 elif test $# -eq 2; then
11 if test -n "$2"; then opts="$stdopt | $2"
12 else opts="$stdopt"
13 fi
14 else
15 comm=`echo $0 | sed -e 's&^.*/&&g'`
16 optprm="[ "'"'"dnaml_opt1 [ | dnaml_opt2 [...]]"'"'" ]"
17 echo "
18
19 Usage: $comm ae2_file $optprm
20
21 Quickadd, frequencies and treefile are included by the script and should
22 not be specified by the user. Additional fastDNAml program options are
23 enclosed in quotes, and separated by vertical bars (|).
24 "
25 exit
26 fi
27
28 convp -ae2 "$1" -phylip "$temp_file"
29 echo "Working on tree"
30
31 id=`eval "cat < $temp_file | $opts | out.PID -o $1 fastDNAml"`
32
33 rm -f "$temp_file" checkpoint.$id
34 mv treefile.$id $1.tree
35 #treetool2 $1.tree