Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregor-mendel-institute/mtmm
A mixed-model approach for genome-wide association studies of correlated traits in structured populations
https://github.com/gregor-mendel-institute/mtmm
Last synced: 7 days ago
JSON representation
A mixed-model approach for genome-wide association studies of correlated traits in structured populations
- Host: GitHub
- URL: https://github.com/gregor-mendel-institute/mtmm
- Owner: Gregor-Mendel-Institute
- Created: 2015-03-10T14:49:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T20:00:59.000Z (over 6 years ago)
- Last Synced: 2024-03-26T21:06:39.284Z (8 months ago)
- Language: R
- Homepage: http://www.nature.com/ng/journal/v44/n9/full/ng.2376.html
- Size: 54.9 MB
- Stars: 7
- Watchers: 12
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MTMM - A mixed-model approach for genome-wide association studies of correlated traits in structured populations
## Introduction
The MTMM function as published in [Nature Genetics](http://www.nature.com/ng/journal/v44/n9/full/ng.2376.html) currently don't support estimates on missing data and replicates.
This is work in progress and will be accordingly updated here.For questions and comments feel free to contact me: [email protected]
## How to use
```R
# Load libraries and source needed functions
# The AsREML package needs a valid license that can be obtained at http://www.vsni.co.uk/software/asremllibrary(lattice)
library(asreml)# msm and nadiv librarys are used to estimate SE of the correlation estimates, only used if run=FALSE
#library(msm)
#library(nadiv)source('mtmm_function.r')
source('emma.r')# load your data (Phenotype(Y),Genotype(X) and Kinship(K))
# note you can calculate K using the emma package K<-emma.kinship(t(X)), make sure to set colnames(K)=rownames(K)=rownames(X)# alternativley load the sample data
load('data/MTMM_SAMPLE_DATA.Rdata')# different options include method(default or errorcorrelation, include.single.analysis, calculate.effect.size (if TRUE, #analysis is more time consuming) default for X is binary coding of 0 and 1, if your data are code 0,1 and 2 use #gen.data='heterozygot', run=FALSE will not perform the GWAS, but only output the correlation estimates (fast)
mtmm(Y,X,K,method='default',include.single.analysis=T,calculate.effect.size=T,gen.data='binary',exclude=T,run=T)# To only perform a Variance Coponent Analysis use the mtmm_estimate.r script with the flag only.vca=T set
VCA<-mtmm_estimates(Y,K=K,only.vca=T)# the function outputs a list called results ($phenotype ,$pvals, $statistics, $kinship)
output<-results$pvals# manhattan plots
# default plots for include.single.analysis=T
par(mfrow=c(5,1),mar=c(3, 4, 1, 4))
plot_gwas(output,h=8)
plot_gwas(output,h=9)
plot_gwas(output,h=10)
plot_gwas(output,h=11)
plot_gwas(output,h=12)#qq plots
par(mfrow=c(1,1),mar=c(3, 4, 1, 4))
qq_plot_all(output)
```
## Poster
* [Complextraits 2012](posters/poster_complextraits_2012_AK.pdf)
* [ICAR 2012](posters/poster_ICAR_2012_AK.pptx)