if (FALSE) {
# download example pQTL results (from Keele et al. 2026, https://doi.org/10.1016/j.xgen.2025.101069)
# contains qtl, map_endpoints, and pheno_pos
url <- "https://kbroman.org/qtl2/assets/sampledata/pqtl_data.RData"
tempfile <- file.path(tempdir(), basename(url))
download.file(url, tempfile)
load(tempfile)
unlink(tempfile)
hotspots <- calc_hotspots(qtl, map, window=2)
plot(hotspots, map, ylab="No. QTL")
find_peaks(hotspots, map, threshold=20)
}
Run the code above in your browser using DataLab