PyLMM - A lightweight linear mixed-model solver

PyLMM is a fast and lightweight linear mixed-model (LMM) solver for use in genome-wide association studies (GWAS).

PyLMM has a standalone program for running association studies called pylmmGWAS. It can also be used as a python module to build your own custom programs. If you want to create your own code, look at for some basic usage patterns. If you want to run basic GWAS analysis, the command below, which uses example data might be a helpful guide.

An Example Command:

python -v --bfile data/snps.132k.clean.noX --kfile data/snps.132k.clean.noX.pylmm.kin
        --phenofile data/snps.132k.clean.noX.fake.phenos

The GWAS program reads PLINK formated input files (BED or TPED only). There is also an option to use “EMMA” formatted files. We included this in order to make it easier for people using EMMA currently to try pylmm. The kinship matrix file can be calculated using which also takes PLINK or EMMA files as input. The kinship matrix output is just a plain text file and follows the same format as that used by EMMA, so that you can use pre-computed kinship matrices from EMMA as well, or any other program for that matter.


There are three repositories for pylmm. The official release version is This version is updated very rarely and can be thought of as an official software release. A more frequently updated version is which is the official development version from our lab. The most frequently updated version is the experimental version of pylmm developed by Michael Bilow who is currently a primary developer of pylmm which is available at If you are requesting features and changes to pylmm or are using experimental new methods then you want to use the experimental version. Replace the repository in the command lines below to use the correct version.

In order to install pylmm, you will need to have numpy and scipy installed on your current system. You can install pylmm using pip by doing the following:

   pip install git+

This should make the module pylmm available as well as the two scripts and

You can also clone the repository and do a manual install.

   git clone
   python install