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)
# founder genotypes for a set of SNPs
snpgeno <- rbind(m1=c(3,1,1,3,1,1,1,1),
m2=c(1,3,1,3,1,3,1,3),
m3=c(1,1,1,1,3,3,3,3),
m4=c(1,3,1,3,1,3,1,3))
sdp <- calc_sdp(snpgeno)
snpinfo <- data.frame(chr=c("19", "19", "X", "X"),
pos=c(40.36, 40.53, 110.91, 111.21),
sdp=sdp,
snp=c("m1", "m2", "m3", "m4"), stringsAsFactors=FALSE)
# update snp info by adding the SNP index column
snpinfo <- index_snps(recla$pmap, snpinfo)
}
Run the code above in your browser using DataLab