if (FALSE) {
## Selecting 50 markers in chromosome 5
s5 <- make_seq_mappoly(tetra.solcap, "seq5")
s5 <- make_seq_mappoly(tetra.solcap, s5$seq.mrk.names[1:50])
tpt5 <- est_pairwise_rf(s5)
m5 <- rf_list_to_matrix(tpt5, 3, 3)
fb.rf <- find_blocks(s5, rf.mat = m5, verbose = FALSE, ncpus = 2)
bl.rf <- fb.rf$blocks
plot_map_list(bl.rf)
## Merging resulting maps
map.merge <- merge_maps(bl.rf, tpt5)
plot(map.merge, mrk.names = T)
## Comparing linkage phases with pre assembled map
id <- na.omit(match(map.merge$info$mrk.names, solcap.err.map[[5]]$info$mrk.names))
map.orig <- get_submap(solcap.err.map[[5]], mrk.pos = id)
p1.m<-map.merge$maps[[1]]$seq.ph$P
p2.m<-map.merge$maps[[1]]$seq.ph$Q
names(p1.m) <- names(p2.m) <- map.merge$info$mrk.names
p1.o<-map.orig$maps[[1]]$seq.ph$P
p2.o<-map.orig$maps[[1]]$seq.ph$Q
names(p1.o) <- names(p2.o) <- map.orig$info$mrk.names
n <- intersect(names(p1.m), names(p1.o))
plot_compare_haplotypes(4, p1.o[n], p2.o[n], p1.m[n], p2.m[n])
### Using genome
fb.geno <- find_blocks(s5, clustering.type = "genome", genome.block.threshold = 10^4)
plot_map_list(fb.geno$blocks)
splt <- lapply(fb.geno$blocks, split_mappoly, 1)
plot_map_list(splt)
}
Run the code above in your browser using DataLab