#include #include #include #include #include #include #include "clustalw.h" /* * Prototypes */ static sint calc_weight(IN_TREEPTR itree,sint leaf); /* * Global variables */ static sint debug; sint * calc_seq_weights(sint fseq, sint nseq, IN_TREEPTR itree,Boolean no_weights) { sint i; sint temp, sum, *weight; sint *sweight; sweight = (sint *)ckalloc((nseq+1) * sizeof(sint)); /* If there are more than three sequences.... */ if ((nseq >= 2) && (itree->distance_tree == TRUE) && (no_weights==FALSE)) { /* Calculate sequence weights based on Phylip tree. */ weight = (sint *)ckalloc((nseq+1) * sizeof(sint)); for (i=fseq; ileafptr[leaf]; while (p->parent != NULL) { weight += p->dist / p->order; p = p->parent; } weight *= 100.0; return((sint)weight); }