# NOT RUN {
# }
# NOT RUN {
##outcross example
data(onemap_example_out)
twopt <- rf_2pts(onemap_example_out)
all_mark <- make_seq(twopt,"all")
groups <- group(all_mark)
LG1 <- make_seq(groups,1)
LG1.rcd <- rcd(LG1)
rf_graph_table(LG1.rcd, inter=FALSE)
##Now, using interactive plotly
rf_graph_table(LG1.rcd, inter=TRUE, html.file= "LG1.rcd.html")
##F2 example
data(onemap_example_f2)
twopt <- rf_2pts(onemap_example_f2)
all_mark <- make_seq(twopt,"all")
groups <- group(all_mark)
##"pre-allocate" an empty list of length groups$n.groups (3, in this case)
maps.list<-vector("list", groups$n.groups)
for(i in 1:groups$n.groups){
##create linkage group i
LG.cur <- make_seq(groups,i)
##ordering
map.cur<-order_seq(LG.cur, subset.search = "sample")
##assign the map of the i-th group to the maps.list
maps.list[[i]]<-make_seq(map.cur, "force")
}
##Plot LOD/recombination fraction matrices for each group
require(gridExtra)
plot1 <- rf_graph_table(maps.list[[1]], main="Group 1",inter=FALSE)
plot2 <- rf_graph_table(maps.list[[2]], main="Group 2",inter=FALSE)
plot3 <- rf_graph_table(maps.list[[3]], main="Group 3",inter=FALSE)
grid.arrange(plot1, plot2, plot3, nrow=3)
# }
Run the code above in your browser using DataLab