The classical chi-square test for comparison of two distributions is based on the following proposition: under the null hypothesis that the corresponding samples were drawn from the same probability distribution, the variable is asymptotically chi-square distributed with Li degrees of freedom. Here we do not perform a chi-square test, but rather calculate the P-value Pijk associated with the chi-square statistic . The P-values are obtained from the chi-square probability function which is an incomplete gamma function [18]. A small value of Pijk indicates a significant difference between the codon distributions of gene j and k with respect to amino acid ai. For a number of M genes in a genome we then assemble the M × M matrix S of similarity scores with non-negative elements