if (FALSE) {
# load example data and calculate genotype probabilities
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/main/DO_Recla/recla.zip")
recla <- read_cross2(file)
snpinfo <- create_snpinfo(recla)
# calculate genotype probabilities
pr <- calc_genoprob(recla, error_prob=0.002, map_function="c-f")
# index the snp information
snpinfo <- index_snps(recla$pmap, snpinfo)
# sex covariate
sex <- setNames((recla$covar$Sex=="female")*1, rownames(recla$covar))
# perform a SNP scan
out <- scan1snps(pr, recla$pmap, recla$pheno[,"bw"], addcovar=sex, snpinfo=snpinfo)
# plot the LOD scores
plot(out$lod, snpinfo, altcol="green3")
}
Run the code above in your browser using DataLab