I would like to compute the relative synonymous codon usage (RSCU) from coding sequence alignments. But since the coding sequences from an alignment are not independent realization, the statistics (RSCU) need to account for the phylogenetics autocorrelation present in the data. How can I do that?
It looks like you want to test a very specific hypothesis. Wether a sequence accumulates more non-synonymous changes than expected given its phylogenetic backgroun. The programme CODEML, included in the package PAML was designed specifically for this: