knitr::opts_chunk$set(echo = TRUE, fig.width = 7, fig.height = 7, warning = FALSE)
library(knitr)
library(qtl)
library(qtlTools)
library(devtools)
install_github("jtlovell/qtlTools")
library(qtlTools)
library(qtl)

Load the simulated F2 data

data(fake.f2)
covar<-data.frame(covar = fake.f2$phe$sex)
fake.f2<-calc.genoprob(fake.f2)

scanone permutation comparison

normal permutations

set.seed(42)
perms0<-scanone(fake.f2, pheno.col="phenotype", addcovar=covar,
                intcovar=covar, perm.strata=covar[,1],
                n.perm=100, verbose = F)
summary(perms0)

GWERk scanone permutations

set.seed(42)
perms1<-scanone.GWERk(fake.f2, pheno.col="phenotype", 
                      addcovar=covar, intcovar=covar, 
                      perm.strata=covar[,1],
                      n.perm=100, GWERk=1, verbose = F)
summary(perms1)

plot(as.numeric(perms0), as.numeric(perms1), 
     xlab="standard perms", ylab = "GWER perms", 
     main = "scanone permutation comparison")
abline(a=0,b=1, lty=3)


jtlovell/qtlTools documentation built on May 20, 2019, 3:14 a.m.