Skip to content

HaohanWang/LMM-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmm-python

LMM-Python

Implementation of the Python Package of Linear Mixed Model, associated with the following paper:

Wang, Haohan, Bryon Aragam, and Eric P. Xing. "Trade-offs of Linear Mixed Models in Genome-Wide Association Studies." Journal of Computational Biology 29.3 (2022): 233-242.

Introduction

LMM-Python is a python package of linear mixed model, including several popular methods used to calculate the kinship matrix, including

File Structure:

  • models/ main method for the package
  • utility/ other helper files
  • lmm.py main entry point of using the package

An Example Command:

python lmm.py -n data/mice.plink

Instructions

  Options:
  -h, --help          show this help message and exit

  Data Options:
    -f FILETYPE       choices of input file type
    -n FILENAME       name of the input file

  Model Options:
    -s                Construct kinship matrix with selected SNPs
    -l                Construct kinship matrix with low rank structure
    -t THRESHOLD      Construct kinship matrix with smaller values masked (smaller than the specificed THRESHOLD)
    -q                Run in quiet mode
    -m                Run without missing genotype imputation
    -p                Generate a simple Manhattan plot after running

Data Support

  • The package currently supports CSV and binary PLINK files.
  • Extensions to other data format can be easily implemented through FileReader in utility/dataLoadear. Feel free to contact us for the support of other data format.

Python Users

Proficient python users can directly call the method with python code, see example starting at Line 75

Installation (Not Required)

  • Dependencies:
    • numpy
    • scipy
    • pysnptool
    • matplotlib

You can install LMM-Python using pip by doing the following

   pip install git+https://github.com/HaohanWang/LMM-Python

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

   git clone https://github.com/HaohanWang/LMM-Python
   python setup.py install

Contact

Haohan Wang · @HaohanWang

About

A python linear mixed model package model for GWAS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages