R/qtl2browse is an R package to facilitate the use of the Genetics Genome Browser with R/qtl2.
Install R/qtl2browse from r-universe:
install.packages("qtl2browse", repos=c("https://rqtl.r-universe.dev",
"https://cloud.r-project.org"))
Alternatively, install the remotes package
and use remotes::install_github() to install R/qtl2browse from its
Github repository.
install.packages("remotes")
library(remotes)
install_github("rqtl/qtl2browse")
At present, there is a single function, browse(), which takes
genome scan output from qtl2::scan1(), writes it to a JSON file, and
opens it in a web browser.
Here's an example using data from Recla et al. (2014) and Logan et al. (2013). The calculations are a bit slow.
library(qtl2)
recla <- read_cross2(paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/master/DO_Recla/recla.zip"))
gmap <- insert_pseudomarkers(recla$gmap, step=0.2, stepwidth="max")
pmap <- interp_map(gmap, recla$gmap, recla$pmap)
pr <- calc_genoprob(recla, gmap, error_prob=0.002,
map_function="c-f", cores=4)
apr <- genoprob_to_alleleprob(pr)
k <- calc_kinship(apr, "loco", cores=4)
out <- scan1(apr, recla$pheno[,"HP_latency"], k, cores=4)
library(qtl2browse)
browse(out, pmap)
R/qtl2browse is released under the MIT license, as is the Genetics Genome Browser.