gl.grm.network() threshold setting

300 views
Skip to first unread message

Evan Hersh

unread,
Jul 6, 2022, 1:20:55 PM7/6/22
to dartR
Hello genomics experts!

I am using gl.grm() and gl.grm.network() to compare and validate some kinship/relatedness estimates I calculated from KING software, and I had some questions about how to pick the appropriate 'relatedness_factor' cutoff in gl.grm.network(). The default value of 0.25 identifies all of the first degree kin identified by KING, but none of the 2nd or 3rd degree relationships.

I've read the help page for the function which states "...ultimately, this decision is made as a matter of trial and error. One way to approach this trial and error is to try to achieve a sparse set of links between unrelated 'background' individuals so that the stronger links are preferentially shown." This sounds rather arbitrary and I'm not exactly sure what this means or how to implement this in practice. I've also read the paper by Goudet et al 2018 and didn't find too much insight in regards to choosing relatedness cutoffs. Does anyone have any experience with this function that may provide some insight?

Thanks!

Evan

Jose Luis Mijangos

unread,
Jul 7, 2022, 9:01:34 PM7/7/22
to dartR

Hi Evan,

The gl.grm.network function takes a genomic relationship matrix (GRM) generated by the gl.grm function to represent the relationship among individuals in the dataset as a network diagram. To generate the GRM, the function gl.grm uses the function A.mat from package rrBLUP, which implements the approach developed by Endelman and Jannink (2012).

The GRM is an estimate of the proportion of alleles that two individuals have in common. It is generated by estimating the covariance of the genotypes between two individuals, i.e. how much genotypes in the two individuals correspond with each other. This covariance depends on the probability that alleles at a random locus are identical by state (IBS). Two alleles are IBS if they represent the same allele. Two alleles are identical by descent (IBD) if one is a physical copy of the other or if they are both physical copies of the same ancestral allele. Note that IBD is complicated to determine. IBD implies IBS, but not conversely. However, as the number of SNPs in a dataset increases, the mean probability of IBS approaches the mean probability of IBD.

It follows that the off-diagonal elements of the GRM are two times the kinship coefficient, i.e. the probability that two alleles at a random locus drawn from two individuals are IBD. Additionally, the diagonal elements of the GRM are 1+f, where f is the inbreeding coefficient of each individual, i.e. the probability that the two alleles at a random locus are IBD.

Choosing a meaningful threshold to represent the relationship between individuals is tricky because IBD is not an absolute state but is relative to a reference population for which there is generally little information so that we can estimate the kinship of a pair of individuals only relative to some other quantity. To deal with this, we can use the average inbreeding coefficient of the diagonal elements as the reference value. For this, the function subtracts 1 from the mean of the diagonal elements of the GRM. In a second step, the off-diagonal elements are divided by 2, and finally, the mean of the diagonal elements is subtracted from each off-diagonal element after dividing them by 2. This approach is similar to the one used by Goudet et al. (2018).

Below is a table modified from Speed & Balding (2015) showing kinship values, and their confidence intervals (CI), for different relationships that could be used to guide the choosing of the relatedness threshold in the function.

Relationship                                                   Kinship            95% CI

Identical twins/clones/same individual          0.5                   -

Sibling/Parent-Offspring                                 0.25                 (0.204, 0.296)

Half-sibling                                                      0.125               (0.092, 0.158)

First cousin                                                      0.062               (0.038, 0.089)

Half-cousin                                                      0.031               (0.012, 0.055)

Second cousin                                                 0.016               (0.004, 0.031)

Half-second cousin                                         0.008               (0.001, 0.020)

Third cousin                                                    0.004               (0.000, 0.012)

Unrelated                                                        0                      -

I added this Information in the function documentation, which is available in the developing version of dartR. You can install this version by typing in the R console:

> gl.install.vanilla.dartR(flavour = "dev")

Speed, D., & Balding, D. J. (2015). Relatedness in the post-genomic era: is it still useful?. Nature Reviews Genetics, 16(1), 33-44

Endelman, J. B. , Jannink, J.-L. (2012). Shrinkage estimation of the realized relationship matrix. G3: Genes, Genomics, Genetics 2, 1405.

Goudet, J., Kay, T., & Weir, B. S. (2018). How to estimate kinship. Molecular Ecology, 27(20), 4121-4135.

              

Cheers,

Luis

Reply all
Reply to author
Forward
0 new messages