plot_map: Plot linkage maps

View source: R/exported_functions.R

plot_mapR Documentation

Plot linkage maps

Description

Makes a simple plot of a list of generated linkage maps

Usage

plot_map(
  maplist,
  highlight = NULL,
  bg_col = "grey",
  highlight_col = "yellow",
  colname_in_mark = NULL,
  colname_beside_mark = NULL,
  palette_in_mark = colorRampPalette(c("white", "purple")),
  palette_beside_mark = colorRampPalette(c("white", "green")),
  color_by_type = FALSE,
  dosage_matrix = NULL,
  parent1 = "P1",
  parent2 = "P2",
  legend = FALSE,
  legend.x = 1,
  legend.y = 120,
  ...
)

Arguments

maplist

A list of maps. In the first column marker names and in the second their position.

highlight

A list of the same length of maplist with vectors of length 2 that specifies the limits in cM from and to which the plotted chromosomes should be highlighted.

bg_col

The background colour of the map.

highlight_col

The color of the highlight. Only used if highlight is specified.

colname_in_mark

Optional. The column name of the value to be plotted as marker color.

colname_beside_mark

Optional. The column name of the value to be plotted beside the markers.

palette_in_mark, palette_beside_mark

Color palette used to plot values. Only used if colnames of the values are specified.

color_by_type

Logical. Should the markers be coloured by type? If TRUE, dosage_matrix should be specified.

dosage_matrix

Optional (by default NULL). Dosage matrix of marker genotypes, input of linkage

parent1

Character string specifying the first (usually maternal) parentname.

parent2

Character string specifying the second (usually paternal) parentname.

legend

Logical. Should a legend be drawn?

legend.x

Optional. The x value of the coordinates of the legend.

legend.y

Optional. The y value of the coordinates of the legend.

...

Arguments passed to plot

Examples

data("maplist_P1")
plot_map(maplist = maplist_P1, colname_in_mark = "nnfit", bg_col = "white",
         palette_in_mark = colorRampPalette(c("blue", "purple", "red")),
         highlight = list(c(20, 60),
         c(60,80),
         c(20,30),
         c(40,70),
         c(60,80)))

polymapR documentation built on Nov. 5, 2023, 1:09 a.m.