Learn R Programming

hsphase (version 3.0.0)

rplot: Recombination Plot

Description

Creates a plot showing the sum of recombination events across a half-sib family.

Usage

rplot(x, distance, start = 1, end = ncol(x), maximum = 100,
      overwrite = FALSE, method = "constant")

Arguments

x

matrix. Half-sib genotypes (one half-sib per row; SNPs ordered by mapping position in columns). Numeric coding: 0, 1, 2 for AA, AB, BB. Use 9 for missing data.

distance

numeric (or integer). Physical distances between markers (length must match ncol(x) or the plotted range).

start

integer. First marker index for the plot.

end

integer. Last marker index for the plot.

maximum

integer. Maximum number of recombinations to show (higher recombination rates will be omitted).

overwrite

logical. Draw over the current plot (default FALSE).

method

character. Method passed to pm (e.g., "constant" or "relative").

Examples

Run this code
genotype <- matrix(c(
  0,2,0,1,0,
  2,0,1,2,2,
  2,2,1,0,2,
  2,2,1,1,1,
  0,0,2,1,0
), ncol = 5, byrow = TRUE)

rplot(genotype, c(1,2,3,4,8))

Run the code above in your browser using DataLab