library('MASS') # required for ginv library(multtest) library(gplots) library(compiler) #required for cmpfun library("scatterplot3d") source("http://www.zzlab.net/GAPIT/emma.txt") source("http://www.zzlab.net/GAPIT/gapit_functions.txt") source("~/Dropbox/GAPIT/Functions/gapit_functions.txt") myGD=read.table(file="http://zzlab.net/GAPIT/data/mdp_numeric.txt",head=T) myGM=read.table(file="http://zzlab.net/GAPIT/data/mdp_SNP_information.txt",head=T) setwd("~/Dropbox/Current/ZZLab/WSUCourse/CROPS545/R/2016") source("G2P.R") X=myGD[,-1] index1to5=myGM[,2]<6 X1to5 = X[,index1to5] set.seed(99164) mySim=G2P(X= X1to5,h2=.75,alpha=1,NQTN=10,distribution="norm") setwd("~/Desktop/temp") myY=cbind(as.data.frame(myGD[,1]), mySim$y) myGAPIT0=GAPIT( Y=myY, GD=myGD, GM=myGM, QTN.position=mySim$QTN.position, PCA.total=3, group.from=1000000, group.to=1000000, group.by=10, kinship.algorithm="EMMA", memo="EMMA") myGAPIT0$kinship[1:5,1:5] myGAPIT=GAPIT( Y=myY, GD=myGD, GM=myGM, QTN.position=mySim$QTN.position, PCA.total=3, group.from=1000000, group.to=1000000, group.by=10, memo="MLM") myK=myGAPIT$kinship myK[,-1]=myK[,-1]/2 myGAPIT2=GAPIT( Y=myY, GD=myGD, GM=myGM, KI=myK, QTN.position=mySim$QTN.position, PCA.total=3, group.from=240, group.to=1000000, group.by=10, kinship.cluster=c("average", "complete", "ward"), kinship.group=c("Mean", "Max"), plot.style="cougars",# Rainbow,FarmCPU, Rushville,Congress,Ocean,PLINK,Beach,Oceanic,cougars memo="MLM2") n=500 a=matrix(sample(100,n*n,replace=T),n,n) ptm <- proc.time() b=solve(a) proc.time() - ptm