Learn R Programming

IPLGP (version 2.0.5)

simu.gamete: Simulate The Genotype Of A Gamete

Description

Generate the genotype of a gamete from the genotypic data of its parents by Monte Carlo simulation. The recombination rate is calculate by Haldane’s mapping function.

Usage

simu.gamete(marker)

Value

The SNP sequence of gamete.

Arguments

marker

data frame. A p*4 data frame whose first column indicates the chromosome number to which a marker belongs; second column indicates the position of the marker in centi-Morgan (cM); and 3rd and 4th columns indicates the genotype of the marker (numeric or character).

References

Haldane J.B.S. 1919. The combination of linkage values and the calculation of distance between the loci for linked factors. Genetics 8: 299–309.

Examples

Run this code
# generate simulated data
marker.test <- data.frame(c(1,1,1,1,1,2,2,2,2,2),c(10,20,30,40,50,10,20,30,40,50),
c("A","T","C","G","A","A","G","A","T","A"),c("A","A","G","C","T","A","G","T","T","A"))

# run
simu.gamete(marker.test)

Run the code above in your browser using DataLab