# include # include int flag_nucleotide(char x); int flag_all_nucleotides_3(char a, char b, char c); int flag_all_nucleotides_4(char a, char b, char c, char d); int topology3(char x1, char x2, char x3); int topology4(char x1, char x2, char x3, char x4); # define LINE_LENGTH 66 # define LINE_SKIP 13 # define SEGMENT_LENGTH 10 /* Dirk Husmeier Written in December 2001 Revised in August 2003 */ main() { FILE *outfile ; int i,j,k,t,iTaxa,t_TopDef; int N_taxa,N,N_TopDef; int nSegments, topo; int *topo_sequence, *topoDefSites_sequence; char strain[12]; char x[10]; char** DNA_alignment; /* Read in number of taxa */ scanf("%d %d",&N_taxa,&N); if (N_taxa!=3 && N_taxa!=4){ printf("Program can only deal with 3 or 4 taxa\n"); exit(); } /* Allocate array for DNA sequence alignment */ DNA_alignment= (char **)malloc(N_taxa*sizeof(char *)); for (i=0; i 0) { topo_sequence[t_TopDef]= topo; topoDefSites_sequence[t_TopDef]= t; t_TopDef++; } } } } /* Find and classify topology-defining sites for 4 sequences*/ if (N_taxa==4){ t_TopDef=0; for (t=0; t 0) { topo_sequence[t_TopDef]= topo; topoDefSites_sequence[t_TopDef]= t; t_TopDef++; } } } } /* Print out results to screen */ N_TopDef=t_TopDef; printf("%d \n",N_TopDef); for (t_TopDef=0; t_TopDef