1 | /* |
---|
2 | * tridist.h Adachi, J. 1995.09.22 |
---|
3 | * Copyright (C) 1993-1995 J. Adachi & M. Hasegawa, All rights reserved. |
---|
4 | */ |
---|
5 | |
---|
6 | #include "molphy.h" |
---|
7 | #include "matrixut.h" |
---|
8 | |
---|
9 | #define UPPERLIMIT 500.0 /* upper limit on branch length (subsutitutions) */ |
---|
10 | #define LOWERLIMIT 0.001 /* lower limit on branch length (subsutitutions) */ |
---|
11 | #define EPSILON 0.001 |
---|
12 | #define MAXCOLUMN 80 |
---|
13 | #define BUFLINE 512 |
---|
14 | #define MAXOVER 50 |
---|
15 | #define MAXLENG 30 |
---|
16 | #define NMLNGTH 10 /* max. num. of characters in species name with S or I */ |
---|
17 | #define SWITCHES "Hhilm:o:St:T:uvwzZ" |
---|
18 | #define VERSION "1.2.5" |
---|
19 | #define DATE "Oct 30 1995" |
---|
20 | |
---|
21 | #define TREEFEXT ".tre" |
---|
22 | #define EPSFILEEXT ".eps" |
---|
23 | #define TPLGYFEXT ".tpl" |
---|
24 | #ifdef NJ |
---|
25 | #define TPLGYFILE "njdist.tpl" |
---|
26 | #define EPSFILE "njdist.eps" |
---|
27 | #else /* NJ */ |
---|
28 | #define TPLGYFILE "tridist.tpl" |
---|
29 | #define EPSFILE "tridist.eps" |
---|
30 | #endif /* NJ */ |
---|
31 | |
---|
32 | typedef struct node { |
---|
33 | struct node *isop; |
---|
34 | struct node *kinp; |
---|
35 | int descen; /* descendants */ |
---|
36 | int num; |
---|
37 | double length; |
---|
38 | } Node; |
---|
39 | |
---|
40 | typedef struct tree { |
---|
41 | Node *rootp; |
---|
42 | Node *firstp; |
---|
43 | Node **brnchp; |
---|
44 | double ablength; |
---|
45 | double rssleast; |
---|
46 | int npara; |
---|
47 | imatrix paths; |
---|
48 | } Tree; |
---|
49 | |
---|
50 | #ifdef MAIN_MODULE |
---|
51 | #define EXTERN |
---|
52 | #else |
---|
53 | #define EXTERN extern |
---|
54 | #endif |
---|
55 | |
---|
56 | EXTERN FILE *Epsfp; |
---|
57 | EXTERN time_t Ct0; |
---|
58 | |
---|
59 | EXTERN boolean Upgma_optn; /* u option UPGMA */ |
---|
60 | EXTERN boolean Least_optn; /* l option least squares */ |
---|
61 | EXTERN boolean Outgr_optn; /* o option */ |
---|
62 | EXTERN boolean Tfile_optn; /* T option Tree file option */ |
---|
63 | EXTERN boolean Tplgy_optn; /* t option topology file option */ |
---|
64 | EXTERN boolean Seque_optn; /* S option PHYLIP Sequential input format */ |
---|
65 | EXTERN boolean Verbs_optn; /* v option Verbose to stderr */ |
---|
66 | EXTERN boolean Info_optn; /* i option get Information */ |
---|
67 | EXTERN boolean Multi_optn; /* m option multiple data sets */ |
---|
68 | EXTERN boolean Write_optn; /* w option output more infomation */ |
---|
69 | EXTERN boolean Relia_optn; /* R option Reliability of a branch */ |
---|
70 | EXTERN boolean Debug_optn; /* z option output debug data */ |
---|
71 | EXTERN boolean Debug; /* Z option output more debug data */ |
---|
72 | |
---|
73 | EXTERN char *Epsfile; |
---|
74 | EXTERN char *Prog_name; |
---|
75 | EXTERN char *Comment; |
---|
76 | EXTERN int Numspc; |
---|
77 | EXTERN int Numtree; |
---|
78 | EXTERN int Cnotree; |
---|
79 | EXTERN int Maxbrnch; |
---|
80 | EXTERN int Numbrnch; |
---|
81 | EXTERN int Numpair; |
---|
82 | EXTERN int Numexe; /* number of executes */ |
---|
83 | EXTERN int Cnoexe; /* curent numbering of executes */ |
---|
84 | EXTERN int Outgroup; |
---|
85 | EXTERN double Proportion; |
---|
86 | |
---|
87 | EXTERN Tree *Ctree; |
---|
88 | EXTERN char **Identif; |
---|
89 | EXTERN char **Sciname; |
---|
90 | EXTERN char **Engname; |
---|
91 | EXTERN dmatrix Distanmat; |
---|
92 | EXTERN dvector Distanvec; |
---|
93 | EXTERN dvector Lengths; |
---|
94 | EXTERN dmatrix Reliprob; |
---|