library(knitr)
library(pander)
library(microbenchmark)
library(ieugwasr)
Get a set of SNPs to query:
<- tophits("ieu-a-2")
a <- a$rsid
rsid <- paste0(a$chr, ":", a$position)
chrpos length(rsid)
<- microbenchmark("rsid" = {
mbm <- associations(rsid, "ieu-a-7", proxies=0)
b
},"chrpos" = {
<- associations(chrpos, "ieu-a-7", proxies=0)
b times=10
},
)kable(summary(mbm))
Specify a range, and then get the corresponding rsIDs in that range
<- 100000
radius <- paste0(a$chr[1], ":", a$position[1]-100000, "-", a$position[1]+100000)
chrpos <- associations(chrpos, "ieu-a-7", proxies=0)
b <- b$rsid rsid
Window size
format(radius * 2, scientific = FALSE, big.mark = ",")
length(rsid)
<- microbenchmark("rsid" = {
mbm <- associations(rsid, "ieu-a-7", proxies=0)
b
},"chrpos" = {
<- associations(chrpos, "ieu-a-7", proxies=0)
b times=10
},
)kable(summary(mbm))
Specify multiple ranges, and then get the corresponding rsIDs across all those ranges
<- paste0(a$chr, ":", a$position-10000, "-", a$position+10000)
chrpos <- associations(chrpos, "ieu-a-7", proxies=0)
b <- b$rsid rsid
length(chrpos)
ranges of
format(20000, scientific = FALSE, big.mark = ",")
size window, which is covered by
length(rsid)
variants to lookup.
<- microbenchmark("rsid" = {
mbm <- associations(rsid, "ieu-a-7", proxies=0)
b
},"chrpos" = {
<- associations(chrpos, "ieu-a-7", proxies=0)
b times=5
},
)kable(summary(mbm))