# \donttest{
#Import data in a bed matrix
x <- read.bed.matrix( system.file("extdata", "LCT.EUR.b37.bed", package="Ravages") )
#Group variants within known genes
x <- set.genomic.region(x)
#Filter of rare variants: only non-monomorphic variants with
#a MAF lower than 2.5%
#keeping only genomic regions with at least 10 SNP
x1 <- filter.rare.variants(x, filter = "whole", maf.threshold = 0.025, min.nb.snps = 10)
#Simulation of a continuous and a binary covariate
set.seed(1) ; sex <- sample(0:1, nrow(x1), replace = TRUE) ; u <- runif(nrow(x1))
covar <- cbind(sex, u)
#run SKAT using the 1000 genome EUR populations as "outcome" using one core
#Fit Null model
x1.H0 <- NullObject.parameters(x1@ped$population, RVAT = "SKAT", pheno.type = "categorical")
SKAT.theoretical(x1, x1.H0, cores = 1)
# }
Run the code above in your browser using DataLab