#Import data in a bed matrix
x <- read.bed.matrix( system.file("extdata", "LCT.EUR.b37.bed", package="Ravages") )
#Group variants within known genes and
#Within coding and regulatory regions
x <- set.genomic.region.subregion(x, regions = genes.b37,
subregions = subregions.LCT)
#Keep only variants with a MAF lower than 1%
x1 <- filter.rare.variants(x, filter = "whole", maf.threshold = 0.01)
#run null model, using the 1000Genome population as "outcome"
x1.H0 <- NullObject.parameters(pheno = x1@ped$population, ref.level = "CEU",
RVAT = "burden", pheno.type = "categorical")
#run functionally-informed burden test WSS in LCT
burden.subscores(select.snps(x1, genomic.region == "LCT"),
NullObject = x1.H0, burden.function = WSS,
get.effect.size=FALSE, cores = 1)
####Using the RAVA-FIRST approach with CADD regions (example on b37)
#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%
#and with a adjusted CADD score greater than the median
#x1 <- filter.adjustedCADD(x, filter = "whole", maf.threshold = 0.025)
#run functionally-informed burden test WSS
#burden.subscores(x1, NullObject = x1.H0, burden.function = WSS,
# get.effect.size=FALSE, cores = 1)
Run the code above in your browser using DataLab