Gota Morota
2/23/16
Additive genomic relationship
\[ \begin{align} \hat{r} &= 2 \times \frac{\sum^m_{k=1} \sum^2_{ki} \frac{f_{M_{ki}} - p^{2}_{ki}}{p_{ki}}}{ m } \end{align} \] where \( f_{M_{ki}} \) is the molecular coancestry contributed by allele \( i \) at the \( k\text{th} \) locus, \( p_i \) is the frequency of allele \( i \), and \( m \) is the total number of SNPs.
\[ \begin{align*} \hat{r} &= 2 \times \frac{\sum^m_{k=1} \frac{\sum^2_{i=1} \sum^2_{j=1} I_{k,ij}}{4}}{m} \end{align*} \] where \( \frac{\sum^2_{i=1} \sum^2_{j=1} I_{k,ij}}{4} \) is the molecular similarity between two individuals at the \( k\text{th} \) locus.
\[ \begin{align*} \mathbf{G} = \frac{\mathbf{X_cX_c}^T }{2 \sum p_k(1-p_k)} \end{align*} \] where \( \mathbf{X_c} \) is the centered genotype matrix and \( p_k \) is the frequency of reference allele at the \( k\text{th} \) locus.
\[ \begin{align*} \mathbf{G} = \frac{\mathbf{X_{cs}X^{'}_{cs}} }{m} \\ \end{align*} \] where \( \mathbf{X_cs} \) is the centered and scaled genotype matrix, and \( m \) is the number of SNPs.
Alternatively, \[ \begin{align*} \mathbf{G = X_cDX_c'} \end{align*} \] where \( \mathbf{D} \) is diagonal with \( d_{ii} = 1/(m[2p_k (1 - p_k) ]) \).
Or \[ \begin{align*} G_{ij} &= \frac{1}{m} \sum^m_{k=1} \frac{(x_{ik} - 2p_k)(x_{jk} - 2p_k) }{ 2p_k (1 - p_k)} \end{align*} \]