Learn R Programming

onemap (version 2.1.1)

rf_graph_table: Plots pairwise recombination fractions and LOD Scores in a heatmap

Description

Plots a matrix of pairwise recombination fractions (under the diagonal) and LOD Scores (above the diagonal) using a color scale. Any value of the matrix can be easily accessed using an interactive Tcl-Tk interface, helping users to check for possible problems.

Usage

rf_graph_table(input.seq, scale = 1, axis.cex = 1, main = NULL,
  inter = TRUE, mrk.names = FALSE, colorkey = TRUE)

Arguments

input.seq

an object of class sequence with a predefined order.

scale

controls the plot size. If inter == FALSE this value is not used.

axis.cex

the magnification to be used for axis annotation.

main

the title for no interactive plot, i.e. it is only used if inter == FALSE.

inter

logical. If TRUE, an interactive graphic is plotted. Otherwise, a default graphic device is used.

mrk.names

logical. If TRUE, displays the names of the markers.

colorkey

logical. If TRUE, a colorkey is plotted along horizontal axis, indicating recombination fraction, and along vertical axis, indicating the LOD Score.

Details

The color scale varies from red (small distances or big LODs) to dark blue. When clicking on a cell, a dialog box is displayed with some information about corresponding markers for that cell (line \(\times\) column). They are: \(i\)) the name of the markers; \(ii\)) the number of the markers on the data set; \(iii\)) the segregation types; \(iv\)) the recombination fraction between the markers and \(v\)) the LOD-Score for each possible linkage phase calculated via two-point analysis. For neighbor markers, the multipoint recombination fraction is printed; otherwise, the two-point recombination fraction is printed. For markers of type D1 and D2, it is impossible to calculate recombination fraction via two-point analysis and, therefore, the corresponding cell will be empty. For cells on the diagonal of the matrix, the name, the number and the type of the marker are printed, as well as the percentage of missing data for that marker.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
##outcross example
  data(example_out)
  twopt <- rf_2pts(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 Tcl-Tk
  rf_graph_table(LG1.rcd, scale=2, inter=TRUE)

  ##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
  op <- par(mfrow = c(1, 3))
  for(i in 1:groups$n.groups)
    rf_graph_table(maps.list[[i]], axis.cex=.7, main=paste("Group", i),inter=FALSE)
  par(op)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab