Implementation of the Python Package of Linear Mixed Model, associated with the following paper:
LMM-Python is a python package of linear mixed model, including several popular methods used to calculate the kinship matrix, including
- with selected SNPs (LMM-select):
- with low rank structure kinship:
- with masked kinship:
- models/ main method for the package
- utility/ other helper files
- lmm.py main entry point of using the package
python lmm.py -n data/mice.plink
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
- The package currently supports CSV and binary PLINK files.
- Extensions to other data format can be easily implemented through
FileReader
inutility/dataLoadear
. Feel free to contact us for the support of other data format.
Proficient python users can directly call the method with python code, see example starting at Line 75
- 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