Learn R Programming

onemap (version 2.1.2)

draw_map2: Draw a linkage map

Description

Provides a simple draw of a linkage map.

Usage

draw_map2(..., tag = NULL, id = TRUE, pos = TRUE, cex.label = NULL,
  main = NULL, group.names = NULL, centered = F, y.axis = TRUE,
  space = NULL, col.group = NULL, col.mark = NULL, col.tag = NULL,
  output = NULL)

Arguments

...

sequence(s). Object(s) of class sequence with a predefined order, linkage phase, recombination fraction and likelihood. Can be used list(s) of sequences.

tag

name(s) of the marker(s) to highlight. If "all", all markers will be highlighted. Default is NULL.

id

logical. If TRUE (default), shows name(s) of tagged marker(s).

pos

logical. If TRUE (default), shows position(s) of tagged marker(s).

cex.label

the magnification used for label(s) of tagged marker(s). If NULL (default), the cex will be automatically calculated to avoid overlapping.

main

an overall title for the plot. Default is NULL.

group.names

name(s) to identfy the group(s). If NULL (default), the name(s) of the sequence(s) will be used.

centered

logical. If TRUE, the group(s) will be aligned in the center. If FALSE (default), the group(s) will be aligned at the top.

y.axis

logical. If TRUE (default), shows y axis. If centered = TRUE, the y axis will always be hidden.

space

numerical. Spacing between groups. If NULL (default), the spacing will be automatically calculated to avoid overlapping.

col.group

the color used for group(s).

col.mark

the color used for marker(s).

col.tag

the color used for highlighted marker(s) and its/theirs label(s).

output

the name of the output file. The file format can be specified by adding its extension. Available formats: 'bmp', 'jpeg', 'png', 'tiff', 'pdf' and 'eps' (default).

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
 data("onemap_example_out")
 twopt <- rf_2pts(onemap_example_out)
 lg<-group(make_seq(twopt, "all"))
 seq1<-make_seq(order_seq(input.seq= make_seq(lg,1),twopt.alg = "rcd"), "force")
 seq2<-make_seq(order_seq(input.seq= make_seq(lg,2),twopt.alg = "rcd"), "force")
 seq3<-make_seq(order_seq(input.seq= make_seq(lg,3),twopt.alg = "rcd"), "force")
 draw_map2(seq1,seq2,seq3,tag = c("M1","M2","M3","M4","M5"))
 
 data("onemap_example_f2")
 twopt <- rf_2pts(onemap_example_f2)
 lg<-group(make_seq(twopt, "all"))
 seq<-list(
 make_seq(order_seq(input.seq= make_seq(lg,1),twopt.alg = "rcd"), "force"),
 make_seq(order_seq(input.seq= make_seq(lg,2),twopt.alg = "rcd"), "force"),
 make_seq(order_seq(input.seq= make_seq(lg,3),twopt.alg = "rcd"), "force")
 )
 draw_map2(seq,tag = "all",group.names = c("Chr 1","Chr 2","Chr 3"),main="Linkage Map")

# }

Run the code above in your browser using DataLab