About

This is a Julia implementation of option 29 of the Mendel software, originally programmed in Fortran. MendelKinship.jl contains new features, but its usage largely resembles Mendel by employing control files - requiring users to make a file to specify options instead of interacting with Julia directly. This is not the most Julian way of programming or usage experience... but unfortuantely we lack manpower to correct it.

Note

Please read our OpenMendel article which contains a section on Kinship Comparison.

When to use MendelKinship

MendelKinship.jl is capable of calculating the theoretical kinship coefficient $\Phi_{ij}$ as long as a valid pedigree structure is provided. When SNP markers are available, MendelKinship.jl can also calculate empirical kinship coefficients using GRM, robust GRM, or Method of Moments methods (see this paper and this paper for details). Here we recommend the Robust GRM or MoM (default) method because their estimates are more robust in the presence of rare alleles.

MendelKinship can optionally compare the empirical kinship and theoretical kinships to check suspect pedigree structures and reveal hidden relatedness. It can also reveal sample mixed ups or other laboratory errors that can lead to inaccurate empirical kinships. The result is saved in a table sorted in descending order. We optioanlly output 2 interactive plots that allow users to quickly pinpoint pairs with the greatest theoretical vs empirical deviance.

MendelKinship accepts PLINK binary format as input, in which case the triplets (data.bim, data.bed, data.fam) must all be present. One can import the data by specifying the following in the control file:

plink_input_basename = data

However, sometimes the .fam file contains non-unique person id (2nd column of .fam file) across different pedigrees, which is currently not permitted in MendelKinship. A person's id cannot be repeated in other pedigrees, even if it is contextually clear that they are different persons.