This page explains how to perform two of the simplest analyses in LDAK. There are five steps, please follow them in order. Note that it is easiest to run LDAK on Linux and Mac computers (see this page if you would like to instead Run LDAK on Windows).
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 1 - Download the LDAK Executable
The LDAK software is hosted on GitHub. If you are a first-time user, please enter your name and email in the boxes below, and press Send. You will then be redirected to the LDAK GitHub page. Please be aware that your details will be added to the LDAK Mailing List, which I use to inform LDAK users of updates (currently, I send email to this list less than once per year). If you would prefer not to provide your details, you can instead click the link under the boxes.
After completing this step, you should have a file called either ldak6.3.linux or ldak6.3.mac. Once you have downloaded LDAK, please return to this page.
Click here if you prefer not to provide your details (or if the above form does not work).
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 2 - Open a Unix Shell and Run the Executable
LDAK is designed to be run in a "Unix shell", which you can create by launching a program called "Terminal". If using Linux, you can find this program in Applications / System Tools, while if using a Mac, the program is in Finder / Application / Utilities. Once launched, you should have a window that looks similar to the picture below.

Note that Unix shells are text-based, so you will need to either type or paste in commands (it is normally possible to paste text using either Control+V, Control+Shift+V or by right-clicking). Be aware that you can view and edit previous commands using the arrow buttons (e.g., pressing the arrow button once will show the most recent command, while pressing twice will show the second most recent command, etc).
Having opened a Unix shell, you should first use the command "cd" to navigate to the directory where you saved the LDAK executable. For example, if you downloaded the executable to the directory /home/doug/Downloads, you can navigate to this directory by typing
cd /home/doug/Downloads
You can check you are in the correct directory by typing
pwd
and that you can see the LDAK executable when you type
ls

You can now try to run LDAK. If using the Linux executable, you can type
./ldak6.3.linux
while if using the Mac executable, you can type
./ldak6.3.mac
If successful, LDAK will run and print out a welcome message (the picture below shows the top of this message)

If LDAK does not run, and you instead get a message similar to
bash: ./ldak6.3.linux: No such file or directory
this means that the Unix shell can not find the LDAK executable. You should make sure you have downloaded the LDAK executable (i.e., completed Step 1), and that you are in the correct directory (i.e., followed the instructions at the start of this Step).
If LDAK does not run, and you instead get a message similar to
bash: ./ldak6.3.linux: Permission denied
then you should first make the file executable. If using the Linux executable, you can type
chmod a+x ldak6.3.linux
while if using the Mac executable, you can type
chmod a+x ldak6.3.mac
Note that you may first have to allow your computer to execute non-Apple software. You can do this by opening "System Settings", then clicking on "Privacy & Security", followed by "Developer Tools", and ticking the box that allows apps downloaded from "Anywhere".
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 3 - Download the Test Datasets
Click here to download the file data.zip. Note that this file contains the datasets provided at Test Datasets, that are used in the examples throughout this website.
You should decompress the file (if using a Mac, this might have been done automatically), and ensure its contents are in the same directory as the LDAK executable.
If you return to the Unix shell and type
ls
you should now see both the LDAK executable and the data files
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 4 - Calculate Statistics
For the first analysis, we will use the files human.bed, human.bim and human.fam, which contains genotypes for 424 individuals and 3289 SNPs (obtained from the 1000 Genome Project).
If using Linux, you should type (or copy and paste) the following in the Unix shell
./ldak6.3.linux --calc-stats human --bfile human
If using a Mac, you should instead type
./ldak6.3.mac --calc-stats human --bfile human
This analysis should complete within seconds, and produce the following screen output

As explained in the screen output, LDAK has calculated statistics for the genotype data (e.g., the computed allele frequencies and call-rates of SNPs, and the missing rate for individuals), and saved the results in the files human.stats and human.missing. We can view the top rows of these two files by typing
head human.stats human.missing

For more details of this analysis, see Calculate Statistics.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 5 - Classical Linear Regression
For the second analysis, we will use the genotypes stored in the files human.bed, human.bim and human.fam, as well as the (fake) continuous phenotypes in quant.pheno.
If using Linux, you should type the following in the Unix shell
./ldak6.3.linux --linear human --bfile human --pheno quant.pheno
If using a Mac, you should instead type
./ldak6.3.mac --linear human --bfile human --pheno quant.pheno
This analysis should also complete within seconds, and produce the following output

As explained in the screen output, LDAK has regressed the phenotypes on the genotypes, and saved the main results in the file human.assoc. We can view the top rows of this files by typing
head human.assoc

For more details of this analysis, see Single-Predictor Analysis.
