RelateAdmix
Brief description
This page contains information about the program called relateAdmix, which can be used to infer relatedness coefficients for pairs of individuals even if they are admixed. The program has both an R interface and a C interface. Below is a description of how to install and use each of them. To be able to infer the relatedness you will need to know the individuals admixture proportions and the allele frequencies in each of the possible populations. This can be done e.g. using the program Admixture as shown in the example of how to use the C interface.
Installation
Download
Installation of R package
wget http://www.popgen.dk/software/download/relateAdmix/relateAdmix_0.05.tar.gz R CMD INSTALL relateAdmix_0.05.tar.gz
Installation of C program
wget http://www.popgen.dk/software/download/relateAdmix/relateAdmix_0.05.tar.gz tar -xvzf relateAdmix_0.05.tar.gz cd relateAdmix/src/ mv CPP_Makefile Makefile make
Run example
Run example using R
After installing the package you can load it into R and try the example
library(relateAdmix) example(relate)
This shows an example of how to use the package. More information can be found in the man pages
?relate
Run example using C
After installing the program you can try running it on the example data set in the data folder, which consists of 50 individuals that are admixed from 2 source populations.
If you are in the src folder where you installed relateAdmix and you have the software Admixture installed this can be done as follows:
cd ../data # First run Admixture to produce population specific allele frequencies (smallPlink.2.P) # and individual ancestry proportions (smallPlink.2.Q). # (note other programs can also be used, e.g. Structure and FRAPPE) admixture smallPlink.bed 2 # Then run relateAdmix ../src/relateAdmix -plink smallPlink -f smallPlink.2.P -q smallPlink.2.Q -P 20