Skip to main content


Project description


FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed Models, is a program for performing both single-SNP and SNP-set genome-wide association studies (GWAS) on extremely large data sets. This release contains the improvements described in Widmer _et al._, _Scientific Reports_ 2014, and tests for epistasis.

Our documentation (including live examples) is also available as ipython notebooks:

* Main Functions:
* Heritability with Spatial Correction (described in Heckerman _et al._, _PNAS_ 2016):

Additionally, API documentation is available:

A C++ version, which is generally less functional, is available at

Quick install:

If you have pip installed, installation is as easy as:

pip install fastlmm

Detailed Package Install Instructions:

fastlmm has the following dependencies:

python 2.7


* numpy
* scipy
* matplotlib
* pandas
* scikit.learn (sklearn)
* cython
* pysnptools
* optional: [statsmodels -- install only required for logistic-based tests, not the standard linear LRT]

(1) Installation of dependent packages

We highly recommend using a python distribution such as
Anaconda (
or Enthought (
Both these distributions can be used on linux and Windows, are free
for non-commercial use, and optionally include an MKL-compiled distribution
for optimal speed. This is the easiest way to get all the required package

(2) Installing from source

Go to the directory where you copied the source code for fastlmm.

On linux:

At the shell, type:

sudo python install

On Windows:

At the OS command prompt, type

python install

For developers (and also to run regression tests)

When working on the developer version, first add the src directory of the package to your PYTHONPATH
environment variable.

For building C-extensions, first make sure all of the above dependencies are installed (including cython)

To build extension (from .\src dir), type the following at the OS prompt:

python build_ext --inplace

Note, if this fails with a gcc permission denied error, then specifying the correct compiler will
likely fix the problem, e.g.

python build_ext --inplace --compiler=msvc

Don't forget to set your PYTHONPATH to point to the directory above the one named fastlmm in
the fastlmm source code. For e.g. if fastlmm is in the [somedir] directory, then
in the unix shell use:


Or in the Windows DOS terminal,
one can use:


(or use the Windows GUI for env variables).

Note for Windows: You must have Visual Studio installed. If you have VisualStudio2008 installed
(which was used to build python2.7) you need to nothing more. Otherwise, follow these instructions:

If you have Visual Studio 2010 installed, execute:


or with Visual Studio 2012 installed:


or with Visual Studio 2013 installed:


or with Visual Studio 2015 installed:


or with Visual Studio 2017 installed:


Running regression tests

From the directory tests at the top level, run:


This will run a
series of regression tests, reporting "." for each one that passes, "F" for each
one that does not match up, and "E" for any which produce a run-time error. After
they have all run, you should see the string "............" indicating that they
all passed, or if they did not, something such as "....F...E......", after which
you can see the specific errors.

Note that you must use "python build_ext --inplace" to run the
regression tests, and not "python install".

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
fastlmm-0.2.32.tar.gz (15.4 MB) Copy SHA256 hash SHA256 Source None (15.9 MB) Copy SHA256 hash SHA256 Windows Installer 2.7

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page