Difference between revisions of "Family-based Association Exercise"
From Statistical Genetics Courses
Serveradmin (Talk | contribs) |
Serveradmin (Talk | contribs) |
||
| Line 2: | Line 2: | ||
==Family-based Association Exercise== | ==Family-based Association Exercise== | ||
| + | |||
cd exercises/cordell/FASTLMM_GCTA | cd exercises/cordell/FASTLMM_GCTA | ||
ls -l | ls -l | ||
Revision as of 18:49, 23 January 2019
Family-based Association Exercise
cd exercises/cordell/FASTLMM_GCTA
ls -l
plink --bfile quantfamdata --assoc --out plinkresults
R
res1<-read.table("plinkresults.qassoc", header=T)
head(res1)
source("qqmanHJCupdated.R")
manhattan(res1, pch=20, suggestiveline=F, genomewideline=F, ymin=2, cex.x.axis=0.65, colors=c("black","dodgerblue"), cex=0.5)
qq(res1$P)
chi<-(qchisq(1-res1$P,1))
lambda=median(chi)/0.456
lambda
fastlmmc -bfile quantfamdata -pheno quantfamdata.fam -mpheno 4 -bfileSim quantfamdata -ML -out FLMMresults
R
res2<-read.table("FLMMresults", header=T)
head(res2)
chi<-(qchisq(1-res2$Pvalue,1))
lambda=median(chi)/0.456
lambda
new<-data.frame(res2$SNP, res2$Chromosome, res2$Position, res2$Pvalue)
names(new)<-c("SNP", "CHR", "BP", "P")
head(new)
qq(new$P)
manhattan(new, pch=20, suggestiveline=F, genomewideline=F, ymin=2, cex.x.axis=0.65, colors=c("black","dodgerblue"), cex=0.5)