def spielman_wr(self, norm=True):
wr = []<EOL>for r in range(self.nsites):<EOL><INDENT>num = <NUM_LIT:0><EOL>den = <NUM_LIT:0><EOL>for i in range(N_CODON):<EOL><INDENT>j = scipy.intersect1d(scipy.where(CODON_SINGLEMUT[i]==True)[<NUM_LIT:0>],<EOL>scipy.where(CODON_NONSYN[i]==True)[<NUM_LIT:0>])<EOL>p_i = self.stationarystate[r][i]<EOL>P_xy = self.Prxy[r][i][j].sum()<EOL>if norm:<EOL><INDENT>P_xy = P_xy/self.omega<EOL><DEDENT>Q_xy = self.Qxy[i][j].sum()<EOL>num += (p_i * P_xy)<EOL>den += (p_i * Q_xy)<EOL><DEDENT>result = num/den<EOL>wr.append(result)<EOL><DEDENT>return wr<EOL>
Returns a list of site-specific omega values calculated from the `ExpCM`.

            Args:
                `norm` (bool)
                    If `True`, normalize the `omega_r` values by the ExpCM
                    gene-wide `omega`.

            Returns:
                `wr` (list)
                    list of `omega_r` values of length `nsites`

        Following
        `Spielman and Wilke, MBE, 32:1097-1108 <https://doi.org/10.1093/molbev/msv003>`_,
        we can predict the `dN/dS` value for each site `r`,
        :math:`\\rm{spielman}\\omega_r`, from the `ExpCM`.

        When `norm` is `False`, the `omega_r` values are defined as
        :math:`\\rm{spielman}\\omega_r = \\frac{\\sum_x \\sum_{y \\in N_x}p_{r,x}\
        P_{r,xy}}{\\sum_x \\sum_{y \\in Nx}p_{r,x}Q_{xy}}`,
        where `r,x,y`, :math:`p_{r,x}`, :math:`P_{r,xy}`, and :math:`Q_{x,y}`
        have the same definitions as in the main `ExpCM` doc string and :math:`N_{x}`
        is the set of codons which are non-synonymous to codon `x` and differ from
        `x` by one nucleotide.

        When `norm` is `True`, the `omega_r` values above are divided by the
        ExpCM `omega` value.