computing relative synonymous codon usage from a coding sequence alignment while accounting for phylogenetic inertia?
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:

http://evomics.org/learning/phylogenetics/paml/