# load qtl2 package for data and genoprob calculation
library(qtl2)
# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))
# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)
# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)
# inferred genotypes
geno <- maxmarg(probs)
# plot the inferred genotypes for the first individual
ggplot_onegeno(geno, map, shift = TRUE)
# plot the inferred genotypes for the first four individuals
ggplot_onegeno(geno, map, ind=1:4)
Run the code above in your browser using DataLab