# \donttest{
sub.map <- get_submap(maps.hexafake[[1]], 1:20, reestimate.rf = FALSE)
plot(sub.map, mrk.names = TRUE)
s <- make_seq_mappoly(hexafake, sub.map$info$mrk.names)
tpt <- est_pairwise_rf(s)
rf.matrix <- rf_list_to_matrix(input.twopt = tpt,
thresh.LOD.ph = 3,
thresh.LOD.rf = 3,
shared.alleles = TRUE)
###### Removing marker "M_1" (first) #######
mrk.to.remove <- "M_1"
input.map <- drop_marker(sub.map, mrk.to.remove)
plot(input.map, mrk.names = TRUE)
## Computing conditional probabilities using the resulting map
genoprob <- calc_genoprob(input.map)
res.add.M_1 <- add_marker(input.map = input.map,
mrk = "M_1",
pos = 0,
rf.matrix = rf.matrix,
genoprob = genoprob,
tol = 10e-4)
plot(res.add.M_1, mrk.names = TRUE)
best.phase <- res.add.M_1$maps[[1]]$seq.ph
names.id <- names(best.phase$P)
plot_compare_haplotypes(ploidy = 6,
hom.allele.p1 = best.phase$P[names.id],
hom.allele.q1 = best.phase$Q[names.id],
hom.allele.p2 = sub.map$maps[[1]]$seq.ph$P[names.id],
hom.allele.q2 = sub.map$maps[[1]]$seq.ph$Q[names.id])
###### Removing marker "M_10" (middle or last) #######
mrk.to.remove <- "M_10"
input.map <- drop_marker(sub.map, mrk.to.remove)
plot(input.map, mrk.names = TRUE)
# Computing conditional probabilities using the resulting map
genoprob <- calc_genoprob(input.map)
res.add.M_10 <- add_marker(input.map = input.map,
mrk = "M_10",
pos = "M_9",
rf.matrix = rf.matrix,
genoprob = genoprob,
tol = 10e-4)
plot(res.add.M_10, mrk.names = TRUE)
best.phase <- res.add.M_10$maps[[1]]$seq.ph
names.id <- names(best.phase$P)
plot_compare_haplotypes(ploidy = 6,
hom.allele.p1 = best.phase$P[names.id],
hom.allele.q1 = best.phase$Q[names.id],
hom.allele.p2 = sub.map$maps[[1]]$seq.ph$P[names.id],
hom.allele.q2 = sub.map$maps[[1]]$seq.ph$Q[names.id])
# }
Run the code above in your browser using DataLab