library(onemap) #version 2.2
load("clownfish2.rda")

As noted previously, OneMap can be used to construct genetic maps in F1 full-sib populations with any marker segregation types, and this includes multi-allelic markers, which will generally be more informative than biallelic markers. This tutorial demonstrates this capacity using the marker dataset from Casas et al., 2018, which analyzed a full-sib population of wild clownfish (Amphiprion bicinctus).

clownfish <- read_onemap(dir = ".", inputfile = "batch_3.genotypes_50onemap_filtered_april2016.txt")
##  Working...
## 
##  --Read the following data:
##  Type of cross:           outcross 
##  Number of individuals:   94 
##  Number of markers:       3147 
##  Chromosome information:  no 
##  Position information:    no 
##  Number of traits:        0
plot_by_segreg_type(clownfish)

This marker dataset contains many B3.7 styles, but in addition, A.1 and A.2 type markers, which reflect abxcd and ab×ac segregation types, respectively.

clownfish.segreg_test <- test_segregation(clownfish)
plot(clownfish.segreg_test)

There is no segregation distortion, so we will proceed with all the markers.

clownfish.twopts <- rf_2pts(clownfish, LOD = 4, max.rf = 0.4)
clownfish.markers <- make_seq(clownfish.twopts, "all")
clownfish.LGs <- group(clownfish.markers, LOD = 14, max.rf = 0.4 )

We will construct a map just as we did previously:

set_map_fun(type="kosambi")
clownfish.LG1 <- make_seq(clownfish.LGs, 1)

clownfish.LG1.ord <- order_seq(clownfish.LG1, n.init=5, touchdown=TRUE)
clownfish.LG1.final <- make_seq(clownfish.LG1.ord,"force")

As we can see, the RF heatmap contains no whitespace.

rf_graph_table(clownfish.LG1.final, mrk.axis = "numbers")

It does, however, contain one marker that seems incorrectly placed, which we can remove using drop_marker:

clownfish.LG1_drop_seq <- drop_marker(clownfish.LG1.final, 2914)
clownfish.LG1_remap <- map(clownfish.LG1_drop_seq)
rf_graph_table(clownfish.LG1_remap, mrk.axis = "numbers")

An alternative ordering strategy is to make use of MDSMap, a method for using multi-dimensional scaling to order markers in very high-density maps. mds_onemap implements this algorithm, which is fast, but only works well for large datasets. It is mainly designed to give good global orders, and thus ripple_seq is again a good option for evaluating local alternative orderings of markers.

clownfish.LG1_mds <- mds_onemap(clownfish.LG1)
rf_graph_table(clownfish.LG1_mds)

Again, the map seems very well-ordered, although there are several markers that may be misplaced (blue squares close to the diagonal), which could similarly be removed using drop_marker.