Learn R Programming

hsphase (version 1.2.4)

rplot: Recombination Plot

Description

This function creates a plot which shows the sum of all recombination events across a half-sib family.

Usage

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

Arguments

x
matrix of half-sib genotypes (one half-sib per row, with SNP ordered by mapping position in the columns. Data should be numeric. Use 0, 1 and 2 for respectively AA, AB and BB. Use 9 for missing data).
distance
vector of physical distances between markers
start
Integer first marker selected for the plot
end
Integer last marker selected for the plot
maximum
Integer maximum number of recombinations to show (higher recombination rates will be omitted from the plot)
overwrite
logical draw a diagram over the current diagram (default FALSE)

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) # each row contains the SNP of individuals

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

Run the code above in your browser using DataLab