6 #include "distance_matrix.h"
12 #define PRIVATE static
14 PRIVATE void usage(void);
16 main(int argc, char *argv[])
24 short Do_Split=1, Do_Wards=0, Do_Nj=0;
26 for (i=1; i<argc; i++) {
27 if (argv[i][0]=='-') {
28 switch ( argv[i][1] ) {
29 case 'X': if (argv[i][2]=='\0') { Do_Split = 1 ; break; }
33 for(j=2;j<strlen(argv[i]);j++) {
35 case 's' : Do_Split = 1;
37 case 'w' : Do_Wards = 1;
52 while ((dm=read_distance_matrix(type))!=NULL) {
55 printf("> %s\n",type);
58 S = split_decomposition(dm);
64 U = wards_cluster(dm);
66 printf_phylogeny(U,"W");
67 PSplot_phylogeny(U,"wards.ps","Ward's Method");
71 U = neighbour_joining(dm);
72 printf_phylogeny(U,"Nj");
73 PSplot_phylogeny(U,"nj.ps","Neighbor Joining");
76 free_distance_matrix(dm);
82 PRIVATE void usage(void)
84 nrerror("usage: AnalyseDist [-X[swn]]");