#Import data in a bed matrix
#x <- read.bed.matrix( system.file("extdata", "LCT.EUR.b37.bed", package="Ravages") )
#Group variants within CADD regions and genomic categories
#x <- set.CADDregions(x, build = "b37")
#Filter of rare variants: only non-monomorphic variants with
#a MAF lower than 2.5%
#keeping only genomic regions with at least 200 SNP
#x1 <- filter.rare.variants(x, filter = "whole", maf.threshold = 0.025, min.nb.snps = 200)
#Simulation of a continuous and a binary covariate
#set.seed(1) ; sex <- sample(0:1, nrow(x1), replace = T) ; u <- runif(nrow(x1))
#covar <- cbind(sex, u)
#Null model with the covariate sex and a continuous phenotype
#x1.H0.covar <- NullObject.parameters(pheno = x1@ped$pheno <- rnorm(nrow(x1)),
# RVAT = "burden", pheno.type = "continuous",
# data = covar, formula = ~ sex)
#WSS test
#res.subscores <-burden.continuous.subscores(x1, NullObject = x1.H0.covar,
# burden = WSS, get.effect.size=TRUE, cores = 1)
#res.subscores$Asso # p-values
#res.subscores$effect #beta values
Run the code above in your browser using DataLab